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
| Sales Channel   | Channel Code   | Ccy / Channel   |
|:----------------|:---------------|:----------------|
| In-Store        | IN-ST          | USD-IN-STORE    |
| Online          | ONLI           | USD-ONLINE      |
| Distributor     | DIST           | USD-DISTRIBUTOR |
| Wholesale       | WHOL           | USD-WHOLESALE   |


Table: Customers
|   Customer Index | Customer Names   | Customer Group   |
|-----------------:|:-----------------|:-----------------|
|                1 | Avon Corp        | Other            |
|                2 | WakeFern         | Other            |
|                3 | Elorac, Corp     | Other            |
|                4 | ETUDE Ltd        | Other            |
|                5 | Procter Corp     | Other            |
|                6 | PEDIFIX, Corp    | Other            |
|                7 | New Ltd          | Other            |
|                8 | Medsep Group     | Premium Group    |
|                9 | Ei               | Other            |
|               10 | 21st Ltd         | Other            |


Table: Dates
| Date                    |   Year |   QuarterOfYear |   MonthOfYear |   DayOfMonth | Short Month   | 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   | Calendar Quarters   |
|:------------------------|-------:|----------------:|--------------:|-------------:|:--------------|:---------------|:-----------------|------------:|:----------------|:------------------------|:------------------------|--------------:|:--------------|------------:|-------------:|---------------:|:--------------|:-----------------|----------------:|:---------------|:---------------|:------------|-------------:|--------------:|----------------:|-------------:|-------------------:|:----------------|:-----------------|:-------------------|:--------------------|
| 2018-01-01 00:00:00.000 |   2018 |               1 |             1 |            1 | Jan           | Jan 2018       | Q1 2018          |           0 | Monday          | 2018-01-07 00:00:00.000 | 2018-01-31 00:00:00.000 |             1 | 2018-01       |    20180100 |     20180100 |       20180100 | FY18          | FQ3              |               7 | False          | True           | Unknown     |         -124 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               | Q1                  |
| 2018-01-02 00:00:00.000 |   2018 |               1 |             1 |            2 | Jan           | Jan 2018       | Q1 2018          |           1 | Tuesday         | 2018-01-07 00:00:00.000 | 2018-01-31 00:00:00.000 |             1 | 2018-01       |    20180100 |     20180100 |       20180100 | FY18          | FQ3              |               7 | False          | True           | Unknown     |         -124 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               | Q1                  |
| 2018-01-03 00:00:00.000 |   2018 |               1 |             1 |            3 | Jan           | Jan 2018       | Q1 2018          |           2 | Wednesday       | 2018-01-07 00:00:00.000 | 2018-01-31 00:00:00.000 |             1 | 2018-01       |    20180100 |     20180100 |       20180100 | FY18          | FQ3              |               7 | False          | True           | Unknown     |         -124 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               | Q1                  |
| 2018-01-04 00:00:00.000 |   2018 |               1 |             1 |            4 | Jan           | Jan 2018       | Q1 2018          |           3 | Thursday        | 2018-01-07 00:00:00.000 | 2018-01-31 00:00:00.000 |             1 | 2018-01       |    20180100 |     20180100 |       20180100 | FY18          | FQ3              |               7 | False          | True           | Unknown     |         -124 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               | Q1                  |
| 2018-01-05 00:00:00.000 |   2018 |               1 |             1 |            5 | Jan           | Jan 2018       | Q1 2018          |           4 | Friday          | 2018-01-07 00:00:00.000 | 2018-01-31 00:00:00.000 |             1 | 2018-01       |    20180100 |     20180100 |       20180100 | FY18          | FQ3              |               7 | False          | True           | Unknown     |         -124 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               | Q1                  |
| 2018-01-08 00:00:00.000 |   2018 |               1 |             1 |            8 | Jan           | Jan 2018       | Q1 2018          |           0 | Monday          | 2018-01-14 00:00:00.000 | 2018-01-31 00:00:00.000 |             2 | 2018-02       |    20180200 |     20180100 |       20180100 | FY18          | FQ3              |               7 | False          | True           | Unknown     |         -123 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               | Q1                  |
| 2018-01-09 00:00:00.000 |   2018 |               1 |             1 |            9 | Jan           | Jan 2018       | Q1 2018          |           1 | Tuesday         | 2018-01-14 00:00:00.000 | 2018-01-31 00:00:00.000 |             2 | 2018-02       |    20180200 |     20180100 |       20180100 | FY18          | FQ3              |               7 | False          | True           | Unknown     |         -123 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               | Q1                  |
| 2018-01-10 00:00:00.000 |   2018 |               1 |             1 |           10 | Jan           | Jan 2018       | Q1 2018          |           2 | Wednesday       | 2018-01-14 00:00:00.000 | 2018-01-31 00:00:00.000 |             2 | 2018-02       |    20180200 |     20180100 |       20180100 | FY18          | FQ3              |               7 | False          | True           | Unknown     |         -123 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               | Q1                  |
| 2018-01-11 00:00:00.000 |   2018 |               1 |             1 |           11 | Jan           | Jan 2018       | Q1 2018          |           3 | Thursday        | 2018-01-14 00:00:00.000 | 2018-01-31 00:00:00.000 |             2 | 2018-02       |    20180200 |     20180100 |       20180100 | FY18          | FQ3              |               7 | False          | True           | Unknown     |         -123 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               | Q1                  |
| 2018-01-12 00:00:00.000 |   2018 |               1 |             1 |           12 | Jan           | Jan 2018       | Q1 2018          |           4 | Friday          | 2018-01-14 00:00:00.000 | 2018-01-31 00:00:00.000 |             2 | 2018-02       |    20180200 |     20180100 |       20180100 | FY18          | FQ3              |               7 | False          | True           | Unknown     |         -123 |           -28 |              -9 |           -2 |                 -2 | True            | True             | True               | Q1                  |


Table: Products
|   Index | Product Name       | Product Categories   |
|--------:|:-------------------|:---------------------|
|       1 | Cookware           | Best Sellers         |
|       2 | Photo Frames       | Other                |
|       3 | Table Lamps        | Best Sellers         |
|       4 | Serveware          | Other                |
|       5 | Bathroom Furniture | Other                |
|       6 | Computers          | Other                |
|       7 | Dinnerware         | Best Sellers         |
|       8 | Cocktail Glasses   | Other                |
|       9 | Baseball           | Ok Sellers           |
|      10 | Blankets           | Other                |


Table: Sales Team
|   Index | Sales Team       | Region    |
|--------:|:-----------------|:----------|
|       1 | Adam Hernandez   | Northeast |
|       2 | Keith Griffin    | Northeast |
|       3 | Jerry Green      | West      |
|       4 | Chris Armstrong  | Northeast |
|       5 | Stephen Payne    | South     |
|       6 | Joshua Bennett   | Northeast |
|       7 | Shawn Cook       | Midwest   |
|       8 | George Lewis     | West      |
|       9 | Joshua Ryan      | Midwest   |
|      10 | Jonathan Hawkins | West      |


Table: Sales
| OrderNumber   | Sales Channel   | Warehouse Code   | Procured Date           | OrderDate               | Ship Date               | Delivery Date           |   Sales Team Index |   Customer Index |   Store Index |   Product Index |   Order Quantity |   Discount Applied |   Unit Price |   Unit Cost |   Actual Sales | Forecast Sales   |
|:--------------|:----------------|:-----------------|:------------------------|:------------------------|:------------------------|:------------------------|-------------------:|-----------------:|--------------:|----------------:|-----------------:|-------------------:|-------------:|------------:|---------------:|:-----------------|
| SO - 000140   | In-Store        | WARE-NMK1003     | 2017-12-31 00:00:00.000 | 2018-06-03 00:00:00.000 | 2018-06-18 00:00:00.000 | 2018-06-28 00:00:00.000 |                  9 |               26 |           196 |              25 |                4 |               0.05 |       1132.3 |     486.889 |        4302.74 |                  |
| SO - 000164   | In-Store        | WARE-NMK1003     | 2018-04-10 00:00:00.000 | 2018-06-07 00:00:00.000 | 2018-07-01 00:00:00.000 | 2018-07-02 00:00:00.000 |                  5 |               40 |           120 |              46 |                7 |               0.05 |       2257.9 |    1761.16  |       15015    |                  |
| SO - 000174   | In-Store        | WARE-NMK1003     | 2018-04-10 00:00:00.000 | 2018-06-08 00:00:00.000 | 2018-06-30 00:00:00.000 | 2018-07-06 00:00:00.000 |                  3 |                7 |           140 |              22 |                3 |               0.05 |       2659.9 |    2154.52  |        7580.71 |                  |
| SO - 000215   | In-Store        | WARE-NMK1003     | 2017-12-31 00:00:00.000 | 2018-06-14 00:00:00.000 | 2018-06-19 00:00:00.000 | 2018-06-20 00:00:00.000 |                  2 |               13 |           169 |              40 |                2 |               0.05 |       2546   |    1909.5   |        4837.4  |                  |
| SO - 000255   | In-Store        | WARE-NMK1003     | 2017-12-31 00:00:00.000 | 2018-06-18 00:00:00.000 | 2018-06-22 00:00:00.000 | 2018-06-26 00:00:00.000 |                  6 |               22 |           101 |               5 |                4 |               0.05 |        221.1 |     126.027 |         840.18 |                  |
| SO - 000260   | In-Store        | WARE-NMK1003     | 2018-04-10 00:00:00.000 | 2018-06-18 00:00:00.000 | 2018-07-02 00:00:00.000 | 2018-07-07 00:00:00.000 |                 10 |               26 |           119 |              35 |                1 |               0.05 |       1005   |     412.05  |         954.75 |                  |
| SO - 000266   | In-Store        | WARE-NMK1003     | 2017-12-31 00:00:00.000 | 2018-06-19 00:00:00.000 | 2018-06-28 00:00:00.000 | 2018-07-04 00:00:00.000 |                  1 |               19 |           126 |              19 |                6 |               0.05 |       6324.8 |    4300.86  |       36051.4  |                  |
| SO - 000310   | In-Store        | WARE-NMK1003     | 2018-04-10 00:00:00.000 | 2018-06-26 00:00:00.000 | 2018-07-16 00:00:00.000 | 2018-07-18 00:00:00.000 |                  1 |               14 |           187 |              22 |                8 |               0.05 |       1105.5 |     762.795 |        8401.8  |                  |
| SO - 000318   | In-Store        | WARE-NMK1003     | 2018-04-10 00:00:00.000 | 2018-06-27 00:00:00.000 | 2018-07-04 00:00:00.000 | 2018-07-06 00:00:00.000 |                  3 |               22 |           108 |              43 |                2 |               0.05 |       3852.5 |    2003.3   |        7319.75 |                  |
| SO - 000323   | In-Store        | WARE-NMK1003     | 2018-04-10 00:00:00.000 | 2018-06-27 00:00:00.000 | 2018-07-18 00:00:00.000 | 2018-07-22 00:00:00.000 |                  9 |                6 |           134 |              47 |                7 |               0.05 |       2479   |    2057.57  |       16485.3  |                  |


Table: Store Regions
|   id | City Name   | County              | State Code   | State      | Type   |   latitude |   longitude |   area_code |   population |   households |   median_income |   land_area |   water_area | time_zone           | State Region   |
|-----:|:------------|:--------------------|:-------------|:-----------|:-------|-----------:|------------:|------------:|-------------:|-------------:|----------------:|------------:|-------------:|:--------------------|:---------------|
|   16 | Anaheim     | Orange County       | CA           | California | City   |    33.8353 |    -117.915 |         657 |       350742 |        99670 |           60752 |   129438076 |      2457142 | America/Los Angeles | West           |
|   17 | Antioch     | Contra Costa County | CA           | California | City   |    38.0049 |    -121.806 |         925 |       110542 |        33718 |           64329 |    76173197 |      1842711 | America/Los Angeles | West           |
|   18 | Bakersfield | Kern County         | CA           | California | City   |    35.3733 |    -119.019 |         661 |       373640 |       112439 |           57095 |   385366784 |      3809676 | America/Los Angeles | West           |
|   19 | Berkeley    | Alameda County      | CA           | California | City   |    37.8716 |    -122.273 |         510 |       120972 |        45917 |           66237 |    27106077 |     18715614 | America/Los Angeles | West           |
|   20 | Burbank     | Los Angeles County  | CA           | California | City   |    34.1808 |    -118.309 |         818 |       105319 |        41361 |           66076 |    44947219 |        94286 | America/Los Angeles | West           |
|   21 | Carlsbad    | San Diego County    | CA           | California | City   |    33.1581 |    -117.351 |         760 |       113453 |        42791 |           90597 |    97713477 |      3595655 | America/Los Angeles | West           |
|   22 | Chula Vista | San Diego County    | CA           | California | City   |    32.64   |    -117.084 |         619 |       265757 |        78066 |           65185 |   128544440 |      6380135 | America/Los Angeles | West           |
|   23 | Clovis      | Fresno County       | CA           | California | City   |    36.8252 |    -119.703 |         559 |       104180 |        34512 |           62666 |    62693928 |            0 | America/Los Angeles | West           |
|   24 | Concord     | Contra Costa County | CA           | California | City   |    37.978  |    -122.031 |         925 |       128667 |        45409 |           68318 |    79108534 |            0 | America/Los Angeles | West           |
|   25 | Corona      | Riverside County    | CA           | California | City   |    33.8753 |    -117.566 |         951 |       164226 |        48156 |           74149 |   102233537 |       211897 | America/Los Angeles | West           |


Table: Warehouses
| Warehouse Code   | Warehouse Abv   | Warehouses   |
|:-----------------|:----------------|:-------------|
| WARE-UHY1004     | UHY1004         | uhy          |
| WARE-NMK1003     | NMK1003         | nmk          |
| WARE-PUJ1005     | PUJ1005         | puj          |
| WARE-XYS1001     | XYS1001         | xys          |
| WARE-MKL1006     | MKL1006         | mkl          |
| WARE-NBV1002     | NBV1002         | nbv          |

 


tables: name: Channels
data: Channels.csv
name: Customers
data: Customers.csv
name: Dates
data: Dates.csv
name: Products
data: Products.csv
name: Sales Team
data: Sales Team.csv
name: Sales
data: Sales.csv
name: Store Regions
data: Store Regions.csv
name: Warehouses
data: Warehouses.csv
label: Sales
Sales Channel
Channels
Sales Channel
Sales
Sales Team Index
Sales Team
Index
Sales
Warehouse Code
Warehouses
Warehouse Code
Sales
Product Index
Products
Index
Sales
Store Index
Store Regions
id
Sales
Customer Index
Customers
Customer Index
Sales
OrderDate
Dates
Date
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "Sales Channel",
            "to_table": "Channels",
            "to_column": "Sales Channel"
        },
        {
            "from_table": "Sales",
            "from_column": "Sales Team Index",
            "to_table": "Sales Team",
            "to_column": "Index"
        },
        {
            "from_table": "Sales",
            "from_column": "Warehouse Code",
            "to_table": "Warehouses",
            "to_column": "Warehouse Code"
        },
        {
            "from_table": "Sales",
            "from_column": "Product Index",
            "to_table": "Products",
            "to_column": "Index"
        },
        {
            "from_table": "Sales",
            "from_column": "Store Index",
            "to_table": "Store Regions",
            "to_column": "id"
        },
        {
            "from_table": "Sales",
            "from_column": "Customer Index",
            "to_table": "Customers",
            "to_column": "Customer Index"
        },
        {
            "from_table": "Sales",
            "from_column": "OrderDate",
            "to_table": "Dates",
            "to_column": "Date"
        }
    ]
}