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: Channels
| Channel Name   | Channel Code   | Alt. Name     | Importance   | Prior Code   |
|:---------------|:---------------|:--------------|:-------------|:-------------|
| Export         | EXP            | International | High         | INTL         |
| Distributor    | DIST           | Regional      | Mid          | REGIONS      |
| Wholesale      | WHOLE          | Local         | Low          | SUPER        |


Table: Customers
|   Customer Index | Customer Names   | Emails                       |   Head Office Index |
|-----------------:|:-----------------|:-----------------------------|--------------------:|
|                1 | Geiss Company    | lharrison3v@eepurl.com       |                   6 |
|                2 | Jaxbean Group    | jwilliamsonpk@eventbrite.com |                  42 |
|                3 | Ascend Ltd       | wwilliamson1g@about.me       |                  28 |
|                4 | Eire Corp        | rgreene16@deviantart.com     |                  64 |
|                5 | Blogtags Ltd     | rscott2f@printfriendly.com   |                   8 |
|                6 | Family Corp      | ajacobs2g@seattletimes.com   |                  61 |
|                7 | Skidoo Company   | cmiller1e@statcounter.com    |                  41 |
|                8 | Amerisourc Corp  | kcarr11@ustream.tv           |                  23 |
|                9 | Walgreen Corp    | aparker1l@pcworld.com        |                  10 |
|               10 | Unit Ltd         | bmcdonald47@joomla.org       |                  32 |


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   | IsBusinessDay   | Day Type   |   WeekOffset |   MonthOffset |   QuarterOffset |   YearOffset |   FiscalYearOffset | WeekCompleted   | MonthCompleted   | QuarterCompleted   |
|:------------------------|-------:|----------------:|--------------:|-------------:|----------:|:-------------|:---------------|:-----------------|------------:|:----------------|:------------------------|:------------------------|-----------------:|-----------:|------------------:|:--------------|------------:|-------------:|---------------:|:--------------|:-----------------|----------------:|:---------------|:---------------|:------------|:----------------|:-----------|-------------:|--------------:|----------------:|-------------:|-------------------:|:----------------|:-----------------|:-------------------|
| 2018-07-01 00:00:00.000 |   2018 |               3 |             7 |            1 |  20180701 | July         | Jul 2018       | Q3 2018          |           0 | Sunday          | 2018-07-01 00:00:00.000 | 2018-07-31 00:00:00.000 |               26 |       2018 |               182 | 2018-26       |    20182600 |     20180700 |       20180300 | FY19          | FQ1              |               1 | False          | False          | Unknown     | False           | Weekend    |         -116 |           -26 |              -8 |           -2 |                 -2 | True            | True             | True               |
| 2018-07-02 00:00:00.000 |   2018 |               3 |             7 |            2 |  20180702 | July         | Jul 2018       | Q3 2018          |           1 | Monday          | 2018-07-08 00:00:00.000 | 2018-07-31 00:00:00.000 |               27 |       2018 |               183 | 2018-27       |    20182700 |     20180700 |       20180300 | FY19          | FQ1              |               1 | False          | True           | Unknown     | True            | Weekday    |         -115 |           -26 |              -8 |           -2 |                 -2 | True            | True             | True               |
| 2018-07-03 00:00:00.000 |   2018 |               3 |             7 |            3 |  20180703 | July         | Jul 2018       | Q3 2018          |           2 | Tuesday         | 2018-07-08 00:00:00.000 | 2018-07-31 00:00:00.000 |               27 |       2018 |               184 | 2018-27       |    20182700 |     20180700 |       20180300 | FY19          | FQ1              |               1 | False          | True           | Unknown     | True            | Weekday    |         -115 |           -26 |              -8 |           -2 |                 -2 | True            | True             | True               |
| 2018-07-04 00:00:00.000 |   2018 |               3 |             7 |            4 |  20180704 | July         | Jul 2018       | Q3 2018          |           3 | Wednesday       | 2018-07-08 00:00:00.000 | 2018-07-31 00:00:00.000 |               27 |       2018 |               185 | 2018-27       |    20182700 |     20180700 |       20180300 | FY19          | FQ1              |               1 | False          | True           | Unknown     | True            | Weekday    |         -115 |           -26 |              -8 |           -2 |                 -2 | True            | True             | True               |
| 2018-07-05 00:00:00.000 |   2018 |               3 |             7 |            5 |  20180705 | July         | Jul 2018       | Q3 2018          |           4 | Thursday        | 2018-07-08 00:00:00.000 | 2018-07-31 00:00:00.000 |               27 |       2018 |               186 | 2018-27       |    20182700 |     20180700 |       20180300 | FY19          | FQ1              |               1 | False          | True           | Unknown     | True            | Weekday    |         -115 |           -26 |              -8 |           -2 |                 -2 | True            | True             | True               |
| 2018-07-06 00:00:00.000 |   2018 |               3 |             7 |            6 |  20180706 | July         | Jul 2018       | Q3 2018          |           5 | Friday          | 2018-07-08 00:00:00.000 | 2018-07-31 00:00:00.000 |               27 |       2018 |               187 | 2018-27       |    20182700 |     20180700 |       20180300 | FY19          | FQ1              |               1 | False          | True           | Unknown     | True            | Weekday    |         -115 |           -26 |              -8 |           -2 |                 -2 | True            | True             | True               |
| 2018-07-07 00:00:00.000 |   2018 |               3 |             7 |            7 |  20180707 | July         | Jul 2018       | Q3 2018          |           6 | Saturday        | 2018-07-08 00:00:00.000 | 2018-07-31 00:00:00.000 |               27 |       2018 |               188 | 2018-27       |    20182700 |     20180700 |       20180300 | FY19          | FQ1              |               1 | False          | False          | Unknown     | False           | Weekend    |         -115 |           -26 |              -8 |           -2 |                 -2 | True            | True             | True               |
| 2018-07-08 00:00:00.000 |   2018 |               3 |             7 |            8 |  20180708 | July         | Jul 2018       | Q3 2018          |           0 | Sunday          | 2018-07-08 00:00:00.000 | 2018-07-31 00:00:00.000 |               27 |       2018 |               189 | 2018-27       |    20182700 |     20180700 |       20180300 | FY19          | FQ1              |               1 | False          | False          | Unknown     | False           | Weekend    |         -115 |           -26 |              -8 |           -2 |                 -2 | True            | True             | True               |
| 2018-07-09 00:00:00.000 |   2018 |               3 |             7 |            9 |  20180709 | July         | Jul 2018       | Q3 2018          |           1 | Monday          | 2018-07-15 00:00:00.000 | 2018-07-31 00:00:00.000 |               28 |       2018 |               190 | 2018-28       |    20182800 |     20180700 |       20180300 | FY19          | FQ1              |               1 | False          | True           | Unknown     | True            | Weekday    |         -114 |           -26 |              -8 |           -2 |                 -2 | True            | True             | True               |
| 2018-07-10 00:00:00.000 |   2018 |               3 |             7 |           10 |  20180710 | July         | Jul 2018       | Q3 2018          |           2 | Tuesday         | 2018-07-15 00:00:00.000 | 2018-07-31 00:00:00.000 |               28 |       2018 |               191 | 2018-28       |    20182800 |     20180700 |       20180300 | FY19          | FQ1              |               1 | False          | True           | Unknown     | True            | Weekday    |         -114 |           -26 |              -8 |           -2 |                 -2 | True            | True             | True               |


Table: Disconnected Products
|   Index | Product Name   | Product ID   |
|--------:|:---------------|:-------------|
|       1 | Product 1      | P1           |
|       2 | Product 2      | P2           |
|       3 | Product 3      | P3           |
|       4 | Product 4      | P4           |
|       5 | Product 5      | P5           |
|       6 | Product 6      | P6           |
|       7 | Product 7      | P7           |
|       8 | Product 8      | P8           |
|       9 | Product 9      | P9           |
|      10 | Product 10     | P10          |


Table: Key Measures



Table: Products
|   Index | Product Name   |
|--------:|:---------------|
|       1 | Product 1      |
|       2 | Product 2      |
|       3 | Product 3      |
|       4 | Product 4      |
|       5 | Product 5      |
|       6 | Product 6      |
|       7 | Product 7      |
|       8 | Product 8      |
|       9 | Product 9      |
|      10 | Product 10     |


Table: Regions
|   Index | City                  | Country   | Full Name                      |
|--------:|:----------------------|:----------|:-------------------------------|
|       1 | LONDON                | UK        | LONDON, UK                     |
|       2 | BERLIN                | Germany   | BERLIN, Germany                |
|       3 | MADRID                | Spain     | MADRID, Spain                  |
|       4 | ROMA                  | Italy     | ROMA, Italy                    |
|       5 | KIEV                  | Ukraine   | KIEV, Ukraine                  |
|       6 | PARIS                 | France    | PARIS, France                  |
|       7 | BUCURESTI (Bucharest) | Romania   | BUCURESTI (Bucharest), Romania |
|       8 | BUDAPEST              | Hungary   | BUDAPEST, Hungary              |
|       9 | Hamburg               | Germany   | Hamburg, Germany               |
|      10 | MINSK                 | Belarus   | MINSK, Belarus                 |


Table: Sales
| OrderNumber   | OrderDate               |   Customer Name Index | Channel   | Currency Code   | Warehouse Code   |   Delivery Region Index |   Product Description Index |   Order Quantity |   Unit Price |   Line Total |   Total Unit Cost |
|:--------------|:------------------------|----------------------:|:----------|:----------------|:-----------------|------------------------:|----------------------------:|-----------------:|-------------:|-------------:|------------------:|
| SO - 000126   | 2018-02-16 00:00:00.000 |                   133 | Wholesale | CAD             | AXW291           |                      20 |                           4 |               11 |        174.2 |       1916.2 |            95.81  |
| SO - 000153   | 2018-02-19 00:00:00.000 |                    31 | Wholesale | CAD             | AXW291           |                      20 |                           7 |               11 |       3926.2 |      43188.2 |          3062.44  |
| SO - 000157   | 2018-02-20 00:00:00.000 |                    76 | Wholesale | CAD             | AXW291           |                      19 |                           4 |                5 |       3557.7 |      17788.5 |          1814.43  |
| SO - 000213   | 2018-02-28 00:00:00.000 |                   155 | Wholesale | CAD             | AXW291           |                       8 |                          11 |                7 |       1715.2 |      12006.4 |           857.6   |
| SO - 000225   | 2018-03-01 00:00:00.000 |                   126 | Wholesale | CAD             | AXW291           |                       1 |                          13 |                6 |       2499.1 |      14994.6 |          1824.34  |
| SO - 000239   | 2018-03-02 00:00:00.000 |                   124 | Wholesale | CAD             | AXW291           |                       6 |                          11 |                9 |       1219.4 |      10974.6 |           695.058 |
| SO - 000248   | 2018-03-03 00:00:00.000 |                   140 | Wholesale | CAD             | AXW291           |                      12 |                          10 |                9 |        984.9 |       8864.1 |           669.732 |
| SO - 000258   | 2018-03-04 00:00:00.000 |                   142 | Wholesale | CAD             | AXW291           |                       6 |                          11 |               11 |       2385.2 |      26237.2 |          1502.68  |
| SO - 000262   | 2018-03-04 00:00:00.000 |                   156 | Wholesale | CAD             | AXW291           |                      20 |                          15 |                8 |       1105.5 |       8844   |           652.245 |
| SO - 000300   | 2018-03-10 00:00:00.000 |                    37 | Wholesale | CAD             | AXW291           |                      23 |                          10 |               11 |       1005   |      11055   |           522.6   |

 


tables: name: Channels
data: Channels.csv
name: Customers
data: Customers.csv
name: Dates
data: Dates.csv
name: Disconnected Products
data: Disconnected Products.csv
name: Key Measures
data: Key Measures.csv
name: Products
data: Products.csv
name: Regions
data: Regions.csv
name: Sales
data: Sales.csv
label: Sales
OrderDate
Dates
Date
Sales
Channel
Channels
Channel Code
Sales
Product Description Index
Products
Index
Sales
Delivery Region Index
Regions
Index
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "OrderDate",
            "to_table": "Dates",
            "to_column": "Date"
        },
        {
            "from_table": "Sales",
            "from_column": "Channel",
            "to_table": "Channels",
            "to_column": "Channel Code"
        },
        {
            "from_table": "Sales",
            "from_column": "Product Description Index",
            "to_table": "Products",
            "to_column": "Index"
        },
        {
            "from_table": "Sales",
            "from_column": "Delivery Region Index",
            "to_table": "Regions",
            "to_column": "Index"
        }
    ]
}