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 Data
|   Customer Index | Customer Names   |
|-----------------:|:-----------------|
|                1 | Avon Corp        |
|                2 | WakeFern         |
|                3 | Elorac, Corp     |
|                4 | ETUDE Ltd        |
|                5 | Procter Corp     |
|                6 | PEDIFIX, Corp    |
|                7 | New Ltd          |
|                8 | Medsep Group     |
|                9 | Ei               |
|               10 | 21st Ltd         |


Table: Dates
| Date                    |   Year |   QuarterOfYear |   MonthOfYear |   DayOfMonth |   DateInt | MonthName   | Month & Year   | Quarter & Year   |   DayInWeek | DayOfWeekName   | WeekEnding              |   Week Number |   MonthnYear |   QuarternYear |   ShortYear | FY   | Short Month   | Day Type   |
|:------------------------|-------:|----------------:|--------------:|-------------:|----------:|:------------|:---------------|:-----------------|------------:|:----------------|:------------------------|--------------:|-------------:|---------------:|------------:|:-----|:--------------|:-----------|
| 2015-07-01 00:00:00.000 |   2015 |               3 |             7 |            1 |  20150701 | July        | Jul 2015       | Q3 2015          |           2 | Wednesday       | 2015-07-05 00:00:00.000 |            27 |     20150700 |       20150300 |          15 | FY16 | Jul           | Weekday    |
| 2015-07-02 00:00:00.000 |   2015 |               3 |             7 |            2 |  20150702 | July        | Jul 2015       | Q3 2015          |           3 | Thursday        | 2015-07-05 00:00:00.000 |            27 |     20150700 |       20150300 |          15 | FY16 | Jul           | Weekday    |
| 2015-07-03 00:00:00.000 |   2015 |               3 |             7 |            3 |  20150703 | July        | Jul 2015       | Q3 2015          |           4 | Friday          | 2015-07-05 00:00:00.000 |            27 |     20150700 |       20150300 |          15 | FY16 | Jul           | Weekday    |
| 2015-07-04 00:00:00.000 |   2015 |               3 |             7 |            4 |  20150704 | July        | Jul 2015       | Q3 2015          |           5 | Saturday        | 2015-07-05 00:00:00.000 |            27 |     20150700 |       20150300 |          15 | FY16 | Jul           | Weekend    |
| 2015-07-05 00:00:00.000 |   2015 |               3 |             7 |            5 |  20150705 | July        | Jul 2015       | Q3 2015          |           6 | Sunday          | 2015-07-05 00:00:00.000 |            27 |     20150700 |       20150300 |          15 | FY16 | Jul           | Weekend    |
| 2015-07-06 00:00:00.000 |   2015 |               3 |             7 |            6 |  20150706 | July        | Jul 2015       | Q3 2015          |           0 | Monday          | 2015-07-12 00:00:00.000 |            28 |     20150700 |       20150300 |          15 | FY16 | Jul           | Weekday    |
| 2015-07-07 00:00:00.000 |   2015 |               3 |             7 |            7 |  20150707 | July        | Jul 2015       | Q3 2015          |           1 | Tuesday         | 2015-07-12 00:00:00.000 |            28 |     20150700 |       20150300 |          15 | FY16 | Jul           | Weekday    |
| 2015-07-08 00:00:00.000 |   2015 |               3 |             7 |            8 |  20150708 | July        | Jul 2015       | Q3 2015          |           2 | Wednesday       | 2015-07-12 00:00:00.000 |            28 |     20150700 |       20150300 |          15 | FY16 | Jul           | Weekday    |
| 2015-07-09 00:00:00.000 |   2015 |               3 |             7 |            9 |  20150709 | July        | Jul 2015       | Q3 2015          |           3 | Thursday        | 2015-07-12 00:00:00.000 |            28 |     20150700 |       20150300 |          15 | FY16 | Jul           | Weekday    |
| 2015-07-10 00:00:00.000 |   2015 |               3 |             7 |           10 |  20150710 | July        | Jul 2015       | Q3 2015          |           4 | Friday          | 2015-07-12 00:00:00.000 |            28 |     20150700 |       20150300 |          15 | FY16 | Jul           | Weekday    |


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


Table: Products Data
|   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 Table
|   Index | Suburb            | City              |   postcode |   Longitude |   Latitude | Full Address                              |
|--------:|:------------------|:------------------|-----------:|------------:|-----------:|:------------------------------------------|
|       1 | Freemans Bay      | Auckland          |       1011 |     174.749 |   -36.8557 | Picton Street, Freemans Bay, Auckland     |
|       2 | Nightcaps         | Southland         |       9630 |     168.029 |   -45.9703 | Lyne Street, Nightcaps, Southland         |
|       3 | Northcote         | North Shore       |        627 |     174.756 |   -36.8047 | McBreen Avenue, Northcote, North Shore    |
|       4 | Bay View          | Napier            |       4104 |     176.872 |   -39.4404 | Ferguson Street South, Bay View, Napier   |
|       5 | Parklands         | Christchurch      |       8083 |     172.706 |   -43.4727 | Forest Drive, Parklands, Christchurch     |
|       6 | Hamilton East     | Hamilton          |       3216 |     175.305 |   -37.7817 | Rochford Court, Hamilton, Hamilton        |
|       7 | Te Kuiti          | Waitomo           |       3910 |     175.163 |   -38.331  | Alexandra Street, Te Kuiti, Waitomo       |
|       8 | Opaheke           | Papakura          |       2113 |     174.948 |   -37.0774 | Rhonda Place, Opaheke, Papakura           |
|       9 | North East Valley | Dunedin           |       9010 |     170.527 |   -45.8468 | Selwyn Street, North East Valley, Dunedin |
|      10 | Whangamata        | Thames-Coromandel |       3620 |     175.883 |   -37.2192 | Pipi Road, Whangamata, Thames-Coromandel  |


Table: Sales Data
| OrderNumber   | OrderDate               | Ship Date               |   Customer Name Index | Channel   | Currency Code   | Warehouse Code   |   Delivery Region Index |   Product Description Index |   Order Quantity |   Unit Price |   Total Unit Cost |   Total Revenue |   Total Costs |   Profit Margin |
|:--------------|:------------------------|:------------------------|----------------------:|:----------|:----------------|:-----------------|------------------------:|----------------------------:|-----------------:|-------------:|------------------:|----------------:|--------------:|----------------:|
| SO - 000105   | 2014-06-01 00:00:00.000 | 2014-08-28 00:00:00.000 |                    49 | Wholesale | NZD             | AXW291           |                      20 |                           7 |                6 |       1822.4 |          1476.14  |         10934.4 |       8856.86 |            0.19 |
| SO - 000120   | 2014-06-02 00:00:00.000 | 2014-08-06 00:00:00.000 |                    23 | Wholesale | NZD             | AXW291           |                      25 |                           7 |                8 |       3095.4 |          1795.33  |         24763.2 |      14362.7  |            0.42 |
| SO - 000126   | 2014-06-03 00:00:00.000 | 2014-07-10 00:00:00.000 |                    46 | Wholesale | NZD             | AXW291           |                      20 |                           7 |               11 |        174.2 |            95.81  |          1916.2 |       1053.91 |            0.45 |
| SO - 000153   | 2014-06-06 00:00:00.000 | 2014-08-11 00:00:00.000 |                     8 | Wholesale | NZD             | AXW291           |                      20 |                           7 |               11 |       3926.2 |          3062.44  |         43188.2 |      33686.8  |            0.22 |
| SO - 000172   | 2014-06-09 00:00:00.000 | 2014-08-16 00:00:00.000 |                     6 | Wholesale | NZD             | AXW291           |                      18 |                           7 |                6 |       1005   |           743.7   |          6030   |       4462.2  |            0.26 |
| SO - 000175   | 2014-06-10 00:00:00.000 | 2014-07-12 00:00:00.000 |                     1 | Wholesale | NZD             | AXW291           |                      20 |                           7 |               11 |       2224.4 |          1579.32  |         24468.4 |      17372.6  |            0.29 |
| SO - 000192   | 2014-06-12 00:00:00.000 | 2014-08-17 00:00:00.000 |                    24 | Wholesale | NZD             | AXW291           |                      31 |                           7 |                8 |       1152.4 |           622.296 |          9219.2 |       4978.37 |            0.46 |
| SO - 000193   | 2014-06-12 00:00:00.000 | 2014-08-28 00:00:00.000 |                    25 | Wholesale | NZD             | AXW291           |                      24 |                           7 |                5 |       1085.4 |           922.59  |          5427   |       4612.95 |            0.15 |
| SO - 000194   | 2014-06-13 00:00:00.000 | 2014-08-17 00:00:00.000 |                    11 | Wholesale | NZD             | AXW291           |                      27 |                           7 |                5 |       5031.7 |          4025.36  |         25158.5 |      20126.8  |            0.2  |
| SO - 000195   | 2014-06-13 00:00:00.000 | 2014-08-04 00:00:00.000 |                    17 | Wholesale | NZD             | AXW291           |                      18 |                           7 |                8 |       1092.1 |           436.84  |          8736.8 |       3494.72 |            0.6  |

 


tables: name: Customer Data
data: Customer Data.csv
name: Dates
data: Dates.csv
name: Key Measures
data: Key Measures.csv
name: Products Data
data: Products Data.csv
name: Regions Table
data: Regions Table.csv
name: Sales Data
data: Sales Data.csv
label: Sales Data
Product Description Index
Products Data
Index
Sales Data
Delivery Region Index
Regions Table
Index
Sales Data
Customer Name Index
Customer Data
Customer Index
output: {
    "joins": [
        {
            "from_table": "Sales Data",
            "from_column": "Product Description Index",
            "to_table": "Products Data",
            "to_column": "Index"
        },
        {
            "from_table": "Sales Data",
            "from_column": "Delivery Region Index",
            "to_table": "Regions Table",
            "to_column": "Index"
        },
        {
            "from_table": "Sales Data",
            "from_column": "Customer Name Index",
            "to_table": "Customer Data",
            "to_column": "Customer Index"
        }
    ]
}