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: Calendar
| Date                    |
|:------------------------|
| 2010-01-01 00:00:00.000 |
| 2010-01-02 00:00:00.000 |
| 2010-01-03 00:00:00.000 |
| 2010-01-04 00:00:00.000 |
| 2010-01-05 00:00:00.000 |
| 2010-01-06 00:00:00.000 |
| 2010-01-07 00:00:00.000 |
| 2010-01-08 00:00:00.000 |
| 2010-01-09 00:00:00.000 |
| 2010-01-10 00:00:00.000 |


Table: CurrentSales
| Date                    |   Quantity |
|:------------------------|-----------:|
| 2019-01-01 00:00:00.000 |          3 |
| 2019-01-04 00:00:00.000 |          3 |
| 2019-01-07 00:00:00.000 |          3 |
| 2019-01-09 00:00:00.000 |          3 |
| 2019-01-11 00:00:00.000 |          3 |
| 2019-01-13 00:00:00.000 |          3 |
| 2019-01-17 00:00:00.000 |          3 |
| 2019-01-18 00:00:00.000 |          3 |
| 2019-01-20 00:00:00.000 |          3 |
| 2019-01-21 00:00:00.000 |          3 |


Table: CurrentYear
| Date                    |
|:------------------------|
| 2019-01-01 00:00:00.000 |
| 2019-01-02 00:00:00.000 |
| 2019-01-03 00:00:00.000 |
| 2019-01-04 00:00:00.000 |
| 2019-01-05 00:00:00.000 |
| 2019-01-06 00:00:00.000 |
| 2019-01-07 00:00:00.000 |
| 2019-01-08 00:00:00.000 |
| 2019-01-09 00:00:00.000 |
| 2019-01-10 00:00:00.000 |


Table: Customer
|   CustomerKey | MaritalStatus   | Gender   | Education       | Country       |   Sales Column |   Sales Measure |
|--------------:|:----------------|:---------|:----------------|:--------------|---------------:|----------------:|
|         11016 | M               | M        | Partial College | United States |        2332.28 |         2332.28 |
|         11022 | M               | M        | Partial College | United States |        2322.28 |         2322.28 |
|         11023 | M               | M        | Partial College | United States |         122.24 |          122.24 |
|         11024 | M               | M        | Partial College | United States |          56.51 |           56.51 |
|         11040 | M               | M        | Partial College | United States |        2350.96 |         2350.96 |
|         11043 | M               | M        | Partial College | United States |          47.98 |           47.98 |
|         11086 | M               | M        | Partial College | United States |         153.45 |          153.45 |
|         11163 | M               | M        | Partial College | United States |          46.27 |           46.27 |
|         11206 | M               | M        | Partial College | United States |          77.27 |           77.27 |
|         11210 | M               | M        | Partial College | United States |          70.76 |           70.76 |


Table: DGMonth
|   DGMonth |
|----------:|
|       -12 |
|       -11 |
|       -10 |
|        -9 |
|        -8 |
|        -7 |
|        -6 |
|        -5 |
|        -4 |
|        -3 |


Table: Indicators
|   ID | Indicator   |
|-----:|:------------|
|    1 | Quantity    |
|    2 | Sales       |
|    3 | Profit %    |


Table: Month
|   Month |
|--------:|
|     -12 |
|     -11 |
|     -10 |
|      -9 |
|      -8 |
|      -7 |
|      -6 |
|      -5 |
|      -4 |
|      -3 |


Table: Product
|   ProductKey | Product               | Color   | ListPrice   |
|-------------:|:----------------------|:--------|:------------|
|            1 | Adjustable Race       | NA      |             |
|            2 | Bearing Ball          | NA      |             |
|            3 | BB Ball Bearing       | NA      |             |
|            4 | Headset Ball Bearings | NA      |             |
|            5 | Blade                 | NA      |             |
|           12 | Crown Race            | NA      |             |
|           13 | Chain Stays           | NA      |             |
|           14 | Decal 1               | NA      |             |
|           15 | Decal 2               | NA      |             |
|           16 | Down Tube             | NA      |             |


Table: Sales
|   ProductKey |   CustomerKey |   Quantity |   UnitPrice |   TotalProductCost | OrderDate               |   Sales |   Profit |   Profit% |
|-------------:|--------------:|-----------:|------------:|-------------------:|:------------------------|--------:|---------:|----------:|
|          477 |         11245 |          1 |        4.99 |             1.8663 | 2012-12-28 00:00:00.000 |    4.99 |   3.1237 |   1.59746 |
|          477 |         16313 |          1 |        4.99 |             1.8663 | 2012-12-28 00:00:00.000 |    4.99 |   3.1237 |   1.59746 |
|          477 |         12390 |          1 |        4.99 |             1.8663 | 2012-12-29 00:00:00.000 |    4.99 |   3.1237 |   1.59746 |
|          477 |         18906 |          1 |        4.99 |             1.8663 | 2012-12-29 00:00:00.000 |    4.99 |   3.1237 |   1.59746 |
|          477 |         11448 |          1 |        4.99 |             1.8663 | 2012-12-29 00:00:00.000 |    4.99 |   3.1237 |   1.59746 |
|          477 |         11006 |          1 |        4.99 |             1.8663 | 2012-12-29 00:00:00.000 |    4.99 |   3.1237 |   1.59746 |
|          477 |         21440 |          1 |        4.99 |             1.8663 | 2012-12-29 00:00:00.000 |    4.99 |   3.1237 |   1.59746 |
|          477 |         18208 |          1 |        4.99 |             1.8663 | 2012-12-30 00:00:00.000 |    4.99 |   3.1237 |   1.59746 |
|          477 |         11240 |          1 |        4.99 |             1.8663 | 2012-12-30 00:00:00.000 |    4.99 |   3.1237 |   1.59746 |
|          477 |         11400 |          1 |        4.99 |             1.8663 | 2012-12-30 00:00:00.000 |    4.99 |   3.1237 |   1.59746 |

 


tables: name: Calendar
data: Calendar.csv
name: CurrentSales
data: CurrentSales.csv
name: CurrentYear
data: CurrentYear.csv
name: Customer
data: Customer.csv
name: DGMonth
data: DGMonth.csv
name: Indicators
data: Indicators.csv
name: Month
data: Month.csv
name: Product
data: Product.csv
name: Sales
data: Sales.csv
label: Sales
CustomerKey
Customer
CustomerKey
Sales
ProductKey
Product
ProductKey
CurrentSales
Date
CurrentYear
Date
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "CustomerKey",
            "to_table": "Customer",
            "to_column": "CustomerKey"
        },
        {
            "from_table": "Sales",
            "from_column": "ProductKey",
            "to_table": "Product",
            "to_column": "ProductKey"
        },
        {
            "from_table": "CurrentSales",
            "from_column": "Date",
            "to_table": "CurrentYear",
            "to_column": "Date"
        }
    ]
}