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 Details
|   Customer Index | Customer Names     | Last Purchase Date      |
|-----------------:|:-------------------|:------------------------|
|                1 | Christy  Olson     | 2020-05-27 00:00:00.000 |
|                2 | Dan  Peterson      | 2020-05-19 00:00:00.000 |
|                3 | Mable  Lindsey     | 2020-06-04 00:00:00.000 |
|                4 | Kyle  Carr         | 2020-05-28 00:00:00.000 |
|                5 | Rachel  Gomez      | 2020-04-12 00:00:00.000 |
|                6 | Isabel  Cross      | 2020-05-27 00:00:00.000 |
|                7 | Billie  Chandler   | 2020-04-06 00:00:00.000 |
|                8 | Sylvester  Morales | 2020-06-02 00:00:00.000 |
|                9 | Rachel  Gomez      | 2020-06-04 00:00:00.000 |
|               10 | Beth  Tucker       | 2020-05-16 00:00:00.000 |


Table: Date
| Date                    | Month Name   | Week Name   |
|:------------------------|:-------------|:------------|
| 2019-01-01 00:00:00.000 | Jan          | Tuesday     |
| 2019-01-02 00:00:00.000 | Jan          | Wednesday   |
| 2019-01-03 00:00:00.000 | Jan          | Thursday    |
| 2019-01-04 00:00:00.000 | Jan          | Friday      |
| 2019-01-05 00:00:00.000 | Jan          | Saturday    |
| 2019-01-06 00:00:00.000 | Jan          | Sunday      |
| 2019-01-07 00:00:00.000 | Jan          | Monday      |
| 2019-01-08 00:00:00.000 | Jan          | Tuesday     |
| 2019-01-09 00:00:00.000 | Jan          | Wednesday   |
| 2019-01-10 00:00:00.000 | Jan          | Thursday    |


Table: DimDate
| Date                    |   Year |   QuarterOfYear |   MonthOfYear |   DayOfMonth |   DateInt | MonthName   | MonthInCalendar   | QuarterInCalendar   |   DayInWeek | DayOfWeekName   | WeekEnding              |   Week Number |   MonthnYear |   QuarternYear |   ShortYear | FY   |
|:------------------------|-------:|----------------:|--------------:|-------------:|----------:|:------------|:------------------|:--------------------|------------:|:----------------|:------------------------|--------------:|-------------:|---------------:|------------:|:-----|
| 2019-07-01 00:00:00.000 |   2019 |               3 |             7 |            1 |  20190701 | July        | Jul 2019          | Q3 2019             |           0 | Monday          | 2019-07-07 00:00:00.000 |            27 |     20190700 |       20190300 |          19 | FY20 |
| 2019-07-02 00:00:00.000 |   2019 |               3 |             7 |            2 |  20190702 | July        | Jul 2019          | Q3 2019             |           1 | Tuesday         | 2019-07-07 00:00:00.000 |            27 |     20190700 |       20190300 |          19 | FY20 |
| 2019-07-03 00:00:00.000 |   2019 |               3 |             7 |            3 |  20190703 | July        | Jul 2019          | Q3 2019             |           2 | Wednesday       | 2019-07-07 00:00:00.000 |            27 |     20190700 |       20190300 |          19 | FY20 |
| 2019-07-04 00:00:00.000 |   2019 |               3 |             7 |            4 |  20190704 | July        | Jul 2019          | Q3 2019             |           3 | Thursday        | 2019-07-07 00:00:00.000 |            27 |     20190700 |       20190300 |          19 | FY20 |
| 2019-07-05 00:00:00.000 |   2019 |               3 |             7 |            5 |  20190705 | July        | Jul 2019          | Q3 2019             |           4 | Friday          | 2019-07-07 00:00:00.000 |            27 |     20190700 |       20190300 |          19 | FY20 |
| 2019-07-06 00:00:00.000 |   2019 |               3 |             7 |            6 |  20190706 | July        | Jul 2019          | Q3 2019             |           5 | Saturday        | 2019-07-07 00:00:00.000 |            27 |     20190700 |       20190300 |          19 | FY20 |
| 2019-07-07 00:00:00.000 |   2019 |               3 |             7 |            7 |  20190707 | July        | Jul 2019          | Q3 2019             |           6 | Sunday          | 2019-07-07 00:00:00.000 |            27 |     20190700 |       20190300 |          19 | FY20 |
| 2019-07-08 00:00:00.000 |   2019 |               3 |             7 |            8 |  20190708 | July        | Jul 2019          | Q3 2019             |           0 | Monday          | 2019-07-14 00:00:00.000 |            28 |     20190700 |       20190300 |          19 | FY20 |
| 2019-07-09 00:00:00.000 |   2019 |               3 |             7 |            9 |  20190709 | July        | Jul 2019          | Q3 2019             |           1 | Tuesday         | 2019-07-14 00:00:00.000 |            28 |     20190700 |       20190300 |          19 | FY20 |
| 2019-07-10 00:00:00.000 |   2019 |               3 |             7 |           10 |  20190710 | July        | Jul 2019          | Q3 2019             |           2 | Wednesday       | 2019-07-14 00:00:00.000 |            28 |     20190700 |       20190300 |          19 | FY20 |


Table: Feedback
|   Feedback | Emoji   |
|-----------:|:--------|
|          1 | 😡      |
|          2 | ☹       |
|          3 | 😐      |
|          4 | 🙂      |
|          5 | 😊      |


Table: Product Details
|   Product ID | Product Name   |   Sales per Product | Sales Segment   |
|-------------:|:---------------|--------------------:|:----------------|
|            1 | Colde roller   |         9.32538e+06 | High Sales      |
|            2 | C Can          |         9.56685e+06 | High Sales      |
|            3 | Amlodipine     |         8.62747e+06 | High Sales      |
|            4 | Brilinta       |         9.45026e+06 | High Sales      |
|            5 | Humira         |         1.18007e+07 | High Sales      |
|            6 | Lyrica         |         6.69152e+06 | High Sales      |
|            7 | Xanax          |         2.84304e+06 | Low Sales       |
|            8 | Imbruvica      |         3.30845e+06 | Better Sales    |
|            9 | Prednisone     |         2.4331e+06  | Low Sales       |
|           10 | Onpattro       |         2.94343e+06 | Low Sales       |


Table: Region
|   Index | State      | City                  | Country   |
|--------:|:-----------|:----------------------|:----------|
|       1 | Oregon     | LONDON                | UK        |
|       2 | California | BERLIN                | Germany   |
|       3 | Wyoming    | MADRID                | Spain     |
|       4 | California | ROMA                  | Italy     |
|       5 | Wyoming    | KIEV                  | Ukraine   |
|       6 | California | PARIS                 | France    |
|       7 | Nevada     | BUCURESTI (Bucharest) | Romania   |
|       8 | Wyoming    | BUDAPEST              | Hungary   |
|       9 | California | Hamburg               | Germany   |
|      10 | California | MINSK                 | Belarus   |


Table: Sales Details
|   Order ID | OrderDate               |   Customer Name Index | Channel    | Currency Code   | Code     |   Region ID |   Product ID |   Quantity |   Unit Price |    Unit Cost |
|-----------:|:------------------------|----------------------:|:-----------|:----------------|:---------|------------:|-------------:|-----------:|-------------:|-------------:|
|      11004 | 2019-01-01 00:00:00.000 |                     8 | Industries | Euro            | INX005RT |          49 |           26 |          6 |        978.2 |      684.74  |
|      11011 | 2019-01-02 00:00:00.000 |                   111 | Industries | Euro            | INX005RT |          33 |           26 |         12 |       3872.6 |     2517.19  |
|      11088 | 2019-01-08 00:00:00.000 |                    93 | Industries | Euro            | INX005RT |          48 |           26 |          6 |       1105.5 |      851.235 |
|      11102 | 2019-01-09 00:00:00.000 |                    15 | Industries | Euro            | INX005RT |          39 |           26 |          9 |       1072   |      600.32  |
|      11117 | 2019-01-11 00:00:00.000 |                   100 | Industries | Euro            | INX005RT |          45 |           26 |          7 |       2345   |     1219.4   |
|      11126 | 2019-01-12 00:00:00.000 |                    88 | Industries | Euro            | INX005RT |          43 |           26 |         10 |        201   |      160.8   |
|      11192 | 2019-01-16 00:00:00.000 |                    13 | Industries | Euro            | INX005RT |          51 |           26 |          8 |       1862.6 |      949.926 |
|      11206 | 2019-01-18 00:00:00.000 |                    91 | Industries | Euro            | INX005RT |          46 |           26 |          7 |        737   |      626.45  |
|      11209 | 2019-01-18 00:00:00.000 |                    59 | Industries | Euro            | INX005RT |           2 |           26 |          8 |       2512.5 |     1331.62  |
|      11241 | 2019-01-21 00:00:00.000 |                     4 | Industries | Euro            | INX005RT |          60 |           26 |         10 |        857.6 |      497.408 |


Table: Sales Germany
|   Order ID | OrderDate               |   Customer Name Index | Channel    | Currency Code   | Code     |   Region ID |   Product ID |   Quantity |   Unit Price |    Unit Cost | Country   |
|-----------:|:------------------------|----------------------:|:-----------|:----------------|:---------|------------:|-------------:|-----------:|-------------:|-------------:|:----------|
|      11663 | 2019-02-24 00:00:00.000 |                   156 | Industries | Euro            | INX005RT |          25 |           26 |         11 |       1862.6 |      745.04  | Germany   |
|      11669 | 2019-02-25 00:00:00.000 |                    59 | Industries | Euro            | INX005RT |          63 |           26 |         11 |       1212.7 |      715.493 | Germany   |
|      12747 | 2019-05-27 00:00:00.000 |                   125 | Industries | Euro            | INX005RT |          49 |           26 |         11 |       3162.4 |     1676.07  | Germany   |
|      13214 | 2019-07-05 00:00:00.000 |                    94 | Industries | Euro            | INX005RT |          52 |           26 |         11 |       1051.9 |      725.811 | Germany   |
|      15766 | 2019-01-26 00:00:00.000 |                   113 | Industries | Euro            | INX005RT |          45 |           26 |         11 |       1943   |     1573.83  | Germany   |
|      20761 | 2020-03-20 00:00:00.000 |                   109 | Industries | Euro            | INX005RT |           2 |           26 |         11 |       6023.3 |     3734.45  | Germany   |
|      11027 | 2019-01-03 00:00:00.000 |                    88 | Industries | Euro            | INX005RT |          62 |           25 |         11 |       1038.5 |      633.485 | Germany   |
|      11197 | 2019-01-17 00:00:00.000 |                    60 | Industries | Euro            | INX005RT |          63 |           25 |         11 |       6358.3 |     3942.15  | Germany   |
|      11274 | 2019-01-25 00:00:00.000 |                    39 | Industries | Euro            | INX005RT |          51 |           25 |         11 |        174.2 |      127.166 | Germany   |
|      12608 | 2019-05-16 00:00:00.000 |                   173 | Industries | Euro            | INX005RT |          49 |           25 |         11 |       1031.8 |      629.398 | Germany   |

 


tables: name: Customer Details
data: Customer Details.csv
name: Date
data: Date.csv
name: DimDate
data: DimDate.csv
name: Feedback
data: Feedback.csv
name: Product Details
data: Product Details.csv
name: Region
data: Region.csv
name: Sales Details
data: Sales Details.csv
name: Sales Germany
data: Sales Germany.csv
label: Sales Details
Product ID
Product Details
Product ID
Sales Details
Region ID
Region
Index
Sales Details
Customer Name Index
Customer Details
Customer Index
Sales Details
OrderDate
DimDate
Date
output: {
    "joins": [
        {
            "from_table": "Sales Details",
            "from_column": "Product ID",
            "to_table": "Product Details",
            "to_column": "Product ID"
        },
        {
            "from_table": "Sales Details",
            "from_column": "Region ID",
            "to_table": "Region",
            "to_column": "Index"
        },
        {
            "from_table": "Sales Details",
            "from_column": "Customer Name Index",
            "to_table": "Customer Details",
            "to_column": "Customer Index"
        },
        {
            "from_table": "Sales Details",
            "from_column": "OrderDate",
            "to_table": "DimDate",
            "to_column": "Date"
        }
    ]
}