Task: equi-join-detect (source dataset: Auto-BI)

Your are given a database with related tables used for business intelligence analysis. Your task is to identify all key/foreign-key join relationships between the tables for this database. Recall that a join is a relationship between two tables, that allows rows from one table to be combined with rows from another, based on a set of common join columns.
 
 
No explanation needed. Please return all join relationships in the following JSON format:
{
  "joins": [
    {
      "from_table": "table-1",
      "from_column": "column-1",
      "to_table": "table-2",
      "to_column": "column-3"
    }, 
	...
  ]
}

Tables:

Table: Chapters
|   Chapter ID | Chapter Name        |   Movie ID |   Movie Chapter |
|-------------:|:--------------------|-----------:|----------------:|
|            1 | Doorstep Delivery   |          1 |               1 |
|            2 | The Vanishing Glass |          1 |               2 |
|            3 | Letters from No One |          1 |               3 |
|            4 | Keeper of the Keys  |          1 |               4 |
|            5 | Diagon Alley        |          1 |               5 |
|            6 | Gringotts           |          1 |               6 |
|            7 | Ollivanders         |          1 |               7 |
|            8 | The Boy Who Lived   |          1 |               8 |
|            9 | Platform 9&¾        |          1 |               9 |
|           10 | Ron and Hermione    |          1 |              10 |


Table: Characters
|   Character ID | Character Name   | Species   | Gender   | House      | Patronus   | Wand (Wood)   | Wand (Core)   |
|---------------:|:-----------------|:----------|:---------|:-----------|:-----------|:--------------|:--------------|
|             13 | Alastor Moody    | Human     | Male     |            |            |               |               |
|             14 | Fred Weasley     | Human     | Male     | Gryffindor |            |               |               |
|             17 | Cornelius Fudge  | Human     | Male     |            |            |               |               |
|             18 | Sirius Black     | Human     | Male     | Gryffindor |            |               |               |
|             19 | George Weasley   | Human     | Male     | Gryffindor |            |               |               |
|             21 | Vernon Dursley   | Human     | Male     |            |            |               |               |
|             26 | Molly Weasley    | Human     | Female   | Gryffindor |            |               |               |
|             31 | Dudley Dursley   | Human     | Male     |            |            |               |               |
|             32 | Petunia Dursley  | Human     | Female   |            |            |               |               |
|             33 | Barty Crouch Sr. | Human     | Male     |            |            |               |               |


Table: Dialogue {Extract Spell}
|   Dialogue ID |   Chapter ID |   Place ID |   Character ID | Dialogue                                                                                                                                                                                                                                                                                   | Custom.Incantation   | Custom   |
|--------------:|-------------:|-----------:|---------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------|:---------|
|           226 |           10 |         42 |              3 | Are you sure that's a real spell? Well, it's not very good, is it? Of course I've only tried a few simple spells myself, and they've all worked for me. For example...  Oculus Reparo.  That's better, isn't it? Holy Cricket, you're Harry Potter. I'm Hermione Granger...and you are...? | Oculus Reparo        | True     |
|           226 |           10 |         42 |              3 | Are you sure that's a real spell? Well, it's not very good, is it? Of course I've only tried a few simple spells myself, and they've all worked for me. For example...  Oculus Reparo.  That's better, isn't it? Holy Cricket, you're Harry Potter. I'm Hermione Granger...and you are...? | Reparo               | True     |
|           393 |           16 |         59 |              3 | Oh, move over!  Alohomora.  Get in.                                                                                                                                                                                                                                                        | Alohomora            | True     |
|           394 |           16 |         59 |              2 | Alohomora?                                                                                                                                                                                                                                                                                 | Alohomora            | True     |
|           421 |           17 |         26 |             59 | Good. And enunciate. Wingardium Leviosa. Off you go then.                                                                                                                                                                                                                                  | Wingardium Leviosa   | True     |
|           426 |           17 |         26 |              3 | Wingardium Leviosa.                                                                                                                                                                                                                                                                        | Wingardium Leviosa   | True     |
|           457 |           18 |         34 |              2 | Wingardium Leviosa!  Cool.                                                                                                                                                                                                                                                                 | Wingardium Leviosa   | True     |
|           739 |           27 |         39 |              3 | Neville, I'm really, really sorry about this... Petrificus Totalus.                                                                                                                                                                                                                        | Petrificus Totalus   | True     |
|           746 |           27 |         59 |              3 | Alohomora.                                                                                                                                                                                                                                                                                 | Alohomora            | True     |
|           778 |           27 |         64 |              3 | Um Devil's Snare, Devil's Scare,  it's deadly fun...but will sulk in the sun! That's it! Devil's Snare hates sunlight!  Lumos Solem!                                                                                                                                                       | Lumos                | True     |


Table: Dialogue
|   Dialogue ID |   Chapter ID |   Place ID |   Character ID | Dialogue                                                                                                                                                                                                                                    |
|--------------:|-------------:|-----------:|---------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|           547 |           21 |         39 |              1 | Knight to E5.                                                                                                                                                                                                                               |
|           559 |           21 |         39 |              1 | Happy Christmas, Ron.  What are you wearing?                                                                                                                                                                                                |
|           561 |           21 |         39 |              1 | I-I've got presents?                                                                                                                                                                                                                        |
|           564 |           21 |         39 |              1 | Your father left this in my possession before he died. It is time it was returned to you. Use it well.                                                                                                                                      |
|           566 |           21 |         39 |              1 | It's some kind of cloak.                                                                                                                                                                                                                    |
|           569 |           21 |         39 |              1 | My body's gone!                                                                                                                                                                                                                             |
|           571 |           21 |         39 |              1 | I'm invisible?                                                                                                                                                                                                                              |
|           573 |           21 |         39 |              1 | There was no name. It just said use it well.                                                                                                                                                                                                |
|           701 |           26 |         39 |              1 | But he's weak. He's living off the unicorns. Don't you see? We had it wrong! Snape doesn't want the Stone for himself; he wants the Stone for Voldemort. With the Elixir of Life, Voldemort will be strong again. He'll... he'll come back. |
|           703 |           26 |         39 |              1 | I think if he'd had the chance, he might've tried to kill me tonight.                                                                                                                                                                       |


Table: Movies
|   Movie ID |   Release Year |   Runtime |    Budget |   Box Office | Movie Title                |     Profit |   Total RunTime |
|-----------:|---------------:|----------:|----------:|-------------:|:---------------------------|-----------:|----------------:|
|          1 |           2001 |       152 | 125000000 |   1002000000 | the Philosopher's Stone    |  877000000 |         2.53333 |
|          2 |           2002 |       161 | 100000000 |    880300000 | the Chamber of Secrets     |  780300000 |         2.68333 |
|          3 |           2004 |       142 | 130000000 |    796700000 | the Prisoner of Azkaban    |  666700000 |         2.36667 |
|          4 |           2005 |       157 | 150000000 |    896400000 | the Goblet of Fire         |  746400000 |         2.61667 |
|          5 |           2007 |       138 | 150000000 |    942000000 | the Order of the Phoenix   |  792000000 |         2.3     |
|          6 |           2009 |       153 | 250000000 |    943200000 | the Half-Blood Prince      |  693200000 |         2.55    |
|          7 |           2010 |       146 | 200000000 |    976900000 | the Deathly Hallows Part 1 |  776900000 |         2.43333 |
|          8 |           2011 |       130 | 250000000 |   1342000000 | the Deathly Hallows Part 2 | 1092000000 |         2.16667 |


Table: Places
|   Place ID | Place Name               | Place Category   |
|-----------:|:-------------------------|:-----------------|
|          1 | Flourish & Blotts        | Diagon Alley     |
|          2 | Gringotts Wizarding Bank | Diagon Alley     |
|          3 | Knockturn Alley          | Diagon Alley     |
|          4 | Ollivanders              | Diagon Alley     |
|          5 | The Leaky Cauldron       | Diagon Alley     |
|          6 | Weasleys' Wizard Wheezes | Diagon Alley     |
|          7 | 12 Grimmauld Place       | Dwellings        |
|          8 | 4 Privet Drive           | Dwellings        |
|          9 | Godric's Hollow          | Dwellings        |
|         10 | Hut-on-the-Rock          | Dwellings        |


Table: Spells
|   Spell ID | Incantation      | Spell Name                       | Effect                           | Light    |
|-----------:|:-----------------|:---------------------------------|:---------------------------------|:---------|
|          1 | Accio            | Summoning Charm                  | Summons an object                |          |
|          2 | Aguamenti        | Water-Making Spell               | Conjures water                   | Icy blue |
|          3 | Alarte Ascendare | Launch an object up into the air | Rockets target upward            | Red      |
|          4 | Alohomora        | Unlocking Charm                  | Unlocks target                   | Blue     |
|          5 | Arania Exumai    | Spider repelling spell           | Repels spiders                   | Blue     |
|          6 | Arresto Momentum | Slowing Charm                    | Slows or stops target's velocity |          |
|          7 | Avada Kedavra    | Killing Curse                    | Instantaneous death              | Green    |
|          8 | Bombarda         | Exploding Charm                  | Small explosion                  |          |
|          9 | Brackium Emendo  | Brackium Emendo                  | Mends bones                      | Blue     |
|         10 | Cistem Aperio    | Cistem Aperio                    | Opens chests                     | White    |

 


tables: name: Chapters
data: Chapters.csv
name: Characters
data: Characters.csv
name: Dialogue {Extract Spell}
data: Dialogue {Extract Spell}.csv
name: Dialogue
data: Dialogue.csv
name: Movies
data: Movies.csv
name: Places
data: Places.csv
name: Spells
data: Spells.csv
label: Dialogue
Chapter ID
Chapters
Chapter ID
Dialogue
Character ID
Characters
Character ID
Chapters
Movie ID
Movies
Movie ID
Dialogue
Place ID
Places
Place ID
Dialogue {Extract Spell}
Chapter ID
Chapters
Chapter ID
Dialogue {Extract Spell}
Character ID
Characters
Character ID
Dialogue {Extract Spell}
Place ID
Places
Place ID
Dialogue {Extract Spell}
Custom.Incantation
Spells
Incantation
output: {
    "joins": [
        {
            "from_table": "Dialogue",
            "from_column": "Chapter ID",
            "to_table": "Chapters",
            "to_column": "Chapter ID"
        },
        {
            "from_table": "Dialogue",
            "from_column": "Character ID",
            "to_table": "Characters",
            "to_column": "Character ID"
        },
        {
            "from_table": "Chapters",
            "from_column": "Movie ID",
            "to_table": "Movies",
            "to_column": "Movie ID"
        },
        {
            "from_table": "Dialogue",
            "from_column": "Place ID",
            "to_table": "Places",
            "to_column": "Place ID"
        },
        {
            "from_table": "Dialogue {Extract Spell}",
            "from_column": "Chapter ID",
            "to_table": "Chapters",
            "to_column": "Chapter ID"
        },
        {
            "from_table": "Dialogue {Extract Spell}",
            "from_column": "Character ID",
            "to_table": "Characters",
            "to_column": "Character ID"
        },
        {
            "from_table": "Dialogue {Extract Spell}",
            "from_column": "Place ID",
            "to_table": "Places",
            "to_column": "Place ID"
        },
        {
            "from_table": "Dialogue {Extract Spell}",
            "from_column": "Custom.Incantation",
            "to_table": "Spells",
            "to_column": "Incantation"
        }
    ]
}