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 ID   | Customer          | City    | State-Province   | Country-Region   |   Postal Code |
|--------------:|:--------------|:------------------|:--------|:-----------------|:-----------------|--------------:|
|         11024 | AW00011024    | Russell Xie       | Concord | California       | United States    |         94519 |
|         11081 | AW00011081    | Savannah Baker    | Concord | California       | United States    |         94519 |
|         11160 | AW00011160    | Maurice Tang      | Concord | California       | United States    |         94519 |
|         11161 | AW00011161    | Emily Wood        | Concord | California       | United States    |         94519 |
|         11184 | AW00011184    | Meghan Hernandez  | Concord | California       | United States    |         94519 |
|         11295 | AW00011295    | Taylor Lewis      | Concord | California       | United States    |         94519 |
|         11329 | AW00011329    | Andy Alvarez      | Concord | California       | United States    |         94519 |
|         11499 | AW00011499    | Pedro Vance       | Concord | California       | United States    |         94519 |
|         11539 | AW00011539    | Justin Washington | Concord | California       | United States    |         94519 |
|         11655 | AW00011655    | Tamara Sharma     | Concord | California       | United States    |         94519 |


Table: Date
|   DateKey | Date                    | Fiscal Year   | Fiscal Quarter   | Month    |   MonthKey | Full Date    |
|----------:|:------------------------|:--------------|:-----------------|:---------|-----------:|:-------------|
|  20190701 | 2019-07-01 00:00:00.000 | FY2020        | FY2020 Q1        | 2019 Jul |     201907 | 2019 Jul, 01 |
|  20190702 | 2019-07-02 00:00:00.000 | FY2020        | FY2020 Q1        | 2019 Jul |     201907 | 2019 Jul, 02 |
|  20190703 | 2019-07-03 00:00:00.000 | FY2020        | FY2020 Q1        | 2019 Jul |     201907 | 2019 Jul, 03 |
|  20190704 | 2019-07-04 00:00:00.000 | FY2020        | FY2020 Q1        | 2019 Jul |     201907 | 2019 Jul, 04 |
|  20190705 | 2019-07-05 00:00:00.000 | FY2020        | FY2020 Q1        | 2019 Jul |     201907 | 2019 Jul, 05 |
|  20190706 | 2019-07-06 00:00:00.000 | FY2020        | FY2020 Q1        | 2019 Jul |     201907 | 2019 Jul, 06 |
|  20190707 | 2019-07-07 00:00:00.000 | FY2020        | FY2020 Q1        | 2019 Jul |     201907 | 2019 Jul, 07 |
|  20190708 | 2019-07-08 00:00:00.000 | FY2020        | FY2020 Q1        | 2019 Jul |     201907 | 2019 Jul, 08 |
|  20190709 | 2019-07-09 00:00:00.000 | FY2020        | FY2020 Q1        | 2019 Jul |     201907 | 2019 Jul, 09 |
|  20190710 | 2019-07-10 00:00:00.000 | FY2020        | FY2020 Q1        | 2019 Jul |     201907 | 2019 Jul, 10 |


Table: Product
|   ProductKey | Product                   |   Standard Cost | Color   |   List Price | Model         | Subcategory   | Category    | SKU        |
|-------------:|:--------------------------|----------------:|:--------|-------------:|:--------------|:--------------|:------------|:-----------|
|          210 | HL Road Frame - Black, 58 |        868.634  | Black   |    1431.5    | HL Road Frame | Road Frames   | Components  | FR-R92B-58 |
|          215 | Sport-100 Helmet, Black   |         12.0278 | Black   |      33.6442 | Sport-100     | Helmets       | Accessories | HL-U509    |
|          216 | Sport-100 Helmet, Black   |         13.8782 | Black   |      33.6442 | Sport-100     | Helmets       | Accessories | HL-U509    |
|          217 | Sport-100 Helmet, Black   |         13.0863 | Black   |      34.99   | Sport-100     | Helmets       | Accessories | HL-U509    |
|          253 | LL Road Frame - Black, 58 |        176.2    | Black   |     297.635  | LL Road Frame | Road Frames   | Components  | FR-R38B-58 |
|          254 | LL Road Frame - Black, 58 |        170.143  | Black   |     306.564  | LL Road Frame | Road Frames   | Components  | FR-R38B-58 |
|          255 | LL Road Frame - Black, 58 |        204.625  | Black   |     337.22   | LL Road Frame | Road Frames   | Components  | FR-R38B-58 |
|          256 | LL Road Frame - Black, 60 |        176.2    | Black   |     297.635  | LL Road Frame | Road Frames   | Components  | FR-R38B-60 |
|          257 | LL Road Frame - Black, 60 |        170.143  | Black   |     306.564  | LL Road Frame | Road Frames   | Components  | FR-R38B-60 |
|          258 | LL Road Frame - Black, 60 |        204.625  | Black   |     337.22   | LL Road Frame | Road Frames   | Components  | FR-R38B-60 |


Table: Reseller
|   ResellerKey | Business Type        | Reseller                        | City         | State-Province   | Country-Region   |   Postal Code | Reseller ID   |
|--------------:|:---------------------|:--------------------------------|:-------------|:-----------------|:-----------------|--------------:|:--------------|
|           277 | Specialty Bike Shop  | The Bicycle Accessories Company | Alhambra     | California       | United States    |         91801 | AW00000277    |
|           455 | Value Added Reseller | Timely Shipping Service         | Alpine       | California       | United States    |         91901 | AW00000455    |
|           609 | Value Added Reseller | Good Toys                       | Auburn       | California       | United States    |         95603 | AW00000609    |
|           492 | Specialty Bike Shop  | Basic Sports Equipment          | Baldwin Park | California       | United States    |         91706 | AW00000492    |
|           365 | Specialty Bike Shop  | Distinctive Store               | Barstow      | California       | United States    |         92311 | AW00000365    |
|           168 | Specialty Bike Shop  | Economy Bikes Company           | Bell Gardens | California       | United States    |         90201 | AW00000168    |
|             6 | Warehouse            | Aerobic Exercise Company        | Camarillo    | California       | United States    |         93010 | AW00000006    |
|           402 | Warehouse            | Pro Sporting Goods              | Camarillo    | California       | United States    |         93010 | AW00000402    |
|           529 | Warehouse            | Big-Time Bike Store             | Camarillo    | California       | United States    |         93010 | AW00000529    |
|           241 | Specialty Bike Shop  | Vale Riding Supplies            | Canoga Park  | California       | United States    |         91303 | AW00000241    |


Table: Sales Order
|   SalesOrderLineKey | Sales Order   | Sales Order Line   | Channel   |
|--------------------:|:--------------|:-------------------|:----------|
|            53465001 | SO53465       | SO53465 - 01       | Reseller  |
|            53465002 | SO53465       | SO53465 - 02       | Reseller  |
|            53465003 | SO53465       | SO53465 - 03       | Reseller  |
|            53465004 | SO53465       | SO53465 - 04       | Reseller  |
|            53465005 | SO53465       | SO53465 - 05       | Reseller  |
|            53465006 | SO53465       | SO53465 - 06       | Reseller  |
|            53465007 | SO53465       | SO53465 - 07       | Reseller  |
|            53465008 | SO53465       | SO53465 - 08       | Reseller  |
|            53465009 | SO53465       | SO53465 - 09       | Reseller  |
|            53465010 | SO53465       | SO53465 - 10       | Reseller  |


Table: Sales Territory
|   SalesTerritoryKey | Region         | Country        | Group         |
|--------------------:|:---------------|:---------------|:--------------|
|                   1 | Northwest      | United States  | North America |
|                   2 | Northeast      | United States  | North America |
|                   3 | Central        | United States  | North America |
|                   4 | Southwest      | United States  | North America |
|                   5 | Southeast      | United States  | North America |
|                   6 | Canada         | Canada         | North America |
|                   7 | France         | France         | Europe        |
|                   8 | Germany        | Germany        | Europe        |
|                   9 | Australia      | Australia      | Pacific       |
|                  10 | United Kingdom | United Kingdom | Europe        |


Table: Sales
|   SalesOrderLineKey |   ResellerKey |   CustomerKey |   ProductKey |   OrderDateKey |   DueDateKey |   ShipDateKey |   SalesTerritoryKey |   Order Quantity |   Unit Price |   Extended Amount |   Product Standard Cost |   Total Product Cost |   Sales Amount |   Unit Price Discount Pct |
|--------------------:|--------------:|--------------:|-------------:|---------------:|-------------:|--------------:|--------------------:|-----------------:|-------------:|------------------:|------------------------:|---------------------:|---------------:|--------------------------:|
|            46638001 |           203 |            -1 |          333 |       20200718 |     20200728 |      20200725 |                   4 |                2 |      469.794 |           939.588 |                 486.707 |              973.413 |        939.588 |                         0 |
|            46638002 |           203 |            -1 |          325 |       20200718 |     20200728 |      20200725 |                   4 |                2 |      469.794 |           939.588 |                 486.707 |              973.413 |        939.588 |                         0 |
|            46642010 |             4 |            -1 |          321 |       20200720 |     20200730 |      20200727 |                   4 |                2 |      469.794 |           939.588 |                 486.707 |              973.413 |        939.588 |                         0 |
|            46642011 |             4 |            -1 |          323 |       20200720 |     20200730 |      20200727 |                   4 |                2 |      469.794 |           939.588 |                 486.707 |              973.413 |        939.588 |                         0 |
|            46642012 |             4 |            -1 |          325 |       20200720 |     20200730 |      20200727 |                   4 |                2 |      469.794 |           939.588 |                 486.707 |              973.413 |        939.588 |                         0 |
|            46660022 |           166 |            -1 |          321 |       20200726 |     20200805 |      20200802 |                   4 |                2 |      469.794 |           939.588 |                 486.707 |              973.413 |        939.588 |                         0 |
|            46660029 |           166 |            -1 |          331 |       20200726 |     20200805 |      20200802 |                   4 |                2 |      469.794 |           939.588 |                 486.707 |              973.413 |        939.588 |                         0 |
|            46663009 |           292 |            -1 |          323 |       20200727 |     20200806 |      20200803 |                   4 |                2 |      469.794 |           939.588 |                 486.707 |              973.413 |        939.588 |                         0 |
|            46668005 |           221 |            -1 |          335 |       20200729 |     20200808 |      20200805 |                   4 |                2 |      469.794 |           939.588 |                 486.707 |              973.413 |        939.588 |                         0 |
|            46675001 |            41 |            -1 |          329 |       20200731 |     20200810 |      20200807 |                   4 |                2 |      469.794 |           939.588 |                 486.707 |              973.413 |        939.588 |                         0 |

 


tables: name: Customer
data: Customer.csv
name: Date
data: Date.csv
name: Product
data: Product.csv
name: Reseller
data: Reseller.csv
name: Sales Order
data: Sales Order.csv
name: Sales Territory
data: Sales Territory.csv
name: Sales
data: Sales.csv
label: Sales
SalesTerritoryKey
Sales Territory
SalesTerritoryKey
Sales
ProductKey
Product
ProductKey
Sales
SalesOrderLineKey
Sales Order
SalesOrderLineKey
Sales
CustomerKey
Customer
CustomerKey
Sales
OrderDateKey
Date
DateKey
Sales
ResellerKey
Reseller
ResellerKey
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "SalesTerritoryKey",
            "to_table": "Sales Territory",
            "to_column": "SalesTerritoryKey"
        },
        {
            "from_table": "Sales",
            "from_column": "ProductKey",
            "to_table": "Product",
            "to_column": "ProductKey"
        },
        {
            "from_table": "Sales",
            "from_column": "SalesOrderLineKey",
            "to_table": "Sales Order",
            "to_column": "SalesOrderLineKey"
        },
        {
            "from_table": "Sales",
            "from_column": "CustomerKey",
            "to_table": "Customer",
            "to_column": "CustomerKey"
        },
        {
            "from_table": "Sales",
            "from_column": "OrderDateKey",
            "to_table": "Date",
            "to_column": "DateKey"
        },
        {
            "from_table": "Sales",
            "from_column": "ResellerKey",
            "to_table": "Reseller",
            "to_column": "ResellerKey"
        }
    ]
}