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   | Customer Address   | Longitude   | Latitude   |
|:--------------|:----------------|:-------------------|:------------|:-----------|
| 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             |   Week Number | Week & Year   |   WeeknYear |   MonthnYear |   QuarternYear | Fiscal Year   | Fiscal Quarter   |   Fiscal Period | IsAfterToday   | IsWorkingDay   | IsHoliday   |   WeekOffset |   MonthOffset |   QuarterOffset |   YearOffset |   FiscalYearOffset | WeekCompleted   | MonthCompleted   | QuarterCompleted   |   FQ |
|:------------------------|-------:|----------------:|--------------:|-------------:|----------:|:-------------|:---------------|:-----------------|------------:|:----------------|:------------------------|:------------------------|--------------:|:--------------|------------:|-------------:|---------------:|:--------------|:-----------------|----------------:|:---------------|:---------------|:------------|-------------:|--------------:|----------------:|-------------:|-------------------:|:----------------|:-----------------|:-------------------|-----:|
| 2020-05-24 00:00:00.000 |   2020 |               2 |             5 |           24 |  20200524 | May          | May 2020       | Q2 2020          |           0 | Sunday          | 2020-05-30 00:00:00.000 | 2020-05-31 00:00:00.000 |            21 | 2020-21       |    20202100 |     20200500 |       20200200 | FY20          | FQ3              |               8 | True           | True           | False       |            1 |             0 |               0 |            0 |                  0 | False           | False            | False              |    3 |
| 2020-05-31 00:00:00.000 |   2020 |               2 |             5 |           31 |  20200531 | May          | May 2020       | Q2 2020          |           0 | Sunday          | 2020-06-06 00:00:00.000 | 2020-05-31 00:00:00.000 |            22 | 2020-22       |    20202200 |     20200500 |       20200200 | FY20          | FQ3              |               8 | True           | True           | False       |            2 |             0 |               0 |            0 |                  0 | False           | False            | False              |    3 |
| 2020-06-07 00:00:00.000 |   2020 |               2 |             6 |            7 |  20200607 | June         | Jun 2020       | Q2 2020          |           0 | Sunday          | 2020-06-13 00:00:00.000 | 2020-06-30 00:00:00.000 |            23 | 2020-23       |    20202300 |     20200600 |       20200200 | FY20          | FQ3              |               9 | True           | True           | False       |            3 |             1 |               0 |            0 |                  0 | False           | False            | False              |    3 |
| 2020-06-14 00:00:00.000 |   2020 |               2 |             6 |           14 |  20200614 | June         | Jun 2020       | Q2 2020          |           0 | Sunday          | 2020-06-20 00:00:00.000 | 2020-06-30 00:00:00.000 |            24 | 2020-24       |    20202400 |     20200600 |       20200200 | FY20          | FQ3              |               9 | True           | True           | False       |            4 |             1 |               0 |            0 |                  0 | False           | False            | False              |    3 |
| 2020-06-21 00:00:00.000 |   2020 |               2 |             6 |           21 |  20200621 | June         | Jun 2020       | Q2 2020          |           0 | Sunday          | 2020-06-27 00:00:00.000 | 2020-06-30 00:00:00.000 |            25 | 2020-25       |    20202500 |     20200600 |       20200200 | FY20          | FQ3              |               9 | True           | True           | False       |            5 |             1 |               0 |            0 |                  0 | False           | False            | False              |    3 |
| 2020-06-28 00:00:00.000 |   2020 |               2 |             6 |           28 |  20200628 | June         | Jun 2020       | Q2 2020          |           0 | Sunday          | 2020-07-04 00:00:00.000 | 2020-06-30 00:00:00.000 |            26 | 2020-26       |    20202600 |     20200600 |       20200200 | FY20          | FQ3              |               9 | True           | True           | False       |            6 |             1 |               0 |            0 |                  0 | False           | False            | False              |    3 |
| 2020-07-05 00:00:00.000 |   2020 |               3 |             7 |            5 |  20200705 | July         | Jul 2020       | Q3 2020          |           0 | Sunday          | 2020-07-11 00:00:00.000 | 2020-07-31 00:00:00.000 |            27 | 2020-27       |    20202700 |     20200700 |       20200300 | FY20          | FQ4              |              10 | True           | True           | False       |            7 |             2 |               1 |            0 |                  0 | False           | False            | False              |    4 |
| 2020-07-12 00:00:00.000 |   2020 |               3 |             7 |           12 |  20200712 | July         | Jul 2020       | Q3 2020          |           0 | Sunday          | 2020-07-18 00:00:00.000 | 2020-07-31 00:00:00.000 |            28 | 2020-28       |    20202800 |     20200700 |       20200300 | FY20          | FQ4              |              10 | True           | True           | False       |            8 |             2 |               1 |            0 |                  0 | False           | False            | False              |    4 |
| 2020-07-19 00:00:00.000 |   2020 |               3 |             7 |           19 |  20200719 | July         | Jul 2020       | Q3 2020          |           0 | Sunday          | 2020-07-25 00:00:00.000 | 2020-07-31 00:00:00.000 |            29 | 2020-29       |    20202900 |     20200700 |       20200300 | FY20          | FQ4              |              10 | True           | True           | False       |            9 |             2 |               1 |            0 |                  0 | False           | False            | False              |    4 |
| 2020-07-26 00:00:00.000 |   2020 |               3 |             7 |           26 |  20200726 | July         | Jul 2020       | Q3 2020          |           0 | Sunday          | 2020-08-01 00:00:00.000 | 2020-07-31 00:00:00.000 |            30 | 2020-30       |    20203000 |     20200700 |       20200300 | FY20          | FQ4              |              10 | True           | True           | False       |           10 |             2 |               1 |            0 |                  0 | False           | False            | False              |    4 |


Table: Disconnected Dates
| Date                    |   Year |   QuarterOfYear |   MonthOfYear |   DayOfMonth |   DateInt | Month Name   | Month & Year   | Quarter & Year   |   DayOfWeek | DayOfWeekName   | WeekEnding              | MonthEnding             |   Week Number | Week & Year   |   WeeknYear |   MonthnYear |   QuarternYear | Fiscal Year   | Fiscal Quarter   |   Fiscal Period | IsAfterToday   | IsWorkingDay   | IsHoliday   |   WeekOffset |   MonthOffset |   QuarterOffset |   YearOffset |   FiscalYearOffset | WeekCompleted   | MonthCompleted   | QuarterCompleted   |   FQ |
|:------------------------|-------:|----------------:|--------------:|-------------:|----------:|:-------------|:---------------|:-----------------|------------:|:----------------|:------------------------|:------------------------|--------------:|:--------------|------------:|-------------:|---------------:|:--------------|:-----------------|----------------:|:---------------|:---------------|:------------|-------------:|--------------:|----------------:|-------------:|-------------------:|:----------------|:-----------------|:-------------------|-----:|
| 2020-05-24 00:00:00.000 |   2020 |               2 |             5 |           24 |  20200524 | May          | May 2020       | Q2 2020          |           0 | Sunday          | 2020-05-30 00:00:00.000 | 2020-05-31 00:00:00.000 |            21 | 2020-21       |    20202100 |     20200500 |       20200200 | FY20          | FQ3              |               8 | True           | True           | False       |            1 |             0 |               0 |            0 |                  0 | False           | False            | False              |    3 |
| 2020-05-31 00:00:00.000 |   2020 |               2 |             5 |           31 |  20200531 | May          | May 2020       | Q2 2020          |           0 | Sunday          | 2020-06-06 00:00:00.000 | 2020-05-31 00:00:00.000 |            22 | 2020-22       |    20202200 |     20200500 |       20200200 | FY20          | FQ3              |               8 | True           | True           | False       |            2 |             0 |               0 |            0 |                  0 | False           | False            | False              |    3 |
| 2020-06-07 00:00:00.000 |   2020 |               2 |             6 |            7 |  20200607 | June         | Jun 2020       | Q2 2020          |           0 | Sunday          | 2020-06-13 00:00:00.000 | 2020-06-30 00:00:00.000 |            23 | 2020-23       |    20202300 |     20200600 |       20200200 | FY20          | FQ3              |               9 | True           | True           | False       |            3 |             1 |               0 |            0 |                  0 | False           | False            | False              |    3 |
| 2020-06-14 00:00:00.000 |   2020 |               2 |             6 |           14 |  20200614 | June         | Jun 2020       | Q2 2020          |           0 | Sunday          | 2020-06-20 00:00:00.000 | 2020-06-30 00:00:00.000 |            24 | 2020-24       |    20202400 |     20200600 |       20200200 | FY20          | FQ3              |               9 | True           | True           | False       |            4 |             1 |               0 |            0 |                  0 | False           | False            | False              |    3 |
| 2020-06-21 00:00:00.000 |   2020 |               2 |             6 |           21 |  20200621 | June         | Jun 2020       | Q2 2020          |           0 | Sunday          | 2020-06-27 00:00:00.000 | 2020-06-30 00:00:00.000 |            25 | 2020-25       |    20202500 |     20200600 |       20200200 | FY20          | FQ3              |               9 | True           | True           | False       |            5 |             1 |               0 |            0 |                  0 | False           | False            | False              |    3 |
| 2020-06-28 00:00:00.000 |   2020 |               2 |             6 |           28 |  20200628 | June         | Jun 2020       | Q2 2020          |           0 | Sunday          | 2020-07-04 00:00:00.000 | 2020-06-30 00:00:00.000 |            26 | 2020-26       |    20202600 |     20200600 |       20200200 | FY20          | FQ3              |               9 | True           | True           | False       |            6 |             1 |               0 |            0 |                  0 | False           | False            | False              |    3 |
| 2020-07-05 00:00:00.000 |   2020 |               3 |             7 |            5 |  20200705 | July         | Jul 2020       | Q3 2020          |           0 | Sunday          | 2020-07-11 00:00:00.000 | 2020-07-31 00:00:00.000 |            27 | 2020-27       |    20202700 |     20200700 |       20200300 | FY20          | FQ4              |              10 | True           | True           | False       |            7 |             2 |               1 |            0 |                  0 | False           | False            | False              |    4 |
| 2020-07-12 00:00:00.000 |   2020 |               3 |             7 |           12 |  20200712 | July         | Jul 2020       | Q3 2020          |           0 | Sunday          | 2020-07-18 00:00:00.000 | 2020-07-31 00:00:00.000 |            28 | 2020-28       |    20202800 |     20200700 |       20200300 | FY20          | FQ4              |              10 | True           | True           | False       |            8 |             2 |               1 |            0 |                  0 | False           | False            | False              |    4 |
| 2020-07-19 00:00:00.000 |   2020 |               3 |             7 |           19 |  20200719 | July         | Jul 2020       | Q3 2020          |           0 | Sunday          | 2020-07-25 00:00:00.000 | 2020-07-31 00:00:00.000 |            29 | 2020-29       |    20202900 |     20200700 |       20200300 | FY20          | FQ4              |              10 | True           | True           | False       |            9 |             2 |               1 |            0 |                  0 | False           | False            | False              |    4 |
| 2020-07-26 00:00:00.000 |   2020 |               3 |             7 |           26 |  20200726 | July         | Jul 2020       | Q3 2020          |           0 | Sunday          | 2020-08-01 00:00:00.000 | 2020-07-31 00:00:00.000 |            30 | 2020-30       |    20203000 |     20200700 |       20200300 | FY20          | FQ4              |              10 | True           | True           | False       |           10 |             2 |               1 |            0 |                  0 | False           | False            | False              |    4 |


Table: Holiday 1966-2029
| Date                    | Holiday                    |
|:------------------------|:---------------------------|
| 2021-01-01 00:00:00.000 | New Year's Day             |
| 2021-01-18 00:00:00.000 | Martin Luther King Jr. Day |
| 2021-02-15 00:00:00.000 | Presidents' Day            |
| 2021-05-31 00:00:00.000 | Memorial Day               |
| 2021-07-05 00:00:00.000 | Independence Day           |
| 2021-09-06 00:00:00.000 | Labor Day                  |
| 2021-10-11 00:00:00.000 | Columbus Day               |
| 2021-11-11 00:00:00.000 | Veterans Day               |
| 2021-11-25 00:00:00.000 | Thanksgiving Day           |
| 2021-12-24 00:00:00.000 | Christmas Day              |


Table: Invoked Function
| Date                    |   Year |   QuarterOfYear |   MonthOfYear |   DayOfMonth |   DateInt | Month Name   | Month & Year   | Quarter & Year   |   DayOfWeek | DayOfWeekName   | WeekEnding              | MonthEnding             |   Week Number | Week & Year   |   WeeknYear |   MonthnYear |   QuarternYear | Fiscal Year   | Fiscal Quarter   |   Fiscal Period | IsAfterToday   | IsWorkingDay   | IsHoliday   |   WeekOffset |   MonthOffset |   QuarterOffset |   YearOffset |   FiscalYearOffset | WeekCompleted   | MonthCompleted   | QuarterCompleted   |
|:------------------------|-------:|----------------:|--------------:|-------------:|----------:|:-------------|:---------------|:-----------------|------------:|:----------------|:------------------------|:------------------------|--------------:|:--------------|------------:|-------------:|---------------:|:--------------|:-----------------|----------------:|:---------------|:---------------|:------------|-------------:|--------------:|----------------:|-------------:|-------------------:|:----------------|:-----------------|:-------------------|
| 2018-01-02 00:00:00.000 |   2018 |               1 |             1 |            2 |  20180102 | January      | Jan 2018       | Q1 2018          |           2 | Tuesday         | 2018-01-06 00:00:00.000 | 2018-01-31 00:00:00.000 |             1 | 2018-01       |    20180100 |     20180100 |       20180100 | FY18          | FQ2              |               4 | False          | True           | False       |         -124 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               |
| 2018-01-03 00:00:00.000 |   2018 |               1 |             1 |            3 |  20180103 | January      | Jan 2018       | Q1 2018          |           3 | Wednesday       | 2018-01-06 00:00:00.000 | 2018-01-31 00:00:00.000 |             1 | 2018-01       |    20180100 |     20180100 |       20180100 | FY18          | FQ2              |               4 | False          | True           | False       |         -124 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               |
| 2018-01-04 00:00:00.000 |   2018 |               1 |             1 |            4 |  20180104 | January      | Jan 2018       | Q1 2018          |           4 | Thursday        | 2018-01-06 00:00:00.000 | 2018-01-31 00:00:00.000 |             1 | 2018-01       |    20180100 |     20180100 |       20180100 | FY18          | FQ2              |               4 | False          | True           | False       |         -124 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               |
| 2018-01-07 00:00:00.000 |   2018 |               1 |             1 |            7 |  20180107 | January      | Jan 2018       | Q1 2018          |           0 | Sunday          | 2018-01-13 00:00:00.000 | 2018-01-31 00:00:00.000 |             1 | 2018-01       |    20180100 |     20180100 |       20180100 | FY18          | FQ2              |               4 | False          | True           | False       |         -123 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               |
| 2018-01-08 00:00:00.000 |   2018 |               1 |             1 |            8 |  20180108 | January      | Jan 2018       | Q1 2018          |           1 | Monday          | 2018-01-13 00:00:00.000 | 2018-01-31 00:00:00.000 |             2 | 2018-02       |    20180200 |     20180100 |       20180100 | FY18          | FQ2              |               4 | False          | True           | False       |         -123 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               |
| 2018-01-09 00:00:00.000 |   2018 |               1 |             1 |            9 |  20180109 | January      | Jan 2018       | Q1 2018          |           2 | Tuesday         | 2018-01-13 00:00:00.000 | 2018-01-31 00:00:00.000 |             2 | 2018-02       |    20180200 |     20180100 |       20180100 | FY18          | FQ2              |               4 | False          | True           | False       |         -123 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               |
| 2018-01-10 00:00:00.000 |   2018 |               1 |             1 |           10 |  20180110 | January      | Jan 2018       | Q1 2018          |           3 | Wednesday       | 2018-01-13 00:00:00.000 | 2018-01-31 00:00:00.000 |             2 | 2018-02       |    20180200 |     20180100 |       20180100 | FY18          | FQ2              |               4 | False          | True           | False       |         -123 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               |
| 2018-01-11 00:00:00.000 |   2018 |               1 |             1 |           11 |  20180111 | January      | Jan 2018       | Q1 2018          |           4 | Thursday        | 2018-01-13 00:00:00.000 | 2018-01-31 00:00:00.000 |             2 | 2018-02       |    20180200 |     20180100 |       20180100 | FY18          | FQ2              |               4 | False          | True           | False       |         -123 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               |
| 2018-01-14 00:00:00.000 |   2018 |               1 |             1 |           14 |  20180114 | January      | Jan 2018       | Q1 2018          |           0 | Sunday          | 2018-01-20 00:00:00.000 | 2018-01-31 00:00:00.000 |             2 | 2018-02       |    20180200 |     20180100 |       20180100 | FY18          | FQ2              |               4 | False          | True           | False       |         -122 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               |
| 2018-01-16 00:00:00.000 |   2018 |               1 |             1 |           16 |  20180116 | January      | Jan 2018       | Q1 2018          |           2 | Tuesday         | 2018-01-20 00:00:00.000 | 2018-01-31 00:00:00.000 |             3 | 2018-03       |    20180300 |     20180100 |       20180100 | FY18          | FQ2              |               4 | False          | True           | False       |         -122 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               |


Table: Products
| Product ID   | Product Name   |   Cost |   Original Sale Price | Discount Code   |   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 | Sales Date              |   Sales Year |   Line Sales |
|:-----------|:-------------|:--------------|:------------------|:--------------|:------------------------|-----------:|:------------------------|-------------:|-------------:|
| AX18064    | ENX2083      | A170          | EMP1023           | C1585         | 2016-01-01 00:00:00.000 |          2 | 2020-01-01 00:00:00.000 |         2020 |         4282 |
| AX15920    | ENX2033      | A165          | EMP1023           | C1461         | 2016-01-03 00:00:00.000 |          2 | 2020-01-03 00:00:00.000 |         2020 |         4364 |
| AX23552    | ENX2008      | A139          | EMP1023           | C1205         | 2016-01-12 00:00:00.000 |          2 | 2020-01-12 00:00:00.000 |         2020 |          630 |
| AX18164    | ENX2072      | A112          | EMP1023           | C1344         | 2016-01-20 00:00:00.000 |          2 | 2020-01-20 00:00:00.000 |         2020 |         3774 |
| AX23507    | ENX2082      | A154          | EMP1023           | C1140         | 2016-01-20 00:00:00.000 |          2 | 2020-01-20 00:00:00.000 |         2020 |         2206 |
| AX15537    | ENX2070      | A123          | EMP1023           | C1471         | 2016-01-26 00:00:00.000 |          2 | 2020-01-26 00:00:00.000 |         2020 |         3342 |
| AX24812    | ENX2036      | A133          | EMP1023           | C1352         | 2016-02-06 00:00:00.000 |          2 | 2020-02-06 00:00:00.000 |         2020 |         3164 |
| AX13240    | ENX2010      | A145          | EMP1023           | C1780         | 2016-02-09 00:00:00.000 |          2 | 2020-02-09 00:00:00.000 |         2020 |         3624 |
| AX12237    | ENX2046      | A178          | EMP1023           | C1564         | 2016-02-15 00:00:00.000 |          2 | 2020-02-15 00:00:00.000 |         2020 |         4820 |
| AX19111    | ENX2025      | A176          | EMP1023           | C1430         | 2016-02-15 00:00:00.000 |          2 | 2020-02-15 00:00:00.000 |         2020 |         1334 |

 


tables: name: Customers
data: Customers.csv
name: Dates
data: Dates.csv
name: Disconnected Dates
data: Disconnected Dates.csv
name: Holiday 1966-2029
data: Holiday 1966-2029.csv
name: Invoked Function
data: Invoked Function.csv
name: Products
data: Products.csv
name: Sales
data: Sales.csv
label: Sales
Customer ID
Customers
Customer ID
Sales
Sales Date
Dates
Date
Sales
Product ID
Products
Product ID
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "Customer ID",
            "to_table": "Customers",
            "to_column": "Customer ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Sales Date",
            "to_table": "Dates",
            "to_column": "Date"
        },
        {
            "from_table": "Sales",
            "from_column": "Product ID",
            "to_table": "Products",
            "to_column": "Product ID"
        }
    ]
}