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: brand
| Brand     | Category      | Subcategory   |
|:----------|:--------------|:--------------|
| Bud Light | beverage      | alcohol       |
| E-Trade   | Retail        | online retail |
| Budweiser | beverage      | alcohol       |
| Pepsi     | beverage      | soft drink    |
| Doritos   | cpg           | chips         |
| NFL       | entertainment | sports        |
| Toyota    | automobile    | foreign cars  |
| Coca-Cola | beverage      | soft drink    |
| Kia       | automobile    | foreign cars  |
| Hyundai   | automobile    | foreign cars  |


Table: characteristics
| Funny   | Shows Product Quickly   | Patriotic   | Celebrity   | Danger   | Animals   | Uses Sex   |   Cat Key |
|:--------|:------------------------|:------------|:------------|:---------|:----------|:-----------|----------:|
| True    | True                    | False       | False       | False    | True      | False      |      1001 |
| True    | True                    | False       | False       | True     | False     | False      |      1002 |
| True    | True                    | False       | False       | False    | False     | False      |      1003 |
| True    | True                    | False       | False       | True     | False     | False      |      1004 |
| True    | True                    | False       | False       | False    | False     | False      |      1007 |
| True    | True                    | False       | False       | False    | True      | False      |      1009 |
| True    | True                    | False       | False       | False    | False     | False      |      1010 |
| True    | True                    | False       | False       | False    | False     | True       |      1014 |
| True    | True                    | False       | False       | False    | False     | False      |      1023 |
| True    | True                    | False       | False       | True     | True      | True       |      1025 |


Table: commercials_fact
|   Year | Brand     |   Length |   Estimated Cost |   Cat Key |   Eng Key |
|-------:|:----------|---------:|-----------------:|----------:|----------:|
|   2000 | E-Trade   |       30 |              2.1 |      1001 |         1 |
|   2000 | E-Trade   |       30 |              2.1 |      1002 |         2 |
|   2000 | Budweiser |       30 |              2.1 |      1003 |         3 |
|   2000 | Bud Light |       30 |              2.1 |      1004 |         4 |
|   2000 | Budweiser |       30 |              2.1 |      1005 |         5 |
|   2000 | Bud Light |       30 |              2.1 |      1006 |         6 |
|   2000 | Budweiser |       60 |              4.2 |      1007 |         7 |
|   2000 | Budweiser |       60 |              4.2 |      1008 |         8 |
|   2001 | Bud Light |       30 |              2.1 |      1009 |         9 |
|   2001 | Budweiser |       30 |              2.1 |      1010 |        10 |


Table: data_dictionary
| Field                 | Description                                                                                                                                                                                                                                                              |
|:----------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Year                  | Year the spot aired, according to superbowl-ads.com                                                                                                                                                                                                                      |
| Brand                 | Brand of advertiser                                                                                                                                                                                                                                                      |
| Superbowl Ads Link    | Link to superbowl-ads.com entry for this ad                                                                                                                                                                                                                              |
| YouTube Link          | Link to a YouTube video for this ad (if this field is blank, it means no YouTube video was found)                                                                                                                                                                        |
| Funny                 | Was it trying to be funny? Is the ad jokey, goofy, weird or silly? Funny commercials (or ones that are trying to be funny) are marked TRUE. Anything serious or dramatic is marked FALSE.                                                                                |
| Shows Product Quickly | Did it show the product right away? Can you tell what is being advertised within the first 10 seconds of the commercial? If you can see the product or brand name on the screen, that counts.                                                                            |
| Patriotic             | Was it patriotic? Did the commercial make a patriotic appeal, either clear or subtle, or include American imagery? Any glimpses of an American flag or the words "America" or "United States" counted, as did references to the armed forces, manufacturing and farming. |
| Celebrity             | Did it feature a celebrity? If we saw a celebrity we recognized, we checked this one off.                                                                                                                                                                                |
| Danger                | Did it involve danger? Did we see any violence, threats of violence, injuries, fighting or guns? Any allusions to death or hokey injuries also counted here.                                                                                                             |
| Animals               | Did it include animals? Did an animal — either real or computer-generated — show up at any point in the ad? Even one-frame appearances counted.                                                                                                                          |


Table: date_table
|   date |
|-------:|
|   2000 |
|   2001 |
|   2002 |
|   2003 |
|   2004 |
|   2005 |
|   2006 |
|   2007 |
|   2008 |
|   2009 |


Table: engagment
| Superbowl Ads Link                                            | Youtube Link                                |   Length |   Estimated Cost |   Youtube Views |   Youtube Likes |   TV Viewers |   Engagement Key | Ad Name                            |
|:--------------------------------------------------------------|:--------------------------------------------|---------:|-----------------:|----------------:|----------------:|-------------:|-----------------:|:-----------------------------------|
| https://superbowl-ads.com/2000-etrade-monkey-dance/           | https://www.youtube.com/watch?v=Muyq2kMDFoA |       30 |              2.1 |           13615 |              84 |        88.47 |                1 | 2000-Etrade-Monkey-Dance           |
| https://superbowl-ads.com/2000-etrade-money-out-of-the-wazoo/ | https://www.youtube.com/watch?v=oftjwYmlfoA |       30 |              2.1 |           72772 |             146 |        88.47 |                2 | 2000-Etrade-Money-Out-Of-The-Wazoo |
| https://superbowl-ads.com/2000-budweiser-whaasup-game/        | https://www.youtube.com/watch?v=loimTUjV92Q |       30 |              2.1 |            5399 |              11 |        88.47 |                3 | 2000-Budweiser-Whaasup-Game        |
| https://superbowl-ads.com/2000-bud-light-hold-the-door/       | https://www.youtube.com/watch?v=M3IV93HwSkc |       30 |              2.1 |            6699 |               8 |        88.47 |                4 | 2000-Bud-Light-Hold-The-Door       |
| https://superbowl-ads.com/2000-budweiser-talking-dog/         | https://www.youtube.com/watch?v=dK1tlG778J8 |       30 |              2.1 |           18972 |               6 |        88.47 |                5 | 2000-Budweiser-Talking-Dog         |
| https://superbowl-ads.com/2000-bud-light-she-has-a-cat/       | https://www.youtube.com/watch?v=drE6cpCB6Po |       30 |              2.1 |             146 |               3 |        88.47 |                6 | 2000-Bud-Light-She-Has-A-Cat       |
| https://superbowl-ads.com/2000-budweiser-whaasup/             | https://www.youtube.com/watch?v=JJmqCKtJnxM |       60 |              4.2 |         4047977 |           31000 |        88.47 |                7 | 2000-Budweiser-Whaasup             |
| https://superbowl-ads.com/2000-budweiser-rex/                 | https://www.youtube.com/watch?v=GgXsLHifz9k |       60 |              4.2 |          112246 |             163 |        88.47 |                8 | 2000-Budweiser-Rex                 |
| https://superbowl-ads.com/2001-bud-light-otto/                | https://www.youtube.com/watch?v=XJEYIR-Cai4 |       30 |              2.1 |            3613 |              10 |        84.34 |                9 | 2001-Bud-Light-Otto                |
| https://superbowl-ads.com/2001-budweiser-what-are-you-doing/  | https://www.youtube.com/watch?v=gtmJEt0w1k4 |       30 |              2.1 |           58606 |             212 |        84.34 |               10 | 2001-Budweiser-What-Are-You-Doing  |

 


tables: name: brand
data: brand.csv
name: characteristics
data: characteristics.csv
name: commercials_fact
data: commercials_fact.csv
name: data_dictionary
data: data_dictionary.csv
name: date_table
data: date_table.csv
name: engagment
data: engagment.csv
label: characteristics
Cat Key
commercials_fact
Cat Key
commercials_fact
Year
date_table
date
commercials_fact
Brand
brand
Brand
commercials_fact
Eng Key
engagment
Engagement Key
output: {
    "joins": [
        {
            "from_table": "characteristics",
            "from_column": "Cat Key",
            "to_table": "commercials_fact",
            "to_column": "Cat Key"
        },
        {
            "from_table": "commercials_fact",
            "from_column": "Year",
            "to_table": "date_table",
            "to_column": "date"
        },
        {
            "from_table": "commercials_fact",
            "from_column": "Brand",
            "to_table": "brand",
            "to_column": "Brand"
        },
        {
            "from_table": "commercials_fact",
            "from_column": "Eng Key",
            "to_table": "engagment",
            "to_column": "Engagement Key"
        }
    ]
}