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: Date
| Date                    | Month Name   |   Month Number | Weekday   |   Weekday number |   Quarter |   Year | Year Month              |   Year Month num | Year-Quarter   |
|:------------------------|:-------------|---------------:|:----------|-----------------:|----------:|-------:|:------------------------|-----------------:|:---------------|
| 2016-01-01 00:00:00.000 | January      |              1 | Friday    |                6 |         1 |   2016 | 2016-01-01 00:00:00.000 |           201601 | 2016-1         |
| 2016-01-02 00:00:00.000 | January      |              1 | Saturday  |                7 |         1 |   2016 | 2016-01-01 00:00:00.000 |           201601 | 2016-1         |
| 2016-01-03 00:00:00.000 | January      |              1 | Sunday    |                1 |         1 |   2016 | 2016-01-01 00:00:00.000 |           201601 | 2016-1         |
| 2016-01-04 00:00:00.000 | January      |              1 | Monday    |                2 |         1 |   2016 | 2016-01-01 00:00:00.000 |           201601 | 2016-1         |
| 2016-01-05 00:00:00.000 | January      |              1 | Tuesday   |                3 |         1 |   2016 | 2016-01-01 00:00:00.000 |           201601 | 2016-1         |
| 2016-01-06 00:00:00.000 | January      |              1 | Wednesday |                4 |         1 |   2016 | 2016-01-01 00:00:00.000 |           201601 | 2016-1         |
| 2016-01-07 00:00:00.000 | January      |              1 | Thursday  |                5 |         1 |   2016 | 2016-01-01 00:00:00.000 |           201601 | 2016-1         |
| 2016-01-08 00:00:00.000 | January      |              1 | Friday    |                6 |         1 |   2016 | 2016-01-01 00:00:00.000 |           201601 | 2016-1         |
| 2016-01-09 00:00:00.000 | January      |              1 | Saturday  |                7 |         1 |   2016 | 2016-01-01 00:00:00.000 |           201601 | 2016-1         |
| 2016-01-10 00:00:00.000 | January      |              1 | Sunday    |                1 |         1 |   2016 | 2016-01-01 00:00:00.000 |           201601 | 2016-1         |


Table: Geo
| IDCity   | City          | Country   | Sub Continent   | Continent   | Flag                                                                                         |
|:---------|:--------------|:----------|:----------------|:------------|:---------------------------------------------------------------------------------------------|
| Par      | Paris         | France    | South Europe    | Europe      | https://cdn3.iconfinder.com/data/icons/finalflags/256/Saint-Barthelemy-Flag.png              |
| Cph      | Copenhagen    | Denmark   | Northern Europe | Europe      | https://cdn3.iconfinder.com/data/icons/finalflags/256/Denmark-Flag.png                       |
| NY       | New York      | USA       | North Americas  | Americas    | https://cdn3.iconfinder.com/data/icons/finalflags/256/United-States-Flag.png                 |
| SF       | San Francisco | USA       | North Americas  | Americas    | https://cdn3.iconfinder.com/data/icons/finalflags/256/United-States-Flag.png                 |
| Mon      | Montreal      | Canada    | North Americas  | Americas    | https://cdn3.iconfinder.com/data/icons/finalflags/256/Canada-Flag.png                        |
| Vanc     | Vancouver     | Canada    | North Americas  | Americas    | https://cdn3.iconfinder.com/data/icons/finalflags/256/Canada-Flag.png                        |
| Han      | Hanoi         | Vietnam   | Southern Asia   | Asia        | https://cdn3.iconfinder.com/data/icons/finalflags/256/Vietnam-Flag.png                       |
| HK       | Hong Kong     | Hong-Kong | Southern Asia   | Asia        | https://cdn1.iconfinder.com/data/icons/ensign-11/512/113_Ensign_Flag_Nation_hongkong-512.png |
| Sing     | Singapore     | Singapore | Southern Asia   | Asia        | https://cdn3.iconfinder.com/data/icons/finalflags/256/Singapore-Flag.png                     |
| Lon      | London        | UK        | Northern Europe | Europe      | https://cdn3.iconfinder.com/data/icons/finalflags/256/United-Kingdom-flag.png                |


Table: Products
| Code   | Product Name   | Product Category   |   List Price |
|:-------|:---------------|:-------------------|-------------:|
| P1     | Shoes          | Clothes            |         1600 |
| P2     | Jeans          | Clothes            |         1650 |
| P3     | T Shirt        | Clothes            |         1700 |
| P4     | Chocolate      | Food               |         2000 |
| P5     | Chips          | Food               |         1750 |
| P6     | Wine           | Alcohol            |         1900 |
| P7     | Rhum           | Alcohol            |         2050 |
| P8     | Whisky         | Alcohol            |         1950 |


Table: Sales Figuresall_location
| Product ID   | Order Date              | Payment Date            |   Quantity |   Sales Amount | LocationID   |   Products.List Price |   ListPrice_Quantity |   Days between |   Year of payment |
|:-------------|:------------------------|:------------------------|-----------:|---------------:|:-------------|----------------------:|---------------------:|---------------:|------------------:|
| P6           | 2016-01-25 00:00:00.000 | 2016-02-08 00:00:00.000 |         15 |          83748 | SF           |                  1900 |                28500 |             14 |              2016 |
| P6           | 2016-02-07 00:00:00.000 | 2016-02-12 00:00:00.000 |         15 |          68169 | SF           |                  1900 |                28500 |              5 |              2016 |
| P6           | 2016-02-20 00:00:00.000 | 2016-03-05 00:00:00.000 |         15 |          63347 | SF           |                  1900 |                28500 |             14 |              2016 |
| P6           | 2016-02-24 00:00:00.000 | 2016-03-04 00:00:00.000 |         15 |          50734 | SF           |                  1900 |                28500 |              9 |              2016 |
| P6           | 2016-02-26 00:00:00.000 | 2016-03-04 00:00:00.000 |         15 |          63875 | SF           |                  1900 |                28500 |              7 |              2016 |
| P6           | 2016-03-09 00:00:00.000 | 2016-03-18 00:00:00.000 |         15 |          68476 | SF           |                  1900 |                28500 |              9 |              2016 |
| P6           | 2016-03-28 00:00:00.000 | 2016-04-11 00:00:00.000 |         15 |          61524 | SF           |                  1900 |                28500 |             14 |              2016 |
| P6           | 2016-03-30 00:00:00.000 | 2016-04-10 00:00:00.000 |         15 |          83507 | SF           |                  1900 |                28500 |             11 |              2016 |
| P6           | 2016-04-13 00:00:00.000 | 2016-04-23 00:00:00.000 |         15 |          65467 | SF           |                  1900 |                28500 |             10 |              2016 |
| P6           | 2016-04-15 00:00:00.000 | 2016-04-29 00:00:00.000 |         15 |          57177 | SF           |                  1900 |                28500 |             14 |              2016 |

 


tables: name: Date
data: Date.csv
name: Geo
data: Geo.csv
name: Products
data: Products.csv
name: Sales Figuresall_location
data: Sales Figuresall_location.csv
label: Sales Figuresall_location
LocationID
Geo
IDCity
Sales Figuresall_location
Product ID
Products
Code
output: {
    "joins": [
        {
            "from_table": "Sales Figuresall_location",
            "from_column": "LocationID",
            "to_table": "Geo",
            "to_column": "IDCity"
        },
        {
            "from_table": "Sales Figuresall_location",
            "from_column": "Product ID",
            "to_table": "Products",
            "to_column": "Code"
        }
    ]
}