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: Customer
|   CustomerKey | Customer           | BusinessType     | CityName       | StateName         | StateCode   | Region    | CurrentSupervisor      |   TotalQuantityCustomer | Customer Segment   |
|--------------:|:-------------------|:-----------------|:---------------|:------------------|:------------|:----------|:-----------------------|------------------------:|:-------------------|
|           213 | Primal Fitness     | Gym              | Santos         | São Paulo         | SP          | Southeast | Armando Marmou Gabeira |                     106 | Good               |
|           411 | Olympia Department | Warehouse        | Manaus         | Amazonas          | AM          | North     | Xavier Gaspar Valverde |                       5 | Bad                |
|           159 | Bolado's Academia  | Gym              | Salvador       | Bahia             | BA          | Northeast | Xavier Gaspar Valverde |                      14 | Bad                |
|           519 | Gym Hero           | Gym              | Belo Horizonte | Minas Gerais      | MG          | Southeast | Armando Marmou Gabeira |                     250 | Good               |
|            87 | Brute Warehouse    | Warehouse        | Curitiba       | Paraná            | PR          | South     | Joseph Pinho Protásio  |                     212 | Good               |
|           141 | Monster GYM        | Gym              | São Paulo      | São Paulo         | SP          | Southeast | Armando Marmou Gabeira |                     122 | Good               |
|           357 | Insight Sports     | Warehouse        | Campinas       | São Paulo         | SP          | Southeast | Armando Marmou Gabeira |                       7 | Bad                |
|           339 | Bulk Sports        | Warehouse        | São Luís       | Maranhão          | MA          | Northeast | Xavier Gaspar Valverde |                       1 | Bad                |
|           321 | Monster Nutrition  | Supplement Store | São Luís       | Maranhão          | MA          | Northeast | Xavier Gaspar Valverde |                       3 | Bad                |
|           393 | Ability Sports     | Warehouse        | Porto Alegre   | Rio Grande do Sul | RS          | South     | Joseph Pinho Protásio  |                     238 | Good               |


Table: Date
| Date                    |   Year |   Month | Month Name   |   Day |   Day of Week | Day Name   | Holiday   | Working Day   | Month Year   |   MonthYearNo | Month Short   |
|:------------------------|-------:|--------:|:-------------|------:|--------------:|:-----------|:----------|:--------------|:-------------|--------------:|:--------------|
| 2013-01-02 00:00:00.000 |   2013 |       1 | January      |     2 |             3 | Wednesday  |           | Yes           | Jan 2013     |        201301 | Jan           |
| 2013-01-03 00:00:00.000 |   2013 |       1 | January      |     3 |             4 | Thursday   |           | Yes           | Jan 2013     |        201301 | Jan           |
| 2013-01-04 00:00:00.000 |   2013 |       1 | January      |     4 |             5 | Friday     |           | Yes           | Jan 2013     |        201301 | Jan           |
| 2013-01-07 00:00:00.000 |   2013 |       1 | January      |     7 |             1 | Monday     |           | Yes           | Jan 2013     |        201301 | Jan           |
| 2013-01-08 00:00:00.000 |   2013 |       1 | January      |     8 |             2 | Tuesday    |           | Yes           | Jan 2013     |        201301 | Jan           |
| 2013-01-09 00:00:00.000 |   2013 |       1 | January      |     9 |             3 | Wednesday  |           | Yes           | Jan 2013     |        201301 | Jan           |
| 2013-01-10 00:00:00.000 |   2013 |       1 | January      |    10 |             4 | Thursday   |           | Yes           | Jan 2013     |        201301 | Jan           |
| 2013-01-11 00:00:00.000 |   2013 |       1 | January      |    11 |             5 | Friday     |           | Yes           | Jan 2013     |        201301 | Jan           |
| 2013-01-14 00:00:00.000 |   2013 |       1 | January      |    14 |             1 | Monday     |           | Yes           | Jan 2013     |        201301 | Jan           |
| 2013-01-15 00:00:00.000 |   2013 |       1 | January      |    15 |             2 | Tuesday    |           | Yes           | Jan 2013     |        201301 | Jan           |


Table: Key Measures



Table: Product
|   ProductKey | ProductName              | SubcategoryName   | ProductSize   | ProductDetail   | CategoryName   |
|-------------:|:-------------------------|:------------------|:--------------|:----------------|:---------------|
|          559 | Alpha Amino              | BCAA              | 90 Servings   | NA              | Amino Acids    |
|          465 | Half-Finger Gloves       | Gloves            | M             | Black           | Clothing       |
|          552 | Essential AmiN.O. Energy | BCAA              | 65 Servings   | NA              | Amino Acids    |
|          603 | ONE                      | Meal Replacement  | 36 oz         | Natural         | Carbs          |
|          572 | Hydrolyzed Whey Protein  | Whey Protein      | 1lbs          | Peanut Butter   | Protein        |
|          586 | Hydrolyzed Whey Protein  | Whey Protein      | 1lbs          | Cookies         | Protein        |
|          568 | Hydrolyzed Whey Protein  | Whey Protein      | 1lbs          | Vanilla         | Protein        |
|          579 | Hydrolyzed Whey Protein  | Whey Protein      | 2lbs          | Capuccino       | Protein        |
|          560 | Hydrolyzed Whey Protein  | Whey Protein      | 2lbs          | Strawberry      | Protein        |
|          561 | 100% Egg Protein         | Egg Protein       | 5lbs          | Peanut Butter   | Protein        |


Table: Sales
| OrderDate               | DueDate                 | ShipDate                | SalesOrderNumber   |   CustomerKey |   ProductKey |   OrderQuantity |   UnitPrice |   StandardCost |   Discount % |
|:------------------------|:------------------------|:------------------------|:-------------------|--------------:|-------------:|----------------:|------------:|---------------:|-------------:|
| 2013-01-28 00:00:00.000 | 2013-02-09 00:00:00.000 | 2013-02-04 00:00:00.000 | SO51806            |           519 |          573 |               1 |     1430.44 |        714.01  |       0.1114 |
| 2013-01-28 00:00:00.000 | 2013-02-09 00:00:00.000 | 2013-02-04 00:00:00.000 | SO51814            |            87 |          575 |               1 |     1430.44 |        715.225 |       0.1815 |
| 2013-02-28 00:00:00.000 | 2013-03-12 00:00:00.000 | 2013-03-07 00:00:00.000 | SO53468            |           688 |          574 |               1 |     1430.44 |        715.225 |       0.1375 |
| 2013-02-28 00:00:00.000 | 2013-03-12 00:00:00.000 | 2013-03-07 00:00:00.000 | SO53468            |           688 |          575 |               1 |     1430.44 |        715.225 |       0.1375 |
| 2013-02-28 00:00:00.000 | 2013-03-12 00:00:00.000 | 2013-03-07 00:00:00.000 | SO53541            |           249 |          573 |               1 |     1430.44 |        714.01  |       0.1579 |
| 2013-02-28 00:00:00.000 | 2013-03-12 00:00:00.000 | 2013-03-07 00:00:00.000 | SO53541            |           249 |          576 |               1 |     1430.44 |        713.67  |       0.1579 |
| 2013-02-28 00:00:00.000 | 2013-03-12 00:00:00.000 | 2013-03-07 00:00:00.000 | SO53565            |           267 |          575 |               1 |     1430.44 |        715.225 |       0.1836 |
| 2013-03-30 00:00:00.000 | 2013-04-11 00:00:00.000 | 2013-04-06 00:00:00.000 | SO55244            |           634 |          561 |               1 |     1430.44 |        652.33  |       0.0985 |
| 2013-03-30 00:00:00.000 | 2013-04-11 00:00:00.000 | 2013-04-06 00:00:00.000 | SO55244            |           634 |          576 |               1 |     1430.44 |        713.67  |       0.0985 |
| 2013-03-30 00:00:00.000 | 2013-04-11 00:00:00.000 | 2013-04-06 00:00:00.000 | SO55258            |           123 |          561 |               1 |     1430.44 |        652.33  |       0.235  |


Table: Target
| Month                   | Region      |   Target |
|:------------------------|:------------|---------:|
| 2013-01-01 00:00:00.000 | Center-West |     0    |
| 2013-02-01 00:00:00.000 | Center-West |   223.16 |
| 2013-03-01 00:00:00.000 | Center-West |   263.94 |
| 2013-04-01 00:00:00.000 | Center-West |     0    |
| 2013-05-01 00:00:00.000 | Center-West |   557.9  |
| 2013-06-01 00:00:00.000 | Center-West |   527.88 |
| 2013-07-01 00:00:00.000 | Center-West |     0    |
| 2013-08-01 00:00:00.000 | Center-West |   892.64 |
| 2013-09-01 00:00:00.000 | Center-West |   791.82 |
| 2013-10-01 00:00:00.000 | Center-West |     0    |

 


tables: name: Customer
data: Customer.csv
name: Date
data: Date.csv
name: Key Measures
data: Key Measures.csv
name: Product
data: Product.csv
name: Sales
data: Sales.csv
name: Target
data: Target.csv
label: Sales
ProductKey
Product
ProductKey
Sales
CustomerKey
Customer
CustomerKey
Target
Region
Customer
Region
Sales
OrderDate
Date
Date
Target
Month
Date
Date
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "ProductKey",
            "to_table": "Product",
            "to_column": "ProductKey"
        },
        {
            "from_table": "Sales",
            "from_column": "CustomerKey",
            "to_table": "Customer",
            "to_column": "CustomerKey"
        },
        {
            "from_table": "Target",
            "from_column": "Region",
            "to_table": "Customer",
            "to_column": "Region"
        },
        {
            "from_table": "Sales",
            "from_column": "OrderDate",
            "to_table": "Date",
            "to_column": "Date"
        },
        {
            "from_table": "Target",
            "from_column": "Month",
            "to_table": "Date",
            "to_column": "Date"
        }
    ]
}