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: Date
| Date                    |   Working day |
|:------------------------|--------------:|
| 2021-01-01 00:00:00.000 |             1 |
| 2021-01-04 00:00:00.000 |             1 |
| 2021-01-05 00:00:00.000 |             1 |
| 2021-01-06 00:00:00.000 |             1 |
| 2021-01-07 00:00:00.000 |             1 |
| 2021-01-08 00:00:00.000 |             1 |
| 2021-01-11 00:00:00.000 |             1 |
| 2021-01-12 00:00:00.000 |             1 |
| 2021-01-13 00:00:00.000 |             1 |
| 2021-01-14 00:00:00.000 |             1 |


Table: Parameter
|   Parameter |
|------------:|
|           0 |
|           1 |
|           2 |
|           3 |
|           4 |
|           5 |
|           6 |
|           7 |
|           8 |
|           9 |


Table: Slicer1
| Channel       |
|:--------------|
| Main Channel  |
| Sub channel 1 |
| Sub channel 2 |


Table: Table 2
|   YearMonth |   __Count |   __Year |   __Month |   __WorkingDays |   __TotalDays |
|------------:|----------:|---------:|----------:|----------------:|--------------:|
|      202101 |         3 |     2021 |         1 |              21 |            63 |
|      202102 |         2 |     2021 |         2 |              20 |            40 |
|      202103 |         3 |     2021 |         3 |              23 |            69 |


Table: Table 3
|   Value |
|--------:|
|       1 |
|       2 |
|       3 |
|       4 |
|       5 |
|       6 |
|       7 |
|       8 |
|       9 |
|      10 |


Table: Table 5b
| Group   |   Values |
|:--------|---------:|
| A       |        2 |
| A       |        3 |
| A       |        4 |
| A       |        5 |
| A       |        7 |
| A       |        8 |
| A       |        9 |
| A       |       12 |
| A       |       13 |
| A       |       14 |


Table: Table
| Column1   |
|:----------|
| One       |
| Two       |
| Three     |


Table: Table10
|   Date |   Amount |   Weight |
|-------:|---------:|---------:|
|      1 |      500 |        1 |
|      2 |      400 |        2 |
|      3 |      150 |        2 |
|      4 |       70 |        3 |


Table: Table11
|   Column1 |   D |   H |   M |
|----------:|----:|----:|----:|
|      1.03 |   1 |   0 |  43 |
|      2.09 |   2 |   2 |   9 |
|      0.5  |   0 |  12 |   0 |
|     51.65 |  51 |  15 |  35 |
|     22.94 |  22 |  22 |  33 |
|      5.43 |   5 |  10 |  19 |


Table: Table17
| Date                    | Fruit   |   Price |
|:------------------------|:--------|--------:|
| 2021-09-17 00:00:00.000 | Apple   |      10 |
| 2021-09-17 00:00:00.000 | Orange  |      15 |
| 2021-09-17 00:00:00.000 | Banana  |      20 |
| 2021-09-17 00:00:00.000 | Pear    |      25 |
| 2021-09-18 00:00:00.000 | Apple   |      15 |
| 2021-09-18 00:00:00.000 | Banana  |      22 |
| 2021-09-18 00:00:00.000 | Pear    |      25 |


Table: Table17a
| Date                    | Fruit   |   Price |   Change |
|:------------------------|:--------|--------:|---------:|
| 2021-09-17 00:00:00.000 | Apple   |      10 |       10 |
| 2021-09-18 00:00:00.000 | Apple   |      15 |        5 |
| 2021-09-17 00:00:00.000 | Orange  |      15 |       15 |
| 2021-09-18 00:00:00.000 | Orange  |       0 |      -15 |
| 2021-09-17 00:00:00.000 | Banana  |      20 |       20 |
| 2021-09-18 00:00:00.000 | Banana  |      22 |        2 |
| 2021-09-17 00:00:00.000 | Pear    |      25 |       25 |
| 2021-09-18 00:00:00.000 | Pear    |      25 |        0 |


Table: Table18a
| DateTime                |   Part |   Quantity |
|:------------------------|-------:|-----------:|
| 2021-09-20 00:00:00.000 |   8250 |        720 |
| 2021-09-20 01:00:00.000 |   9142 |         84 |
| 2021-09-20 02:00:00.000 |   8250 |        800 |
| 2021-09-20 03:00:00.000 |   8250 |         95 |
| 2021-09-20 04:00:00.000 |   7748 |         91 |
| 2021-09-20 05:00:00.000 |   9142 |        700 |


Table: Table18b
|   Part |    TD |   ST |
|-------:|------:|-----:|
|   8250 | 10000 | 7314 |
|   9142 | 10001 | 7314 |
|   7748 | 10000 | 9548 |
|   4152 | 10002 | 9548 |
|   2829 | 10002 | 4314 |
|   5416 | 66148 | 7314 |


Table: Table19
| Month      |   Year |   MonthNum |
|:-----------|-------:|-----------:|
| 21年9月限  |   2021 |          9 |
| 21年10月限 |   2021 |         10 |
| 21年11月限 |   2021 |         11 |
| 21年12月限 |   2021 |         12 |
| 22年1月限  |   2022 |          1 |
| 22年2月限  |   2022 |          2 |


Table: Table2
|   Project | Resource Name   |   Hrs A-B |   Hrs A-C |   Period |
|----------:|:----------------|----------:|----------:|---------:|
|         1 | John            |         2 |         6 |   202113 |
|         1 | John            |         2 |         6 |   202139 |
|         1 | John            |         2 |         6 |   202223 |
|         2 | Kendra          |         5 |         7 |   202134 |
|         2 | Kendra          |         5 |         7 |   202201 |
|         2 | Kendra          |         5 |         7 |   202210 |
|         3 | Yannick         |         1 |         9 |   202101 |
|         3 | Yannick         |         1 |         9 |   202234 |
|         3 | Yannick         |         1 |         9 |   202252 |
|         4 | Kendra          |         3 |         3 |   202152 |


Table: Table20
|   Driver ID | Accept Time             | Drop Time               |   accept_is_after_previous_job |   Duration (mins) |   Duration (mins) 1 |
|------------:|:------------------------|:------------------------|-------------------------------:|------------------:|--------------------:|
|         456 | 2021-09-21 10:30:00.000 | 2021-09-21 10:40:00.000 |                              1 |                10 |                  10 |
|         456 | 2021-09-21 10:45:00.000 | 2021-09-21 11:00:00.000 |                              1 |                15 |                  15 |
|         456 | 2021-09-21 10:46:00.000 | 2021-09-21 11:10:00.000 |                              0 |                10 |                  24 |
|         456 | 2021-09-21 11:30:00.000 | 2021-09-21 11:45:00.000 |                              1 |                15 |                  15 |
|         456 | 2021-09-21 11:30:00.000 | 2021-09-21 11:55:00.000 |                              0 |                10 |                  25 |
|         456 | 2021-09-21 11:32:00.000 | 2021-09-21 11:58:00.000 |                              0 |                 3 |                  26 |
|         410 | 2021-09-21 11:25:00.000 | 2021-09-21 11:45:00.000 |                              1 |                20 |                  20 |
|         410 | 2021-09-21 11:30:00.000 | 2021-09-21 11:50:00.000 |                              0 |                 5 |                  20 |
|         410 | 2021-09-21 11:31:00.000 | 2021-09-21 11:55:00.000 |                              0 |                 5 |                  24 |


Table: Table21
| Column1                 | Date     |   Hours |   Minutes | Final                |
|:------------------------|:---------|--------:|----------:|:---------------------|
| 2018-01-01 00:00:00.000 | 1/1/2018 |       0 |        30 | 1/1/2018 12:30:00 AM |
| 2018-01-01 00:05:00.000 | 1/1/2018 |       0 |        30 | 1/1/2018 12:30:00 AM |
| 2018-01-01 00:10:00.000 | 1/1/2018 |       0 |        30 | 1/1/2018 12:30:00 AM |
| 2018-01-01 00:20:00.000 | 1/1/2018 |       0 |        30 | 1/1/2018 12:30:00 AM |
| 2018-01-01 00:30:00.000 | 1/1/2018 |       0 |        30 | 1/1/2018 12:30:00 AM |
| 2018-01-01 00:45:00.000 | 1/1/2018 |       0 |         0 | 1/1/2018 12:00:00 AM |
| 2018-01-01 00:50:00.000 | 1/1/2018 |       0 |         0 | 1/1/2018 12:00:00 AM |
| 2018-01-01 01:00:00.000 | 1/1/2018 |       1 |        30 | 1/1/2018 1:30:00 AM  |
| 2018-01-01 01:05:00.000 | 1/1/2018 |       1 |        30 | 1/1/2018 1:30:00 AM  |
| 2018-01-01 01:45:00.000 | 1/1/2018 |       1 |         0 | 1/1/2018 1:00:00 AM  |


Table: Table22
| DateTime                |   Part |   Quantity |   Changed Column |
|:------------------------|-------:|-----------:|-----------------:|
| 2021-09-20 00:00:00.000 |   8250 |        720 |                1 |
| 2021-09-20 01:00:00.000 |   9142 |         84 |                1 |
| 2021-09-20 02:00:00.000 |   8250 |        800 |                1 |
| 2021-09-20 03:00:00.000 |   8250 |         95 |                0 |
| 2021-09-20 04:00:00.000 |   7748 |         91 |                1 |
| 2021-09-20 05:00:00.000 |   9142 |        700 |                1 |


Table: Table23
| UPDATE_DATE             |   PART | TD      |   Changed Column |   Count of Changed Column |   Changed Column.1 |   Changed Column GJD |   Changed Column GJD TD |
|:------------------------|-------:|:--------|-----------------:|--------------------------:|-------------------:|---------------------:|------------------------:|
| 2021-08-16 00:12:00.000 |  11164 | TD27414 |                1 |                         1 |                  1 |                    1 |                       1 |
| 2021-08-16 00:51:00.000 |  14054 | TD27955 |                1 |                         1 |                  1 |                    1 |                       1 |
| 2021-08-16 01:13:00.000 |  14470 | TD28112 |                1 |                         1 |                  1 |                    1 |                       1 |
| 2021-08-16 01:46:00.000 |  14490 | TD28312 |                1 |                         1 |                  1 |                    1 |                       1 |
| 2021-08-16 02:20:00.000 |  14093 | TD28412 |                1 |                         1 |                  1 |                    1 |                       1 |
| 2021-08-16 02:45:00.000 |  14075 | TD28412 |                1 |                         1 |                  1 |                    1 |                       0 |
| 2021-08-16 03:10:00.000 |   4344 | TD21038 |                1 |                         1 |                  1 |                    1 |                       1 |
| 2021-08-16 03:55:00.000 |   2165 | TD10454 |                1 |                         1 |                  1 |                    1 |                       1 |
| 2021-08-16 04:30:00.000 |   2008 | TD10291 |                1 |                         1 |                  1 |                    1 |                       1 |
| 2021-08-16 05:09:00.000 |   2006 | TD10449 |                1 |                         1 |                  1 |                    1 |                       1 |


Table: Table3
| Channel       |   Actual selling days |   MTD Sales |   Avg daily sales |
|:--------------|----------------------:|------------:|------------------:|
| Main Channel  |                     8 |         100 |                13 |
| Sub channel 1 |                     9 |          50 |                 6 |
| Sub channel 2 |                     5 |          50 |                10 |


Table: Table4
| Device   |   State | Attribute   |   Value |
|:---------|--------:|:------------|--------:|
| 00294B9E |       0 | T0          |     120 |
| 00294B9E |       0 | Tn          |     108 |
| 00294B9E |       0 | T0          |     140 |
| 00294B9E |       0 | Tn          |     140 |
| 00294B9E |       1 | T0          |     120 |
| 00294B9E |       1 | Tn          |     105 |
| 00294B9E |       1 | T0          |     140 |
| 00294B9E |       1 | Tn          |     140 |
| 00294B9E |       2 | T0          |     126 |
| 00294B9E |       2 | Tn          |     105 |


Table: Table5
| GROUP   |   START |   END |
|:--------|--------:|------:|
| A       |       2 |     5 |
| A       |       7 |     9 |
| A       |      12 |    15 |
| B       |      44 |    48 |
| B       |      51 |    57 |
| B       |      60 |    63 |


Table: Table5a
| GROUP   |   Value |
|:--------|--------:|
| A       |       6 |
| A       |      10 |
| A       |      11 |
| B       |      49 |
| B       |      50 |
| B       |      58 |
| B       |      59 |


Table: Table6
|   year | month     |   date | Custom                  |
|-------:|:----------|-------:|:------------------------|
|   2020 | January   |      1 | 2020-01-01 00:00:00.000 |
|   2021 | March     |     18 | 2021-03-18 00:00:00.000 |
|   2019 | July      |      6 | 2019-07-06 00:00:00.000 |
|   2021 | September |     22 | 2021-09-22 00:00:00.000 |


Table: Table7
|   Transaction_ID | Transaction_Date   | Subaccount_from   |   Subject_from | Subaccount_to   |   Subject_to |   Amount |
|-----------------:|:-------------------|:------------------|---------------:|:----------------|-------------:|---------:|
|                1 | 10.09.2021         | A                 |              1 | B               |            2 |   600181 |
|                2 | 10.09.2021         | B                 |              2 | E               |            5 |   286700 |
|                3 | 10.09.2021         | B                 |              2 | D               |            3 |   213300 |
|                4 | 10.09.2021         | D                 |              3 | F               |            3 |    10000 |
|                5 | 10.09.2021         | D                 |              3 | H               |            3 |    10000 |
|                6 | 10.09.2021         | D                 |              3 | I               |            3 |    12000 |
|                7 | 10.09.2021         | D                 |              3 | J               |            3 |    10000 |
|                8 | 10.09.2021         | D                 |              3 | K               |            3 |    10000 |
|                9 | 10.09.2021         | D                 |              3 | L               |            3 |    10000 |
|               10 | 10.09.2021         | D                 |              3 | M               |            3 |    95000 |


Table: Table8
|   envID | Custom     |
|--------:|:-----------|
|      17 | Harvey,Ben |
|      32 | Josh,Larry |


Table: Table9
| String   |
|:---------|
| String A |
| String B |
| String C |
| String D |
| String E |
| String F |


Table: Table9a
| String                       |
|:-----------------------------|
| String A, String D, String E |
| String B, String D, String E |
| String A, String B           |
| String A                     |


Table: TableX
| *Date*                  | *Employee ID*   |   *Quantity of hours registred* | *HourCode*   |   YearMonth |
|:------------------------|:----------------|--------------------------------:|:-------------|------------:|
| 2021-01-01 00:00:00.000 | JIM             |                               6 | XXXXX        |      202101 |
| 2021-01-02 00:00:00.000 | JIM             |                               7 | VacationCode |      202101 |
| 2021-01-03 00:00:00.000 | JACK            |                               4 | XXXXX        |      202101 |
| 2021-01-04 00:00:00.000 | JOE             |                               6 | XXXXX        |      202101 |
| 2021-02-01 00:00:00.000 | JIM             |                               6 | XXXXX        |      202102 |
| 2021-02-02 00:00:00.000 | JACK            |                               7 | XXXXX        |      202102 |
| 2021-03-01 00:00:00.000 | JIM             |                               6 | XXXXX        |      202103 |
| 2021-03-02 00:00:00.000 | JACK            |                               8 | XXXXX        |      202103 |
| 2021-03-03 00:00:00.000 | JAMES           |                               5 | XXXXX        |      202103 |
| 2021-03-04 00:00:00.000 | JACK            |                               8 | XXXXX        |      202103 |

 


tables: name: Date
data: Date.csv
name: Parameter
data: Parameter.csv
name: Slicer1
data: Slicer1.csv
name: Table 2
data: Table 2.csv
name: Table 3
data: Table 3.csv
name: Table 5b
data: Table 5b.csv
name: Table
data: Table.csv
name: Table10
data: Table10.csv
name: Table11
data: Table11.csv
name: Table17
data: Table17.csv
name: Table17a
data: Table17a.csv
name: Table18a
data: Table18a.csv
name: Table18b
data: Table18b.csv
name: Table19
data: Table19.csv
name: Table2
data: Table2.csv
name: Table20
data: Table20.csv
name: Table21
data: Table21.csv
name: Table22
data: Table22.csv
name: Table23
data: Table23.csv
name: Table3
data: Table3.csv
name: Table4
data: Table4.csv
name: Table5
data: Table5.csv
name: Table5a
data: Table5a.csv
name: Table6
data: Table6.csv
name: Table7
data: Table7.csv
name: Table8
data: Table8.csv
name: Table9
data: Table9.csv
name: Table9a
data: Table9a.csv
name: TableX
data: TableX.csv
label: Table18a
Part
Table18b
Part
Table22
Part
Table18b
Part
output: {
    "joins": [
        {
            "from_table": "Table18a",
            "from_column": "Part",
            "to_table": "Table18b",
            "to_column": "Part"
        },
        {
            "from_table": "Table22",
            "from_column": "Part",
            "to_table": "Table18b",
            "to_column": "Part"
        }
    ]
}