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     |
|-----------------:|:-------------------|
|                1 | Homerus McRory     |
|                2 | Paige Ledley       |
|                3 | Dicky McGriele     |
|                4 | Norean Scherme     |
|                5 | Branden Kiehne     |
|                6 | Babbette McKinnell |
|                7 | Lorry Gregs        |
|                8 | Levy Tucker        |
|                9 | Gerti Blissett     |
|               10 | Nicky Degoey       |


Table: DateDetails
| Date                    |
|:------------------------|
| 2018-07-27 00:00:00.000 |
| 2018-07-28 00:00:00.000 |
| 2018-07-29 00:00:00.000 |
| 2018-07-30 00:00:00.000 |
| 2018-07-31 00:00:00.000 |
| 2018-08-01 00:00:00.000 |
| 2018-08-02 00:00:00.000 |
| 2018-08-03 00:00:00.000 |
| 2018-08-04 00:00:00.000 |
| 2018-08-05 00:00:00.000 |


Table: dDate
| Date                    |   Year |   QuarterOfYear |   MonthOfYear |   DayOfMonth |   DateInt | MonthName   | MonthInCalendar   | QuarterInCalendar   |   DayInWeek | DayOfWeekName   | WeekEnding              |   Week Number |   MonthnYear |   QuarternYear |   ShortYear | FY   |
|:------------------------|-------:|----------------:|--------------:|-------------:|----------:|:------------|:------------------|:--------------------|------------:|:----------------|:------------------------|--------------:|-------------:|---------------:|------------:|:-----|
| 2018-10-01 00:00:00.000 |   2018 |               4 |            10 |            1 |  20181001 | October     | Oct 2018          | 2018 Q4             |           0 | Monday          | 2018-10-07 00:00:00.000 |            40 |     20181000 |       20180400 |          18 | FY19 |
| 2018-10-02 00:00:00.000 |   2018 |               4 |            10 |            2 |  20181002 | October     | Oct 2018          | 2018 Q4             |           1 | Tuesday         | 2018-10-07 00:00:00.000 |            40 |     20181000 |       20180400 |          18 | FY19 |
| 2018-10-03 00:00:00.000 |   2018 |               4 |            10 |            3 |  20181003 | October     | Oct 2018          | 2018 Q4             |           2 | Wednesday       | 2018-10-07 00:00:00.000 |            40 |     20181000 |       20180400 |          18 | FY19 |
| 2018-10-04 00:00:00.000 |   2018 |               4 |            10 |            4 |  20181004 | October     | Oct 2018          | 2018 Q4             |           3 | Thursday        | 2018-10-07 00:00:00.000 |            40 |     20181000 |       20180400 |          18 | FY19 |
| 2018-10-05 00:00:00.000 |   2018 |               4 |            10 |            5 |  20181005 | October     | Oct 2018          | 2018 Q4             |           4 | Friday          | 2018-10-07 00:00:00.000 |            40 |     20181000 |       20180400 |          18 | FY19 |
| 2018-10-06 00:00:00.000 |   2018 |               4 |            10 |            6 |  20181006 | October     | Oct 2018          | 2018 Q4             |           5 | Saturday        | 2018-10-07 00:00:00.000 |            40 |     20181000 |       20180400 |          18 | FY19 |
| 2018-10-07 00:00:00.000 |   2018 |               4 |            10 |            7 |  20181007 | October     | Oct 2018          | 2018 Q4             |           6 | Sunday          | 2018-10-07 00:00:00.000 |            40 |     20181000 |       20180400 |          18 | FY19 |
| 2018-10-08 00:00:00.000 |   2018 |               4 |            10 |            8 |  20181008 | October     | Oct 2018          | 2018 Q4             |           0 | Monday          | 2018-10-14 00:00:00.000 |            41 |     20181000 |       20180400 |          18 | FY19 |
| 2018-10-09 00:00:00.000 |   2018 |               4 |            10 |            9 |  20181009 | October     | Oct 2018          | 2018 Q4             |           1 | Tuesday         | 2018-10-14 00:00:00.000 |            41 |     20181000 |       20180400 |          18 | FY19 |
| 2018-10-10 00:00:00.000 |   2018 |               4 |            10 |           10 |  20181010 | October     | Oct 2018          | 2018 Q4             |           2 | Wednesday       | 2018-10-14 00:00:00.000 |            41 |     20181000 |       20180400 |          18 | FY19 |


Table: Product Details
|   Product ID | Product Name                |
|-------------:|:----------------------------|
|            1 | Pluracol 945                |
|            2 | Pluracol GP430              |
|            3 | Sokalan HP 20               |
|            4 | Sodium Sulphide             |
|            5 | Proppionic Acid             |
|            6 | Puracol 1578                |
|            7 | Sodium Metasilicate         |
|            8 | Troclosene Sodium Dihydrate |
|            9 | Sodium Hydroxide            |
|           10 | Potassium Hydroxide         |


Table: Region
|   Region ID | State      | City      | Country   | Full Name          |
|------------:|:-----------|:----------|:----------|:-------------------|
|           1 | Oregon     | London    | UK        | London, UK         |
|           2 | California | Berlin    | Germany   | Berlin, Germany    |
|           3 | Wyoming    | Madrid    | Spain     | Madrid, Spain      |
|           4 | California | Rome      | Italy     | Rome, Italy        |
|           5 | Wyoming    | Kiev      | Ukraine   | Kiev, Ukraine      |
|           6 | California | Paris     | France    | Paris, France      |
|           7 | Nevada     | Bucharest | Romania   | Bucharest, Romania |
|           8 | Wyoming    | Budapest  | Hungary   | Budapest, Hungary  |
|           9 | California | Hamburg   | Germany   | Hamburg, Germany   |
|          10 | California | Minsk     | Belarus   | Minsk, Belarus     |


Table: Sales Details
|   Order Number | Order Date              |   Customer Name Index | Channel   | Currency Code   |   Region ID |   Product ID |   Quantity |   Unit Price |   Line Total |   Total Unit Cost |   Revenue |
|---------------:|:------------------------|----------------------:|:----------|:----------------|------------:|-------------:|-----------:|-------------:|-------------:|------------------:|----------:|
|          11101 | 2018-08-05 00:00:00.000 |                    81 | Import    | Euro            |          38 |           25 |         12 |       1259.6 |      15115.2 |           516.436 |   15115.2 |
|          11106 | 2018-08-06 00:00:00.000 |                   106 | Import    | Euro            |          65 |           25 |          5 |       1098.8 |       5494   |           505.448 |    5494   |
|          11149 | 2018-08-10 00:00:00.000 |                   135 | Import    | Euro            |          27 |           25 |         11 |       5038.4 |      55422.4 |          3778.8   |   55422.4 |
|          11171 | 2018-08-12 00:00:00.000 |                    14 | Import    | Euro            |          48 |           25 |          8 |        261.3 |       2090.4 |           154.167 |    2090.4 |
|          11185 | 2018-08-13 00:00:00.000 |                   118 | Import    | Euro            |          50 |           25 |          5 |        214.4 |       1072   |           150.08  |    1072   |
|          11230 | 2018-08-17 00:00:00.000 |                    68 | Import    | Euro            |          46 |           25 |         10 |        167.5 |       1675   |           130.65  |    1675   |
|          11248 | 2018-08-18 00:00:00.000 |                   131 | Import    | Euro            |          18 |           25 |         11 |       3926.2 |      43188.2 |          1688.27  |   43188.2 |
|          11260 | 2018-08-19 00:00:00.000 |                    47 | Import    | Euro            |          33 |           25 |          9 |       3906.1 |      35154.9 |          2499.9   |   35154.9 |
|          11266 | 2018-08-20 00:00:00.000 |                    11 | Import    | Euro            |           1 |           25 |          7 |       2445.5 |      17118.5 |          1222.75  |   17118.5 |
|          11493 | 2018-09-08 00:00:00.000 |                    42 | Import    | Euro            |          28 |           25 |          9 |       4013.3 |      36119.7 |          2327.71  |   36119.7 |

 


tables: name: Customer Details
data: Customer Details.csv
name: DateDetails
data: DateDetails.csv
name: dDate
data: dDate.csv
name: Product Details
data: Product Details.csv
name: Region
data: Region.csv
name: Sales Details
data: Sales Details.csv
label: Sales Details
Product ID
Product Details
Product ID
Sales Details
Region ID
Region
Region ID
Sales Details
Customer Name Index
Customer Details
Customer Index
Sales Details
Order Date
dDate
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": "Region ID"
        },
        {
            "from_table": "Sales Details",
            "from_column": "Customer Name Index",
            "to_table": "Customer Details",
            "to_column": "Customer Index"
        },
        {
            "from_table": "Sales Details",
            "from_column": "Order Date",
            "to_table": "dDate",
            "to_column": "Date"
        }
    ]
}