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                   | Full Date               |   MonthKey |
|----------:|:------------------------|:--------------|:-----------------|:------------------------|:------------------------|-----------:|
|  20190701 | 2019-07-01 00:00:00.000 | FY2020        | FY2020 Q1        | 2019-07-01 00:00:00.000 | 2019-07-01 00:00:00.000 |     201907 |
|  20190702 | 2019-07-02 00:00:00.000 | FY2020        | FY2020 Q1        | 2019-07-01 00:00:00.000 | 2019-07-02 00:00:00.000 |     201907 |
|  20190703 | 2019-07-03 00:00:00.000 | FY2020        | FY2020 Q1        | 2019-07-01 00:00:00.000 | 2019-07-03 00:00:00.000 |     201907 |
|  20190704 | 2019-07-04 00:00:00.000 | FY2020        | FY2020 Q1        | 2019-07-01 00:00:00.000 | 2019-07-04 00:00:00.000 |     201907 |
|  20190705 | 2019-07-05 00:00:00.000 | FY2020        | FY2020 Q1        | 2019-07-01 00:00:00.000 | 2019-07-05 00:00:00.000 |     201907 |
|  20190706 | 2019-07-06 00:00:00.000 | FY2020        | FY2020 Q1        | 2019-07-01 00:00:00.000 | 2019-07-06 00:00:00.000 |     201907 |
|  20190707 | 2019-07-07 00:00:00.000 | FY2020        | FY2020 Q1        | 2019-07-01 00:00:00.000 | 2019-07-07 00:00:00.000 |     201907 |
|  20190708 | 2019-07-08 00:00:00.000 | FY2020        | FY2020 Q1        | 2019-07-01 00:00:00.000 | 2019-07-08 00:00:00.000 |     201907 |
|  20190709 | 2019-07-09 00:00:00.000 | FY2020        | FY2020 Q1        | 2019-07-01 00:00:00.000 | 2019-07-09 00:00:00.000 |     201907 |
|  20190710 | 2019-07-10 00:00:00.000 | FY2020        | FY2020 Q1        | 2019-07-01 00:00:00.000 | 2019-07-10 00:00:00.000 |     201907 |


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


Table: Reseller
|   ResellerKey | Reseller ID   | Business Type        | Reseller                   | City          | State-Province   | Country-Region   |   Postal Code |
|--------------:|:--------------|:---------------------|:---------------------------|:--------------|:-----------------|:-----------------|--------------:|
|             5 | AW00000005    | Specialty Bike Shop  | Metropolitan Sports Supply | Fremont       | California       | United States    |         94536 |
|             6 | AW00000006    | Warehouse            | Aerobic Exercise Company   | Camarillo     | California       | United States    |         93010 |
|            23 | AW00000023    | Specialty Bike Shop  | Bike World                 | San Ramon     | California       | United States    |         94583 |
|            24 | AW00000024    | Warehouse            | Eastside Department Store  | Union City    | California       | United States    |         94587 |
|            25 | AW00000025    | Value Added Reseller | Coalition Bike Company     | El Segundo    | California       | United States    |         90245 |
|            41 | AW00000041    | Specialty Bike Shop  | Distant Inn                | Milpitas      | California       | United States    |         95035 |
|            42 | AW00000042    | Warehouse            | Healthy Activity Store     | Newport Beach | California       | United States    |         92625 |
|            59 | AW00000059    | Specialty Bike Shop  | Locks Company              | Visalia       | California       | United States    |         93291 |
|            60 | AW00000060    | Warehouse            | Main Bicycle Services      | Hayward       | California       | United States    |         94541 |
|            61 | AW00000061    | Value Added Reseller | Many Bikes Store           | Fullerton     | California       | United States    |         92831 |


Table: Sales
|   SalesOrderLineKey |   ResellerKey |   CustomerKey |   ProductKey |   OrderDateKey |   DueDateKey |   ShipDateKey |   SalesTerritoryKey |   Order Quantity |   Unit Price |   Extended Amount |   Unit Price Discount Pct |   Product Standard Cost |   Total Product Cost |   Sales Amount |
|--------------------:|--------------:|--------------:|-------------:|---------------:|-------------:|--------------:|--------------------:|-----------------:|-------------:|------------------:|--------------------------:|------------------------:|---------------------:|---------------:|
|            43663001 |           510 |            -1 |          322 |       20170707 |     20170717 |      20170714 |                   4 |                1 |      419.459 |           419.459 |                         0 |                 413.146 |              413.146 |        419.459 |
|            43666001 |           511 |            -1 |          330 |       20170709 |     20170719 |      20170716 |                   4 |                1 |      419.459 |           419.459 |                         0 |                 413.146 |              413.146 |        419.459 |
|            43666006 |           511 |            -1 |          334 |       20170709 |     20170719 |      20170716 |                   4 |                1 |      419.459 |           419.459 |                         0 |                 413.146 |              413.146 |        419.459 |
|            43678001 |           203 |            -1 |          322 |       20170718 |     20170728 |      20170725 |                   4 |                1 |      419.459 |           419.459 |                         0 |                 413.146 |              413.146 |        419.459 |
|            43678003 |           203 |            -1 |          332 |       20170718 |     20170728 |      20170725 |                   4 |                1 |      419.459 |           419.459 |                         0 |                 413.146 |              413.146 |        419.459 |
|            43678013 |           203 |            -1 |          342 |       20170718 |     20170728 |      20170725 |                   4 |                1 |      419.459 |           419.459 |                         0 |                 413.146 |              413.146 |        419.459 |
|            43680010 |           491 |            -1 |          324 |       20170718 |     20170728 |      20170725 |                   4 |                1 |      419.459 |           419.459 |                         0 |                 413.146 |              413.146 |        419.459 |
|            43680015 |           491 |            -1 |          328 |       20170718 |     20170728 |      20170725 |                   4 |                1 |      419.459 |           419.459 |                         0 |                 413.146 |              413.146 |        419.459 |
|            43692006 |           221 |            -1 |          338 |       20170729 |     20170808 |      20170805 |                   4 |                1 |      419.459 |           419.459 |                         0 |                 413.146 |              413.146 |        419.459 |
|            43692019 |           221 |            -1 |          330 |       20170729 |     20170808 |      20170805 |                   4 |                1 |      419.459 |           419.459 |                         0 |                 413.146 |              413.146 |        419.459 |


Table: SalesOrder
| Channel   |   SalesOrderLineKey | Sales Order   | Sales Order Line   |
|:----------|--------------------:|:--------------|:-------------------|
| Reseller  |            53465001 | SO53465       | SO53465 - 1        |
| Reseller  |            53465002 | SO53465       | SO53465 - 2        |
| Reseller  |            53465003 | SO53465       | SO53465 - 3        |
| Reseller  |            53465004 | SO53465       | SO53465 - 4        |
| Reseller  |            53465005 | SO53465       | SO53465 - 5        |
| Reseller  |            53465006 | SO53465       | SO53465 - 6        |
| Reseller  |            53465007 | SO53465       | SO53465 - 7        |
| Reseller  |            53465008 | SO53465       | SO53465 - 8        |
| Reseller  |            53465009 | SO53465       | SO53465 - 9        |
| Reseller  |            53465010 | SO53465       | SO53465 - 10       |


Table: SalesTerritory
|   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        |

 


tables: name: Customer
data: Customer.csv
name: Date
data: Date.csv
name: Product
data: Product.csv
name: Reseller
data: Reseller.csv
name: Sales
data: Sales.csv
name: SalesOrder
data: SalesOrder.csv
name: SalesTerritory
data: SalesTerritory.csv
label: Sales
CustomerKey
Customer
CustomerKey
Sales
ProductKey
Product
ProductKey
Sales
ResellerKey
Reseller
ResellerKey
SalesOrder
SalesOrderLineKey
Sales
SalesOrderLineKey
Sales
SalesTerritoryKey
SalesTerritory
SalesTerritoryKey
Sales
DueDateKey
Date
DateKey
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": "Sales",
            "from_column": "ResellerKey",
            "to_table": "Reseller",
            "to_column": "ResellerKey"
        },
        {
            "from_table": "SalesOrder",
            "from_column": "SalesOrderLineKey",
            "to_table": "Sales",
            "to_column": "SalesOrderLineKey"
        },
        {
            "from_table": "Sales",
            "from_column": "SalesTerritoryKey",
            "to_table": "SalesTerritory",
            "to_column": "SalesTerritoryKey"
        },
        {
            "from_table": "Sales",
            "from_column": "DueDateKey",
            "to_table": "Date",
            "to_column": "DateKey"
        }
    ]
}