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
| Customer ID   | Customer Name   |
|:--------------|:----------------|
| C1000         | Jesse Evans     |
| C1001         | Victor Ramos    |
| C1002         | Mark Montgomery |
| C1003         | Dennis Morris   |
| C1004         | Gregory Simmons |
| C1005         | Jeremy Vasquez  |
| C1006         | Anthony Simpson |
| C1007         | Ernest Rivera   |
| C1008         | Victor Martinez |
| C1009         | Bobby Burton    |


Table: Dates
| Date                    |   Year |   QuarterOfYear |   MonthOfYear |   DayOfMonth | Month Name   | Short Month   | Quarters   | Month & Year   | Quarter & Year   |   MonthnYear |   QuarternYear |   Short Year | FY   |   Day |
|:------------------------|-------:|----------------:|--------------:|-------------:|:-------------|:--------------|:-----------|:---------------|:-----------------|-------------:|---------------:|-------------:|:-----|------:|
| 2016-07-01 00:00:00.000 |   2016 |               3 |             7 |            1 | July         | Jul           | Q3         | Jul 2016       | Q3 2016          |     20160700 |       20160300 |           16 | FY17 |   183 |
| 2016-07-02 00:00:00.000 |   2016 |               3 |             7 |            2 | July         | Jul           | Q3         | Jul 2016       | Q3 2016          |     20160700 |       20160300 |           16 | FY17 |   184 |
| 2016-07-03 00:00:00.000 |   2016 |               3 |             7 |            3 | July         | Jul           | Q3         | Jul 2016       | Q3 2016          |     20160700 |       20160300 |           16 | FY17 |   185 |
| 2016-07-04 00:00:00.000 |   2016 |               3 |             7 |            4 | July         | Jul           | Q3         | Jul 2016       | Q3 2016          |     20160700 |       20160300 |           16 | FY17 |   186 |
| 2016-07-05 00:00:00.000 |   2016 |               3 |             7 |            5 | July         | Jul           | Q3         | Jul 2016       | Q3 2016          |     20160700 |       20160300 |           16 | FY17 |   187 |
| 2016-07-06 00:00:00.000 |   2016 |               3 |             7 |            6 | July         | Jul           | Q3         | Jul 2016       | Q3 2016          |     20160700 |       20160300 |           16 | FY17 |   188 |
| 2016-07-07 00:00:00.000 |   2016 |               3 |             7 |            7 | July         | Jul           | Q3         | Jul 2016       | Q3 2016          |     20160700 |       20160300 |           16 | FY17 |   189 |
| 2016-07-08 00:00:00.000 |   2016 |               3 |             7 |            8 | July         | Jul           | Q3         | Jul 2016       | Q3 2016          |     20160700 |       20160300 |           16 | FY17 |   190 |
| 2016-07-09 00:00:00.000 |   2016 |               3 |             7 |            9 | July         | Jul           | Q3         | Jul 2016       | Q3 2016          |     20160700 |       20160300 |           16 | FY17 |   191 |
| 2016-07-10 00:00:00.000 |   2016 |               3 |             7 |           10 | July         | Jul           | Q3         | Jul 2016       | Q3 2016          |     20160700 |       20160300 |           16 | FY17 |   192 |


Table: Exchange Rate Data
| Dates                   | Currency Pair   | Foreign Ccy   |   Exchange Rates |
|:------------------------|:----------------|:--------------|-----------------:|
| 2017-03-14 00:00:00.000 | NZDUSD          | USD           |           0.6917 |
| 2017-03-14 00:00:00.000 | NZDGBP          | GBP           |           0.5665 |
| 2017-03-14 00:00:00.000 | NZDAUD          | AUD           |           0.9158 |
| 2017-03-14 00:00:00.000 | NZDJPY          | JPY           |          79.43   |
| 2017-03-14 00:00:00.000 | NZDEUR          | EUR           |           0.6491 |
| 2017-03-14 00:00:00.000 | NZDCNY          | CNY           |           4.7791 |
| 2017-03-15 00:00:00.000 | NZDUSD          | USD           |           0.6928 |
| 2017-03-15 00:00:00.000 | NZDGBP          | GBP           |           0.5698 |
| 2017-03-15 00:00:00.000 | NZDAUD          | AUD           |           0.9164 |
| 2017-03-15 00:00:00.000 | NZDJPY          | JPY           |          79.53   |


Table: Key Measures
|   Column1 |
|----------:|
|         1 |


Table: Location
| Location ID   | City             | County             | State Code   | State      |   Latitude |   Longitude | Type   | Population Stats   |
|:--------------|:-----------------|:-------------------|:-------------|:-----------|-----------:|------------:|:-------|:-------------------|
| A100          | Anaheim          | Orange County      | CA           | California |    33.8353 |    -117.915 | City   | 3,169,776          |
| A110          | Costa Mesa       | Orange County      | CA           | California |    33.6411 |    -117.919 | City   | 3,169,776          |
| A122          | Fullerton        | Orange County      | CA           | California |    33.8703 |    -117.925 | City   | 3,169,776          |
| A123          | Garden Grove     | Orange County      | CA           | California |    33.7739 |    -117.941 | City   | 3,169,776          |
| A126          | Huntington Beach | Orange County      | CA           | California |    33.6603 |    -117.999 | City   | 3,169,776          |
| A128          | Irvine           | Orange County      | CA           | California |    33.6695 |    -117.823 | City   | 3,169,776          |
| A140          | Orange           | Orange County      | CA           | California |    33.7878 |    -117.853 | City   | 3,169,776          |
| A158          | Santa Ana        | Orange County      | CA           | California |    33.7456 |    -117.868 | City   | 3,169,776          |
| A104          | Burbank          | Los Angeles County | CA           | California |    34.1808 |    -118.309 | City   | 10,170,292         |
| A112          | Downey           | Los Angeles County | CA           | California |    33.94   |    -118.133 | City   | 10,170,292         |


Table: Product
| Product ID   | Product Name   |   Cost |   Original Sale Price |   Discount |   Current Price |   Taxes |
|:-------------|:---------------|-------:|----------------------:|-----------:|----------------:|--------:|
| ENX2000      | Product 1      |   1367 |                  2241 |          0 |            2241 |  336.15 |
| ENX2001      | Product 2      |    504 |                   951 |          0 |             951 |  142.65 |
| ENX2002      | Product 3      |    534 |                   847 |          0 |             847 |  127.05 |
| ENX2003      | Product 4      |   1516 |                  1783 |          0 |            1783 |  267.45 |
| ENX2004      | Product 5      |    665 |                  1278 |          0 |            1278 |  191.7  |
| ENX2005      | Product 6      |    561 |                   684 |          0 |             684 |  102.6  |
| ENX2006      | Product 7      |   1443 |                  1826 |          0 |            1826 |  273.9  |
| ENX2007      | Product 8      |   1054 |                  1405 |          0 |            1405 |  210.75 |
| ENX2008      | Product 9      |    208 |                   315 |          0 |             315 |   47.25 |
| ENX2009      | Product 10     |    420 |                   584 |          0 |             584 |   87.6  |


Table: Sales
| Order ID   | Product ID   | Location ID   | Sales Person ID   | Customer ID   | Purchase Date           |   Quantity |   Price |
|:-----------|:-------------|:--------------|:------------------|:--------------|:------------------------|-----------:|--------:|
| AX10331    | ENX2032      | A141          | EMP1043           | C1002         | 2017-01-11 00:00:00.000 |          1 |    1967 |
| AX11833    | ENX2092      | A153          | EMP1043           | C1744         | 2017-02-11 00:00:00.000 |          1 |    1639 |
| AX12261    | ENX2050      | A157          | EMP1043           | C1672         | 2017-02-05 00:00:00.000 |          1 |    2391 |
| AX13469    | ENX2080      | A148          | EMP1043           | C1065         | 2017-01-17 00:00:00.000 |          1 |    2353 |
| AX15599    | ENX2080      | A164          | EMP1043           | C1359         | 2017-02-02 00:00:00.000 |          1 |    2353 |
| AX17381    | ENX2039      | A159          | EMP1043           | C1204         | 2017-02-10 00:00:00.000 |          1 |     817 |
| AX18806    | ENX2092      | A128          | EMP1043           | C1778         | 2017-01-14 00:00:00.000 |          1 |    1639 |
| AX19857    | ENX2039      | A119          | EMP1043           | C1789         | 2017-03-05 00:00:00.000 |          1 |     817 |
| AX20426    | ENX2047      | A137          | EMP1043           | C1392         | 2017-01-19 00:00:00.000 |          1 |     290 |
| AX20616    | ENX2070      | A102          | EMP1043           | C1092         | 2017-03-10 00:00:00.000 |          1 |    1671 |


Table: Salespeople
| Salesperson ID   | Salesperson Name   | First Name   | Last Name   |
|:-----------------|:-------------------|:-------------|:------------|
| EMP1000          | Fred Robertson     | Fred         | Robertson   |
| EMP1001          | Kevin Butler       | Kevin        | Butler      |
| EMP1002          | Andrew Bowman      | Andrew       | Bowman      |
| EMP1003          | Christopher Tucker | Christopher  | Tucker      |
| EMP1004          | Kenneth Bradley    | Kenneth      | Bradley     |
| EMP1005          | Ryan Welch         | Ryan         | Welch       |
| EMP1006          | Sean Miller        | Sean         | Miller      |
| EMP1007          | Jeremy Mendoza     | Jeremy       | Mendoza     |
| EMP1008          | Carl Elliott       | Carl         | Elliott     |
| EMP1009          | Kenneth Fields     | Kenneth      | Fields      |


Table: Time Comparison
|   Column1 |
|----------:|
|         1 |

 


tables: name: Customer
data: Customer.csv
name: Dates
data: Dates.csv
name: Exchange Rate Data
data: Exchange Rate Data.csv
name: Key Measures
data: Key Measures.csv
name: Location
data: Location.csv
name: Product
data: Product.csv
name: Sales
data: Sales.csv
name: Salespeople
data: Salespeople.csv
name: Time Comparison
data: Time Comparison.csv
label: Sales
Location ID
Location
Location ID
Sales
Purchase Date
Dates
Date
Sales
Sales Person ID
Salespeople
Salesperson ID
Sales
Customer ID
Customer
Customer ID
Sales
Product ID
Product
Product ID
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "Location ID",
            "to_table": "Location",
            "to_column": "Location ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Purchase Date",
            "to_table": "Dates",
            "to_column": "Date"
        },
        {
            "from_table": "Sales",
            "from_column": "Sales Person ID",
            "to_table": "Salespeople",
            "to_column": "Salesperson ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Customer ID",
            "to_table": "Customer",
            "to_column": "Customer ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Product ID",
            "to_table": "Product",
            "to_column": "Product ID"
        }
    ]
}