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: Customers
| 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 |   DateInt | Month Name   | Month & Year   | Quarter & Year   |   DayOfWeek | DayOfWeekName   | WeekEnding              | MonthEnding             |   ISO Weeknumber |   ISO Year |   ISO Day of Year | Week & Year   |   WeeknYear |   MonthnYear |   QuarternYear | Fiscal Year   | Fiscal Quarter   |   Fiscal Period | IsAfterToday   | IsWorkingDay   | IsHoliday   |   WeekOffset |   MonthOffset |   QuarterOffset |   YearOffset |   FiscalYearOffset | WeekCompleted   | MonthCompleted   | QuarterCompleted   |
|:------------------------|-------:|----------------:|--------------:|-------------:|----------:|:-------------|:---------------|:-----------------|------------:|:----------------|:------------------------|:------------------------|-----------------:|-----------:|------------------:|:--------------|------------:|-------------:|---------------:|:--------------|:-----------------|----------------:|:---------------|:---------------|:------------|-------------:|--------------:|----------------:|-------------:|-------------------:|:----------------|:-----------------|:-------------------|
| 2015-07-01 00:00:00.000 |   2015 |               3 |             7 |            1 |  20150701 | July         | Jul 2015       | Q3 2015          |           3 | Wednesday       | 2015-07-05 00:00:00.000 | 2015-07-31 00:00:00.000 |               27 |       2015 |               182 | 2015-27       |    20152700 |     20150700 |       20150300 | FY16          | FQ1              |               1 | False          | True           | Unknown     |         -263 |           -60 |             -20 |           -5 |                 -5 | True            | True             | True               |
| 2015-07-02 00:00:00.000 |   2015 |               3 |             7 |            2 |  20150702 | July         | Jul 2015       | Q3 2015          |           4 | Thursday        | 2015-07-05 00:00:00.000 | 2015-07-31 00:00:00.000 |               27 |       2015 |               183 | 2015-27       |    20152700 |     20150700 |       20150300 | FY16          | FQ1              |               1 | False          | True           | Unknown     |         -263 |           -60 |             -20 |           -5 |                 -5 | True            | True             | True               |
| 2015-07-05 00:00:00.000 |   2015 |               3 |             7 |            5 |  20150705 | July         | Jul 2015       | Q3 2015          |           0 | Sunday          | 2015-07-05 00:00:00.000 | 2015-07-31 00:00:00.000 |               27 |       2015 |               186 | 2015-27       |    20152700 |     20150700 |       20150300 | FY16          | FQ1              |               1 | False          | True           | Unknown     |         -263 |           -60 |             -20 |           -5 |                 -5 | True            | True             | True               |
| 2015-07-06 00:00:00.000 |   2015 |               3 |             7 |            6 |  20150706 | July         | Jul 2015       | Q3 2015          |           1 | Monday          | 2015-07-12 00:00:00.000 | 2015-07-31 00:00:00.000 |               28 |       2015 |               187 | 2015-28       |    20152800 |     20150700 |       20150300 | FY16          | FQ1              |               1 | False          | True           | Unknown     |         -262 |           -60 |             -20 |           -5 |                 -5 | True            | True             | True               |
| 2015-07-07 00:00:00.000 |   2015 |               3 |             7 |            7 |  20150707 | July         | Jul 2015       | Q3 2015          |           2 | Tuesday         | 2015-07-12 00:00:00.000 | 2015-07-31 00:00:00.000 |               28 |       2015 |               188 | 2015-28       |    20152800 |     20150700 |       20150300 | FY16          | FQ1              |               1 | False          | True           | Unknown     |         -262 |           -60 |             -20 |           -5 |                 -5 | True            | True             | True               |
| 2015-07-08 00:00:00.000 |   2015 |               3 |             7 |            8 |  20150708 | July         | Jul 2015       | Q3 2015          |           3 | Wednesday       | 2015-07-12 00:00:00.000 | 2015-07-31 00:00:00.000 |               28 |       2015 |               189 | 2015-28       |    20152800 |     20150700 |       20150300 | FY16          | FQ1              |               1 | False          | True           | Unknown     |         -262 |           -60 |             -20 |           -5 |                 -5 | True            | True             | True               |
| 2015-07-09 00:00:00.000 |   2015 |               3 |             7 |            9 |  20150709 | July         | Jul 2015       | Q3 2015          |           4 | Thursday        | 2015-07-12 00:00:00.000 | 2015-07-31 00:00:00.000 |               28 |       2015 |               190 | 2015-28       |    20152800 |     20150700 |       20150300 | FY16          | FQ1              |               1 | False          | True           | Unknown     |         -262 |           -60 |             -20 |           -5 |                 -5 | True            | True             | True               |
| 2015-07-12 00:00:00.000 |   2015 |               3 |             7 |           12 |  20150712 | July         | Jul 2015       | Q3 2015          |           0 | Sunday          | 2015-07-12 00:00:00.000 | 2015-07-31 00:00:00.000 |               28 |       2015 |               193 | 2015-28       |    20152800 |     20150700 |       20150300 | FY16          | FQ1              |               1 | False          | True           | Unknown     |         -262 |           -60 |             -20 |           -5 |                 -5 | True            | True             | True               |
| 2015-07-13 00:00:00.000 |   2015 |               3 |             7 |           13 |  20150713 | July         | Jul 2015       | Q3 2015          |           1 | Monday          | 2015-07-19 00:00:00.000 | 2015-07-31 00:00:00.000 |               29 |       2015 |               194 | 2015-29       |    20152900 |     20150700 |       20150300 | FY16          | FQ1              |               1 | False          | True           | Unknown     |         -261 |           -60 |             -20 |           -5 |                 -5 | True            | True             | True               |
| 2015-07-14 00:00:00.000 |   2015 |               3 |             7 |           14 |  20150714 | July         | Jul 2015       | Q3 2015          |           2 | Tuesday         | 2015-07-19 00:00:00.000 | 2015-07-31 00:00:00.000 |               29 |       2015 |               195 | 2015-29       |    20152900 |     20150700 |       20150300 | FY16          | FQ1              |               1 | False          | True           | Unknown     |         -261 |           -60 |             -20 |           -5 |                 -5 | True            | True             | True               |


Table: Locations
| Location ID   | Name            | County           | State Code   | State       | Type   |   Latitude |   Longitude |
|:--------------|:----------------|:-----------------|:-------------|:------------|:-------|-----------:|------------:|
| A100          | Bridgeport      | Fairfield County | CT           | Connecticut | City   |    41.167  |    -73.2048 |
| A102          | Hartford        | Hartford County  | CT           | Connecticut | City   |    41.7637 |    -72.6851 |
| A104          | New Haven       | New Haven County | CT           | Connecticut | City   |    41.3081 |    -72.9282 |
| A106          | Stamford        | Fairfield County | CT           | Connecticut | City   |    41.0534 |    -73.5387 |
| A108          | Waterbury       | New Haven County | CT           | Connecticut | City   |    41.5581 |    -73.0515 |
| A111          | Cape Coral      | Lee County       | FL           | Florida     | City   |    26.5629 |    -81.9495 |
| A112          | Clearwater      | Pinellas County  | FL           | Florida     | City   |    27.979  |    -82.7666 |
| A113          | Coral Springs   | Broward County   | FL           | Florida     | City   |    26.2712 |    -80.2706 |
| A115          | Fort Lauderdale | Broward County   | FL           | Florida     | City   |    26.1223 |    -80.1434 |
| A116          | Gainesville     | Alachua County   | FL           | Florida     | City   |    29.6516 |    -82.3248 |


Table: Metrics
|   ID | Name                        | Abbreviation   |
|-----:|:----------------------------|:---------------|
|    0 | Metric                      | MET            |
|    1 | Revenue at Completion       | RAC            |
|    2 | Additional Expected Revenue | AER            |
|    3 | Total Expected Revenue      | TER            |
|    4 | Budget at Completion        | BAC            |


Table: Products
| Product ID   | Product Name   |    Cost |   Unit Price |
|:-------------|:---------------|--------:|-------------:|
| ENX2000      | Product 1      | 1367    |      2241    |
| ENX2001      | Product 2      |  504.99 |       951.99 |
| ENX2002      | Product 3      |  534    |       847    |
| ENX2003      | Product 4      | 1516    |      1783    |
| ENX2004      | Product 5      |  665    |      1278    |
| ENX2005      | Product 6      |  561    |       684    |
| ENX2006      | Product 7      | 1443    |      1826    |
| ENX2007      | Product 8      | 1054    |      1405    |
| ENX2008      | Product 9      |  208    |       315    |
| ENX2009      | Product 10     |  420    |       584    |


Table: Sales
| Order ID   | Product ID   | Location ID   | Customer ID   | Order Date              |   Quantity |
|:-----------|:-------------|:--------------|:--------------|:------------------------|-----------:|
| AX10629    | ENX2011      | A146          | C1034         | 2015-01-01 00:00:00.000 |          1 |
| AX10785    | ENX2037      | A146          | C1195         | 2015-05-05 00:00:00.000 |          1 |
| AX11244    | ENX2001      | A146          | C1536         | 2015-04-15 00:00:00.000 |          1 |
| AX11288    | ENX2083      | A146          | C1512         | 2016-01-31 00:00:00.000 |          1 |
| AX11366    | ENX2001      | A146          | C1188         | 2017-06-14 00:00:00.000 |          1 |
| AX11714    | ENX2075      | A146          | C1581         | 2016-09-17 00:00:00.000 |          1 |
| AX11732    | ENX2089      | A146          | C1560         | 2017-03-18 00:00:00.000 |          1 |
| AX12734    | ENX2049      | A146          | C1671         | 2015-02-04 00:00:00.000 |          1 |
| AX12785    | ENX2010      | A146          | C1526         | 2017-02-21 00:00:00.000 |          1 |
| AX12821    | ENX2018      | A146          | C1599         | 2017-11-26 00:00:00.000 |          1 |

 


tables: name: Customers
data: Customers.csv
name: Dates
data: Dates.csv
name: Locations
data: Locations.csv
name: Metrics
data: Metrics.csv
name: Products
data: Products.csv
name: Sales
data: Sales.csv
label: Sales
Location ID
Locations
Location ID
Sales
Product ID
Products
Product ID
Sales
Customer ID
Customers
Customer ID
Sales
Order Date
Dates
Date
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "Location ID",
            "to_table": "Locations",
            "to_column": "Location ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Product ID",
            "to_table": "Products",
            "to_column": "Product ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Customer ID",
            "to_table": "Customers",
            "to_column": "Customer ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Order Date",
            "to_table": "Dates",
            "to_column": "Date"
        }
    ]
}