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: calendar
| Date                    |
|:------------------------|
| 2018-06-18 00:00:00.000 |
| 2018-06-19 00:00:00.000 |
| 2018-06-20 00:00:00.000 |
| 2018-06-21 00:00:00.000 |
| 2018-06-22 00:00:00.000 |


Table: DBDowntime
|   ID |   LineID |   TeamID | ShiftID   | Date                    | DateTruncatedToHour     | DateTruncatedToDay      | DowntimeName   | DowntimeType   |   Value |   strLineID |   strTeamID | LineID-TeamID   |   Downtime in Min |
|-----:|---------:|---------:|:----------|:------------------------|:------------------------|:------------------------|:---------------|:---------------|--------:|------------:|------------:|:----------------|------------------:|
|  305 |        3 |        2 | NULL      | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | NULL           | NULL           |     255 |           3 |           2 | 3-2             |           4.25    |
|   49 |        2 |        2 | NULL      | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | NULL           | NULL           |     232 |           2 |           2 | 2-2             |           3.86667 |
|  279 |        3 |        2 | NULL      | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | NULL           | NULL           |     343 |           3 |           2 | 3-2             |           5.71667 |
|  282 |        2 |        1 | NULL      | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | NULL           | NULL           |     146 |           2 |           1 | 2-1             |           2.43333 |
|  283 |        1 |        1 | NULL      | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | NULL           | NULL           |      98 |           1 |           1 | 1-1             |           1.63333 |
|  192 |        1 |        3 | NULL      | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | NULL           | NULL           |      85 |           1 |           3 | 1-3             |           1.41667 |
|  193 |        1 |        3 | NULL      | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | NULL           | NULL           |      99 |           1 |           3 | 1-3             |           1.65    |
|  194 |        1 |        3 | NULL      | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | 2018-06-18 00:00:00.000 | NULL           | NULL           |      65 |           1 |           3 | 1-3             |           1.08333 |
|  352 |        2 |        2 | NULL      | 2018-06-19 00:00:00.000 | 2018-06-19 00:00:00.000 | 2018-06-18 00:00:00.000 | NULL           | NULL           |     113 |           2 |           2 | 2-2             |           1.88333 |
|  353 |        3 |        1 | NULL      | 2018-06-19 00:00:00.000 | 2018-06-19 00:00:00.000 | 2018-06-18 00:00:00.000 | NULL           | NULL           |     146 |           3 |           1 | 3-1             |           2.43333 |


Table: DBMachineUtilization
|   ID |   LineID |   TeamID | ShiftID   | Date                    |   ProductionFBE |   ProductionFBETheoretical | ScrapFBE   |   strLineID |   strTeamID | LineID-TeamID   |
|-----:|---------:|---------:|:----------|:------------------------|----------------:|---------------------------:|:-----------|------------:|------------:|:----------------|
|   25 |        1 |        2 | NULL      | 2018-06-18 12:00:00.000 |         333.677 |                    377.358 |            |           1 |           2 | 1-2             |
|   28 |        1 |        2 | NULL      | 2018-06-18 12:00:00.000 |         318.098 |                    377.358 |            |           1 |           2 | 1-2             |
|   32 |        1 |        2 | NULL      | 2018-06-18 13:00:00.000 |         207.04  |                    377.358 |            |           1 |           2 | 1-2             |
|   34 |        1 |        2 | NULL      | 2018-06-18 14:00:00.000 |         312.068 |                    377.358 |            |           1 |           2 | 1-2             |
|   38 |        1 |        2 | NULL      | 2018-06-18 15:00:00.000 |         341.214 |                    377.358 |            |           1 |           2 | 1-2             |
|   42 |        1 |        2 | NULL      | 2018-06-18 17:00:00.000 |         273.374 |                    377.358 |            |           1 |           2 | 1-2             |
|   45 |        1 |        2 | NULL      | 2018-06-18 18:00:00.000 |         360.813 |                    377.358 |            |           1 |           2 | 1-2             |
|   46 |        1 |        2 | NULL      | 2018-06-18 18:00:00.000 |         269.353 |                    377.358 |            |           1 |           2 | 1-2             |
|   98 |        1 |        2 | NULL      | 2018-06-19 11:00:00.000 |         254.78  |                    377.358 |            |           1 |           2 | 1-2             |
|  103 |        1 |        2 | NULL      | 2018-06-19 12:00:00.000 |         310.56  |                    377.358 |            |           1 |           2 | 1-2             |


Table: DBProduction
|      ID |   LineID |   TeamID | ShiftID   | Date                    | DateTruncatedToHour     |   Item | Date only               |
|--------:|---------:|---------:|:----------|:------------------------|:------------------------|-------:|:------------------------|
| 3365771 |        1 |        3 | NULL      | 2018-06-19 02:00:54.000 | 2018-06-19 02:00:00.000 | 563216 | 2018-06-19 00:00:00.000 |
| 3365865 |        1 |        3 | NULL      | 2018-06-19 02:00:54.000 | 2018-06-19 02:00:00.000 | 563216 | 2018-06-19 00:00:00.000 |
| 3366711 |        1 |        3 | NULL      | 2018-06-19 02:01:13.000 | 2018-06-19 02:00:00.000 | 563216 | 2018-06-19 00:00:00.000 |
| 3366805 |        1 |        3 | NULL      | 2018-06-19 02:01:13.000 | 2018-06-19 02:00:00.000 | 563216 | 2018-06-19 00:00:00.000 |
| 3376863 |        1 |        3 | NULL      | 2018-06-19 02:04:52.000 | 2018-06-19 02:00:00.000 | 563216 | 2018-06-19 00:00:00.000 |
| 3376957 |        1 |        3 | NULL      | 2018-06-19 02:04:52.000 | 2018-06-19 02:00:00.000 | 563216 | 2018-06-19 00:00:00.000 |
| 3377709 |        1 |        3 | NULL      | 2018-06-19 02:05:11.000 | 2018-06-19 02:00:00.000 | 563216 | 2018-06-19 00:00:00.000 |
| 3377803 |        1 |        3 | NULL      | 2018-06-19 02:05:12.000 | 2018-06-19 02:00:00.000 | 563216 | 2018-06-19 00:00:00.000 |
| 3380153 |        1 |        3 | NULL      | 2018-06-19 02:05:59.000 | 2018-06-19 02:00:00.000 | 563216 | 2018-06-19 00:00:00.000 |
| 3380247 |        1 |        3 | NULL      | 2018-06-19 02:05:59.000 | 2018-06-19 02:00:00.000 | 563216 | 2018-06-19 00:00:00.000 |


Table: DBRightFirstTime
|     ID |   LineID |   TeamID | ShiftID   | Date                    | ProductionFBE   |   ReworkFBE | ScrapFBE   | RFT   | LineID-TeamID   |
|-------:|---------:|---------:|:----------|:------------------------|:----------------|------------:|:-----------|:------|:----------------|
| 312767 |        2 |        3 | NULL      | 2018-06-18 00:00:00.000 |                 |         0.5 |            | -∞    | 2-3             |
| 312804 |        2 |        3 | NULL      | 2018-06-18 00:00:00.000 |                 |         0.5 |            | -∞    | 2-3             |
| 312826 |        2 |        3 | NULL      | 2018-06-18 00:00:00.000 |                 |         0.5 |            | -∞    | 2-3             |
| 312828 |        2 |        3 | NULL      | 2018-06-18 00:00:00.000 |                 |         0.5 |            | -∞    | 2-3             |
| 312841 |        2 |        3 | NULL      | 2018-06-18 00:00:00.000 |                 |         0.5 |            | -∞    | 2-3             |
| 312878 |        2 |        3 | NULL      | 2018-06-18 00:00:00.000 |                 |         0.5 |            | -∞    | 2-3             |
| 312860 |        2 |        3 | NULL      | 2018-06-18 00:00:00.000 |                 |         0.5 |            | -∞    | 2-3             |
| 312925 |        2 |        3 | NULL      | 2018-06-18 00:00:00.000 |                 |         0.5 |            | -∞    | 2-3             |
| 312936 |        2 |        3 | NULL      | 2018-06-18 00:00:00.000 |                 |         0.5 |            | -∞    | 2-3             |
| 312949 |        2 |        3 | NULL      | 2018-06-18 00:00:00.000 |                 |         0.5 |            | -∞    | 2-3             |


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


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

 


tables: name: calendar
data: calendar.csv
name: DBDowntime
data: DBDowntime.csv
name: DBMachineUtilization
data: DBMachineUtilization.csv
name: DBProduction
data: DBProduction.csv
name: DBRightFirstTime
data: DBRightFirstTime.csv
name: LineID
data: LineID.csv
name: TeamID
data: TeamID.csv
label: DBRightFirstTime
TeamID
TeamID
TeamID
DBProduction
TeamID
TeamID
TeamID
DBMachineUtilization
TeamID
TeamID
TeamID
DBDowntime
TeamID
TeamID
TeamID
DBRightFirstTime
LineID
LineID
LineID
DBProduction
LineID
LineID
LineID
DBMachineUtilization
LineID
LineID
LineID
DBDowntime
LineID
LineID
LineID
output: {
    "joins": [
        {
            "from_table": "DBRightFirstTime",
            "from_column": "TeamID",
            "to_table": "TeamID",
            "to_column": "TeamID"
        },
        {
            "from_table": "DBProduction",
            "from_column": "TeamID",
            "to_table": "TeamID",
            "to_column": "TeamID"
        },
        {
            "from_table": "DBMachineUtilization",
            "from_column": "TeamID",
            "to_table": "TeamID",
            "to_column": "TeamID"
        },
        {
            "from_table": "DBDowntime",
            "from_column": "TeamID",
            "to_table": "TeamID",
            "to_column": "TeamID"
        },
        {
            "from_table": "DBRightFirstTime",
            "from_column": "LineID",
            "to_table": "LineID",
            "to_column": "LineID"
        },
        {
            "from_table": "DBProduction",
            "from_column": "LineID",
            "to_table": "LineID",
            "to_column": "LineID"
        },
        {
            "from_table": "DBMachineUtilization",
            "from_column": "LineID",
            "to_table": "LineID",
            "to_column": "LineID"
        },
        {
            "from_table": "DBDowntime",
            "from_column": "LineID",
            "to_table": "LineID",
            "to_column": "LineID"
        }
    ]
}