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 | Christy  Olson     |
|                2 | Dan  Peterson      |
|                3 | Mable  Lindsey     |
|                4 | Kyle  Carr         |
|                5 | Rachel  Gomez      |
|                6 | Isabel  Cross      |
|                7 | Billie  Chandler   |
|                8 | Sylvester  Morales |
|                9 | Rachel  Gomez      |
|               10 | Beth  Tucker       |


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: Product Details
|   Product ID | Product Name   |
|-------------:|:---------------|
|            1 | Colde roller   |
|            2 | C Can          |
|            3 | Amlodipine     |
|            4 | Brilinta       |
|            5 | Humira         |
|            6 | Lyrica         |
|            7 | Xanax          |
|            8 | Imbruvica      |
|            9 | Prednisone     |
|           10 | Onpattro       |


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 |

 


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