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: Date1
| Dates                   |   Month | Month Name   |
|:------------------------|--------:|:-------------|
| 2018-06-01 00:00:00.000 |       6 | Jun          |
| 2018-06-02 00:00:00.000 |       6 | Jun          |
| 2018-06-03 00:00:00.000 |       6 | Jun          |
| 2018-06-04 00:00:00.000 |       6 | Jun          |
| 2018-06-05 00:00:00.000 |       6 | Jun          |
| 2018-06-06 00:00:00.000 |       6 | Jun          |
| 2018-06-07 00:00:00.000 |       6 | Jun          |
| 2018-06-08 00:00:00.000 |       6 | Jun          |
| 2018-06-09 00:00:00.000 |       6 | Jun          |
| 2018-06-10 00:00:00.000 |       6 | Jun          |


Table: DBDowntime
|   DowntimeID |   LineID |   TeamID | ShiftID   | Date                    | DowntimeName   | DowntimeType   |   Downtime (s) |   Downtime (min) |
|-------------:|---------:|---------:|:----------|:------------------------|:---------------|:---------------|---------------:|-----------------:|
|          305 |        3 |        2 | NULL      | 2018-06-18 00:00:00.000 | NULL           | NULL           |            255 |          4.25    |
|           49 |        2 |        2 | NULL      | 2018-06-18 00:00:00.000 | NULL           | NULL           |            232 |          3.86667 |
|          279 |        3 |        2 | NULL      | 2018-06-18 00:00:00.000 | NULL           | NULL           |            343 |          5.71667 |
|          282 |        2 |        1 | NULL      | 2018-06-18 00:00:00.000 | NULL           | NULL           |            146 |          2.43333 |
|          283 |        1 |        1 | NULL      | 2018-06-18 00:00:00.000 | NULL           | NULL           |             98 |          1.63333 |
|          192 |        1 |        3 | NULL      | 2018-06-18 00:00:00.000 | NULL           | NULL           |             85 |          1.41667 |
|          193 |        1 |        3 | NULL      | 2018-06-18 00:00:00.000 | NULL           | NULL           |             99 |          1.65    |
|          194 |        1 |        3 | NULL      | 2018-06-18 00:00:00.000 | NULL           | NULL           |             65 |          1.08333 |
|          352 |        2 |        2 | NULL      | 2018-06-19 00:00:00.000 | NULL           | NULL           |            113 |          1.88333 |
|          353 |        3 |        1 | NULL      | 2018-06-19 00:00:00.000 | NULL           | NULL           |            146 |          2.43333 |


Table: DBMachineUtilization1
|   ID |   LineID |   TeamID | ShiftID   | Date                    |   ProductionFBE |   ProductionFBETheoretical |   ScrapFBE |   Net Production Column |
|-----:|---------:|---------:|:----------|:------------------------|----------------:|---------------------------:|-----------:|------------------------:|
|   63 |        1 |        3 | NULL      | 2018-06-19 00:00:00.000 |         351.767 |                    377.358 |          0 |                 351.767 |
|   66 |        1 |        3 | NULL      | 2018-06-19 00:00:00.000 |         297.997 |                    377.358 |          0 |                 297.997 |
|   68 |        1 |        3 | NULL      | 2018-06-19 00:00:00.000 |         325.636 |                    377.358 |          0 |                 325.636 |
|   72 |        1 |        3 | NULL      | 2018-06-19 00:00:00.000 |         332.169 |                    377.358 |          0 |                 332.169 |
|   74 |        1 |        1 | NULL      | 2018-06-19 00:00:00.000 |         307.043 |                    377.358 |          0 |                 307.043 |
|   76 |        1 |        1 | NULL      | 2018-06-19 00:00:00.000 |         329.656 |                    377.358 |          0 |                 329.656 |
|   81 |        1 |        1 | NULL      | 2018-06-19 00:00:00.000 |         314.581 |                    377.358 |          0 |                 314.581 |
|   84 |        1 |        1 | NULL      | 2018-06-19 00:00:00.000 |         287.947 |                    377.358 |          0 |                 287.947 |
|   85 |        1 |        1 | NULL      | 2018-06-19 00:00:00.000 |          69.851 |                    377.358 |          0 |                  69.851 |
|   88 |        1 |        1 | NULL      | 2018-06-19 00:00:00.000 |         257.293 |                    377.358 |          0 |                 257.293 |


Table: DBProduction
|   ProductionID |   LineID |   TeamID | ShiftID   | Date                    | DateTruncatedToHour     |   Item ID produced |
|---------------:|---------:|---------:|:----------|:------------------------|:------------------------|-------------------:|
|        3018347 |        1 |        3 | NULL      | 2018-06-19 00:00:00.000 | 2018-06-19 00:00:00.000 |             563216 |
|        3018441 |        1 |        3 | NULL      | 2018-06-19 00:00:00.000 | 2018-06-19 00:00:00.000 |             563216 |
|        3028217 |        1 |        3 | NULL      | 2018-06-19 00:00:00.000 | 2018-06-19 00:00:00.000 |             563216 |
|        3028311 |        1 |        3 | NULL      | 2018-06-19 00:00:00.000 | 2018-06-19 00:00:00.000 |             563216 |
|        3029251 |        1 |        3 | NULL      | 2018-06-19 00:00:00.000 | 2018-06-19 00:00:00.000 |             563216 |
|        3029345 |        1 |        3 | NULL      | 2018-06-19 00:00:00.000 | 2018-06-19 00:00:00.000 |             563216 |
|        3031601 |        1 |        3 | NULL      | 2018-06-19 00:00:00.000 | 2018-06-19 00:00:00.000 |             563216 |
|        3031695 |        1 |        3 | NULL      | 2018-06-19 00:00:00.000 | 2018-06-19 00:00:00.000 |             563216 |
|        3035925 |        1 |        3 | NULL      | 2018-06-19 00:00:00.000 | 2018-06-19 00:00:00.000 |             563216 |
|        3036019 |        1 |        3 | NULL      | 2018-06-19 00:00:00.000 | 2018-06-19 00:00:00.000 |             563216 |


Table: DBRightFirstTime
|   RowID |   LineID |   TeamID | ShiftID   | Date                    |   ProductionFBE |   ReworkFBE |   ScrapFBE |   Net Right First Time Column |
|--------:|---------:|---------:|:----------|:------------------------|----------------:|------------:|-----------:|------------------------------:|
|  312976 |        3 |        3 | NULL      | 2018-06-18 00:00:00.000 |               0 |         0.5 |          0 |                          -0.5 |
|  312983 |        3 |        3 | NULL      | 2018-06-18 00:00:00.000 |               0 |         0.5 |          0 |                          -0.5 |
|  313004 |        3 |        3 | NULL      | 2018-06-18 00:00:00.000 |               0 |         0.5 |          0 |                          -0.5 |
|  313013 |        3 |        3 | NULL      | 2018-06-18 00:00:00.000 |               0 |         0.5 |          0 |                          -0.5 |
|  313019 |        3 |        3 | NULL      | 2018-06-18 00:00:00.000 |               0 |         0.5 |          0 |                          -0.5 |
|  313021 |        3 |        3 | NULL      | 2018-06-18 00:00:00.000 |               0 |         0.5 |          0 |                          -0.5 |
|  313023 |        3 |        3 | NULL      | 2018-06-18 00:00:00.000 |               0 |         0.5 |          0 |                          -0.5 |
|  313027 |        3 |        3 | NULL      | 2018-06-18 00:00:00.000 |               0 |         0.5 |          0 |                          -0.5 |
|  313035 |        3 |        3 | NULL      | 2018-06-18 00:00:00.000 |               0 |         0.5 |          0 |                          -0.5 |
|  313036 |        3 |        3 | NULL      | 2018-06-18 00:00:00.000 |               0 |         0.5 |          0 |                          -0.5 |


Table: Line Table
|   LineID | Line Name   |
|---------:|:------------|
|        1 | Line 1      |
|        2 | Line 2      |
|        3 | Line 3      |


Table: Team Table
|   TeamID | Team Name   |
|---------:|:------------|
|        1 | Team 1      |
|        2 | Team 2      |
|        3 | Team 3      |

 


tables: name: Date1
data: Date1.csv
name: DBDowntime
data: DBDowntime.csv
name: DBMachineUtilization1
data: DBMachineUtilization1.csv
name: DBProduction
data: DBProduction.csv
name: DBRightFirstTime
data: DBRightFirstTime.csv
name: Line Table
data: Line Table.csv
name: Team Table
data: Team Table.csv
label: DBDowntime
LineID
Line Table
LineID
DBDowntime
TeamID
Team Table
TeamID
DBProduction
LineID
Line Table
LineID
DBProduction
TeamID
Team Table
TeamID
DBRightFirstTime
LineID
Line Table
LineID
DBMachineUtilization1
LineID
Line Table
LineID
DBMachineUtilization1
TeamID
Team Table
TeamID
DBRightFirstTime
TeamID
Team Table
TeamID
DBDowntime
Date
Date1
Dates
DBProduction
Date
Date1
Dates
DBRightFirstTime
Date
Date1
Dates
DBMachineUtilization1
Date
Date1
Dates
output: {
    "joins": [
        {
            "from_table": "DBDowntime",
            "from_column": "LineID",
            "to_table": "Line Table",
            "to_column": "LineID"
        },
        {
            "from_table": "DBDowntime",
            "from_column": "TeamID",
            "to_table": "Team Table",
            "to_column": "TeamID"
        },
        {
            "from_table": "DBProduction",
            "from_column": "LineID",
            "to_table": "Line Table",
            "to_column": "LineID"
        },
        {
            "from_table": "DBProduction",
            "from_column": "TeamID",
            "to_table": "Team Table",
            "to_column": "TeamID"
        },
        {
            "from_table": "DBRightFirstTime",
            "from_column": "LineID",
            "to_table": "Line Table",
            "to_column": "LineID"
        },
        {
            "from_table": "DBMachineUtilization1",
            "from_column": "LineID",
            "to_table": "Line Table",
            "to_column": "LineID"
        },
        {
            "from_table": "DBMachineUtilization1",
            "from_column": "TeamID",
            "to_table": "Team Table",
            "to_column": "TeamID"
        },
        {
            "from_table": "DBRightFirstTime",
            "from_column": "TeamID",
            "to_table": "Team Table",
            "to_column": "TeamID"
        },
        {
            "from_table": "DBDowntime",
            "from_column": "Date",
            "to_table": "Date1",
            "to_column": "Dates"
        },
        {
            "from_table": "DBProduction",
            "from_column": "Date",
            "to_table": "Date1",
            "to_column": "Dates"
        },
        {
            "from_table": "DBRightFirstTime",
            "from_column": "Date",
            "to_table": "Date1",
            "to_column": "Dates"
        },
        {
            "from_table": "DBMachineUtilization1",
            "from_column": "Date",
            "to_table": "Date1",
            "to_column": "Dates"
        }
    ]
}