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 | Name               | Birth Date              | Marital Status   | Gender   |   Yearly Income |   Total Children |   Children At Home | Education       | Occupation     | Continent     | City           | State      | Address Line 1        | Customer Type   | CountryRegion   |
|--------------:|:-------------------|:------------------------|:-----------------|:---------|----------------:|-----------------:|-------------------:|:----------------|:---------------|:--------------|:---------------|:-----------|:----------------------|:----------------|:----------------|
|            25 | Xie, Russell       | 1978-09-17 00:00:00.000 | M                | M        |           60000 |                0 |                  0 | Partial College | Skilled Manual | North America | Concord        | California | 8734 Oxford Place     | Person          | United States   |
|            44 | Simmons, Nathan    | 1976-02-24 00:00:00.000 | M                | M        |           60000 |                0 |                  0 | Partial College | Skilled Manual | North America | Glendale       | California | 1170 Shaw Rd          | Person          | United States   |
|           925 | Long, Ian          | 1979-10-25 00:00:00.000 | S                | M        |           60000 |                0 |                  0 | Partial College | Skilled Manual | North America | Novato         | California | 2389 E Eagle Peak Rd. | Person          | United States   |
|           939 | Alexander, Seth    | 1977-09-21 00:00:00.000 | M                | M        |           60000 |                0 |                  0 | Partial College | Skilled Manual | North America | Daly City      | California | 3842 Algiers Dr.      | Person          | United States   |
|           940 | Washington, Kevin  | 1977-06-22 00:00:00.000 | S                | M        |           60000 |                0 |                  0 | Partial College | Skilled Manual | North America | Imperial Beach | California | 9105 Jacobsen Street  | Person          | United States   |
|           955 | Garcia, Joseph     | 1975-08-17 00:00:00.000 | M                | M        |           60000 |                0 |                  0 | Partial College | Skilled Manual | North America | Glendale       | California | 1220 Bradford Way     | Person          | United States   |
|           956 | Green, Gabriel     | 1975-04-05 00:00:00.000 | S                | M        |           60000 |                0 |                  0 | Partial College | Skilled Manual | North America | Glendale       | California | 6991 Gloria Terr.     | Person          | United States   |
|          2032 | Shan, Hunter       | 1977-02-16 00:00:00.000 | S                | M        |           60000 |                0 |                  0 | Partial College | Skilled Manual | North America | Lemon Grove    | California | 6671 Santa Barbara    | Person          | United States   |
|          2034 | Gonzalez, Xavier   | 1976-11-20 00:00:00.000 | S                | M        |           60000 |                0 |                  0 | Partial College | Skilled Manual | North America | Oakland        | California | 8475 Riverwood Circle | Person          | United States   |
|          2985 | Richardson, Adrian | 1979-03-08 00:00:00.000 | S                | M        |           60000 |                0 |                  0 | Partial College | Skilled Manual | North America | San Diego      | California | 3930 Sony Hill Circle | Person          | United States   |


Table: Date
| Date                    |   Year Number | Year-Text   |   Year Quarter Number | Year Quarter   |   Year Month Number | Year Month    |   Month Number | Month    |   Day of Week Number | Day of Week   | Working Day   | Week Start Date         |   Week Number |   Year |   WeeknYear |
|:------------------------|--------------:|:------------|----------------------:|:---------------|--------------------:|:--------------|---------------:|:---------|---------------------:|:--------------|:--------------|:------------------------|--------------:|-------:|------------:|
| 2005-01-03 00:00:00.000 |          2005 | CY 2005     |                 20051 | Q1-2005        |              200501 | January 2005  |              1 | January  |                    2 | Monday        | WorkDay       | 2005-01-02 00:00:00.000 |             2 |   2005 |      200502 |
| 2005-01-10 00:00:00.000 |          2005 | CY 2005     |                 20051 | Q1-2005        |              200501 | January 2005  |              1 | January  |                    2 | Monday        | WorkDay       | 2005-01-09 00:00:00.000 |             3 |   2005 |      200503 |
| 2005-01-17 00:00:00.000 |          2005 | CY 2005     |                 20051 | Q1-2005        |              200501 | January 2005  |              1 | January  |                    2 | Monday        | WorkDay       | 2005-01-16 00:00:00.000 |             4 |   2005 |      200504 |
| 2005-01-24 00:00:00.000 |          2005 | CY 2005     |                 20051 | Q1-2005        |              200501 | January 2005  |              1 | January  |                    2 | Monday        | WorkDay       | 2005-01-23 00:00:00.000 |             5 |   2005 |      200505 |
| 2005-01-31 00:00:00.000 |          2005 | CY 2005     |                 20051 | Q1-2005        |              200501 | January 2005  |              1 | January  |                    2 | Monday        | WorkDay       | 2005-01-30 00:00:00.000 |             6 |   2005 |      200506 |
| 2005-02-07 00:00:00.000 |          2005 | CY 2005     |                 20051 | Q1-2005        |              200502 | February 2005 |              2 | February |                    2 | Monday        | WorkDay       | 2005-02-06 00:00:00.000 |             7 |   2005 |      200507 |
| 2005-02-14 00:00:00.000 |          2005 | CY 2005     |                 20051 | Q1-2005        |              200502 | February 2005 |              2 | February |                    2 | Monday        | WorkDay       | 2005-02-13 00:00:00.000 |             8 |   2005 |      200508 |
| 2005-02-21 00:00:00.000 |          2005 | CY 2005     |                 20051 | Q1-2005        |              200502 | February 2005 |              2 | February |                    2 | Monday        | WorkDay       | 2005-02-20 00:00:00.000 |             9 |   2005 |      200509 |
| 2005-02-28 00:00:00.000 |          2005 | CY 2005     |                 20051 | Q1-2005        |              200502 | February 2005 |              2 | February |                    2 | Monday        | WorkDay       | 2005-02-27 00:00:00.000 |            10 |   2005 |      200510 |
| 2005-03-07 00:00:00.000 |          2005 | CY 2005     |                 20051 | Q1-2005        |              200503 | March 2005    |              3 | March    |                    2 | Monday        | WorkDay       | 2005-03-06 00:00:00.000 |            11 |   2005 |      200511 |


Table: Key Measure



Table: Product Names
| Product Name                        |
|:------------------------------------|
| Contoso 512MB MP3 Player E51 Silver |
| Contoso 512MB MP3 Player E51 Blue   |
| Contoso 1G MP3 Player E100 White    |
| Contoso 2G MP3 Player E200 Silver   |
| Contoso 2G MP3 Player E200 Red      |
| Contoso 2G MP3 Player E200 Black    |
| Contoso 2G MP3 Player E200 Blue     |
| Contoso 4G MP3 Player E400 Silver   |
| Contoso 4G MP3 Player E400 Black    |
| Contoso 4G MP3 Player E400 Green    |


Table: Product
|   ProductKey |   Product Code | Product Name                                            | Manufacturer   | Brand         | Color   | Weight   |   Unit Cost |   Unit Price | Available Date          | Subcategory    | Category       |
|-------------:|---------------:|:--------------------------------------------------------|:---------------|:--------------|:--------|:---------|------------:|-------------:|:------------------------|:---------------|:---------------|
|         1707 |         702001 | MGS Dal of Honor Airborne M150                          | Tailspin Toys  | Tailspin Toys | Silver  |          |       32.25 |        70.13 | 2007-04-05 00:00:00.000 | Download Games | Games and Toys |
|         1708 |         702002 | MGS Collector's M160                                    | Tailspin Toys  | Tailspin Toys | Black   |          |       32.25 |        70.13 | 2006-05-08 00:00:00.000 | Download Games | Games and Toys |
|         1709 |         702003 | MGS Gears of War M170                                   | Tailspin Toys  | Tailspin Toys | Blue    |          |       32.25 |        70.13 | 2005-05-09 00:00:00.000 | Download Games | Games and Toys |
|         1710 |         702004 | MGS Age of Empires III: The Asian Dynasties M180        | Tailspin Toys  | Tailspin Toys | Silver  |          |       32.25 |        70.13 | 2004-09-08 00:00:00.000 | Download Games | Games and Toys |
|         1711 |         702005 | MGS Age of Empires III: The Asian Dynasties M190        | Tailspin Toys  | Tailspin Toys | Black   |          |       32.25 |        70.13 | 2004-09-08 00:00:00.000 | Download Games | Games and Toys |
|         1712 |         702006 | MGS Flight Simulator X Acceleration Expansion Pack M200 | Tailspin Toys  | Tailspin Toys | Silver  |          |       32.25 |        70.13 | 2004-05-04 00:00:00.000 | Download Games | Games and Toys |
|         1713 |         702007 | MGS Zoo Tycoon 2: Extinct Animals M210                  | Tailspin Toys  | Tailspin Toys | Silver  |          |       32.25 |        70.13 | 2005-01-02 00:00:00.000 | Download Games | Games and Toys |
|         1714 |         702008 | MGS Halo 2 for Windows Vista M220                       | Tailspin Toys  | Tailspin Toys | White   |          |       32.25 |        70.13 | 2005-01-03 00:00:00.000 | Download Games | Games and Toys |
|         1715 |         702009 | MGS Shadow-run M230                                     | Tailspin Toys  | Tailspin Toys | White   |          |       32.25 |        70.13 | 2005-01-04 00:00:00.000 | Download Games | Games and Toys |
|         1716 |         702010 | MGS Age of Empires III: The War Chiefs M240             | Tailspin Toys  | Tailspin Toys | Black   |          |       32.25 |        70.13 | 2006-05-08 00:00:00.000 | Download Games | Games and Toys |


Table: Sales
|   ProductKey |   CustomerKey |   OrderDateKey | Order Date              | Delivery Date           |   Order Number |   Order Line Number |   Quantity |   Unit Price |   Unit Discount |   Unit Cost |   Net Price |
|-------------:|--------------:|---------------:|:------------------------|:------------------------|---------------:|--------------------:|-----------:|-------------:|----------------:|------------:|------------:|
|         1670 |         18074 |       20070424 | 2007-04-24 00:00:00.000 | 2007-05-01 00:00:00.000 | 20070424729073 |                   1 |          1 |         8.99 |               0 |        4.13 |        8.99 |
|         1670 |         18075 |       20070424 | 2007-04-24 00:00:00.000 | 2007-05-03 00:00:00.000 | 20070424729074 |                   1 |          1 |         8.99 |               0 |        4.13 |        8.99 |
|         1670 |         18076 |       20070424 | 2007-04-24 00:00:00.000 | 2007-05-05 00:00:00.000 | 20070424729075 |                   1 |          1 |         8.99 |               0 |        4.13 |        8.99 |
|         1670 |         18078 |       20070424 | 2007-04-24 00:00:00.000 | 2007-05-02 00:00:00.000 | 20070424729077 |                   1 |          1 |         8.99 |               0 |        4.13 |        8.99 |
|         1670 |         18079 |       20070424 | 2007-04-24 00:00:00.000 | 2007-05-04 00:00:00.000 | 20070424729078 |                   1 |          1 |         8.99 |               0 |        4.13 |        8.99 |
|         1670 |         18080 |       20070424 | 2007-04-24 00:00:00.000 | 2007-05-06 00:00:00.000 | 20070424729079 |                   1 |          1 |         8.99 |               0 |        4.13 |        8.99 |
|         1670 |         18090 |       20070424 | 2007-04-24 00:00:00.000 | 2007-05-03 00:00:00.000 | 20070424729089 |                   1 |          1 |         8.99 |               0 |        4.13 |        8.99 |
|         1670 |         18105 |       20070424 | 2007-04-24 00:00:00.000 | 2007-05-05 00:00:00.000 | 20070424729104 |                   1 |          1 |         8.99 |               0 |        4.13 |        8.99 |
|         1670 |         18107 |       20070424 | 2007-04-24 00:00:00.000 | 2007-05-02 00:00:00.000 | 20070424729106 |                   1 |          1 |         8.99 |               0 |        4.13 |        8.99 |
|         1670 |         18108 |       20070424 | 2007-04-24 00:00:00.000 | 2007-05-04 00:00:00.000 | 20070424729107 |                   1 |          1 |         8.99 |               0 |        4.13 |        8.99 |


Table: TopN
|   TopN |
|-------:|
|      1 |
|      2 |
|      3 |
|      4 |
|      5 |
|      6 |
|      7 |
|      8 |
|      9 |
|     10 |

 


tables: name: Customer
data: Customer.csv
name: Date
data: Date.csv
name: Key Measure
data: Key Measure.csv
name: Product Names
data: Product Names.csv
name: Product
data: Product.csv
name: Sales
data: Sales.csv
name: TopN
data: TopN.csv
label: Sales
ProductKey
Product
ProductKey
Sales
CustomerKey
Customer
CustomerKey
Sales
Order Date
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": "Sales",
            "from_column": "Order Date",
            "to_table": "Date",
            "to_column": "Date"
        }
    ]
}