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                    |
|:------------------------|
| 2015-01-01 00:00:00.000 |
| 2015-01-02 00:00:00.000 |
| 2015-01-03 00:00:00.000 |
| 2015-01-04 00:00:00.000 |
| 2015-01-05 00:00:00.000 |
| 2015-01-06 00:00:00.000 |
| 2015-01-07 00:00:00.000 |
| 2015-01-08 00:00:00.000 |
| 2015-01-09 00:00:00.000 |
| 2015-01-10 00:00:00.000 |


Table: New Calendar
| Date                    | __Measure   |
|:------------------------|:------------|
| 2015-01-03 00:00:00.000 | Y           |
| 2015-01-04 00:00:00.000 | Y           |
| 2015-01-05 00:00:00.000 | Y           |
| 2015-01-06 00:00:00.000 | Y           |
| 2015-01-07 00:00:00.000 | Y           |
| 2015-01-08 00:00:00.000 | Y           |
| 2015-01-09 00:00:00.000 | Y           |
| 2015-01-10 00:00:00.000 | Y           |
| 2015-01-11 00:00:00.000 | Y           |
| 2015-01-12 00:00:00.000 | Y           |


Table: Options
| OptionKey   | OptionName     |
|:------------|:---------------|
| 35B         | Horn           |
| 12A         | Front Basket   |
| 51G         | Saddle Basket  |
| 66F         | Head Light     |
| 77X         | Tail Light     |
| 21G         | Sticker PKG    |
| 89K         | Grip Streamers |
| 5FR         | Fork Springs   |
| 53F         | Leather Seat   |


Table: SlicerTable
| Color   |
|:--------|
| Red     |
| White   |
| Green   |


Table: Table 2
| Column1   | Column2   | Column3   | Column    |
|:----------|:----------|:----------|:----------|
| Red       | One       | A         | RedOneA   |
| Red       | One       | B         | RedOneB   |
| Red       | One       | C         | RedOneC   |
| Red       | Two       | A         | RedTwoA   |
| Red       | Two       | B         | RedTwoB   |
| Red       | Two       | C         | RedTwoC   |
| Red       | Three     | A         | RedThreeA |
| Red       | Three     | B         | RedThreeB |
| Red       | Three     | C         | RedThreeC |
| Green     | One       | A         | GreenOneA |


Table: Table
| Value                   |   ID | Start                   | End                     |   Number |
|:------------------------|-----:|:------------------------|:------------------------|---------:|
| 2019-01-01 00:00:00.000 |  100 | 2019-01-01 00:00:00.000 | 2019-01-03 00:00:00.000 |    50000 |
| 2019-01-02 00:00:00.000 |  100 | 2019-01-01 00:00:00.000 | 2019-01-03 00:00:00.000 |    50000 |
| 2019-01-03 00:00:00.000 |  100 | 2019-01-01 00:00:00.000 | 2019-01-03 00:00:00.000 |    50000 |
| 2019-01-05 00:00:00.000 |  101 | 2019-01-05 00:00:00.000 | 2019-01-09 00:00:00.000 |    60000 |
| 2019-01-06 00:00:00.000 |  101 | 2019-01-05 00:00:00.000 | 2019-01-09 00:00:00.000 |    60000 |
| 2019-01-07 00:00:00.000 |  101 | 2019-01-05 00:00:00.000 | 2019-01-09 00:00:00.000 |    60000 |
| 2019-01-08 00:00:00.000 |  101 | 2019-01-05 00:00:00.000 | 2019-01-09 00:00:00.000 |    60000 |
| 2019-01-09 00:00:00.000 |  101 | 2019-01-05 00:00:00.000 | 2019-01-09 00:00:00.000 |    60000 |
| 2019-02-01 00:00:00.000 |  102 | 2019-02-01 00:00:00.000 | 2019-02-05 00:00:00.000 |    70000 |
| 2019-02-02 00:00:00.000 |  102 | 2019-02-01 00:00:00.000 | 2019-02-05 00:00:00.000 |    70000 |


Table: Table1
|          Column1 |
|-----------------:|
| 123456           |
|      1.23456e+06 |
|   1234           |


Table: Table10
| s_ordernr   |   Amount1 |
|:------------|----------:|
| S4142       |       142 |
| S4143       |       142 |
| S4144       |       142 |
| S4145       |       142 |
| S4146       |       141 |


Table: Table11
|   ID | Start                   | End                     |   Number |
|-----:|:------------------------|:------------------------|---------:|
|  100 | 2019-01-01 00:00:00.000 | 2019-01-03 00:00:00.000 |    50000 |
|  101 | 2019-01-05 00:00:00.000 | 2019-01-09 00:00:00.000 |    60000 |
|  102 | 2019-02-01 00:00:00.000 | 2019-02-05 00:00:00.000 |    70000 |


Table: Table12
| MAC       | DATE                    | STATUS   |   Index |   Column |
|:----------|:------------------------|:---------|--------:|---------:|
| ABCEERDDF | 2018-12-05 00:00:00.000 | WORST    |       5 |        4 |
| ABCEERDDF | 2018-12-07 00:00:00.000 | WORST    |       7 |        5 |
| ABCEERDDF | 2018-12-08 00:00:00.000 | WORST    |       8 |        4 |
| ABCEERDDF | 2018-12-09 00:00:00.000 | WORST    |       9 |        4 |
| ABCEERDDF | 2018-12-10 00:00:00.000 | WORST    |      10 |        4 |
| ABCEERDDF | 2018-12-11 00:00:00.000 | WORST    |      11 |        4 |
| ABCEERDDF | 2018-12-13 00:00:00.000 | WORST    |      13 |        3 |
| ABCEERDDF | 2018-12-14 00:00:00.000 | WORST    |      14 |        2 |
| ABCEERDDF | 2018-12-15 00:00:00.000 | WORST    |      15 |        1 |
| YDSHHSKJL | 2018-12-01 00:00:00.000 | WORST    |      16 |        4 |


Table: Table13
| Person   |   Year |   MonthNum | Month     | Date                    |   Present | Period   |
|:---------|-------:|-----------:|:----------|:------------------------|----------:|:---------|
| Person1  |   2018 |          1 | January   | 2019-01-18 00:00:00.000 |         1 | 2018Q1   |
| Person1  |   2018 |          2 | February  | 2019-02-18 00:00:00.000 |         1 | 2018Q1   |
| Person1  |   2018 |          3 | March     | 2019-03-18 00:00:00.000 |         1 | 2018Q1   |
| Person1  |   2018 |          4 | April     | 2019-04-18 00:00:00.000 |         1 | 2018Q2   |
| Person1  |   2018 |          5 | May       | 2019-05-18 00:00:00.000 |         1 | 2018Q2   |
| Person1  |   2018 |          6 | June      | 2019-06-18 00:00:00.000 |         1 | 2018Q2   |
| Person1  |   2018 |          7 | July      | 2019-07-18 00:00:00.000 |         1 | 2018Q3   |
| Person1  |   2018 |          8 | August    | 2019-08-18 00:00:00.000 |         1 | 2018Q3   |
| Person1  |   2018 |          9 | September | 2019-09-18 00:00:00.000 |         1 | 2018Q3   |
| Person1  |   2018 |         10 | October   | 2019-10-18 00:00:00.000 |         1 | 2018Q4   |


Table: Table14
| Employee   | Dept   | Initial Date            | Final Date              | Custom    |   Month |
|:-----------|:-------|:------------------------|:------------------------|:----------|--------:|
| Juan       | OPS    | 2018-06-01 00:00:00.000 | 2018-12-31 00:00:00.000 | 6/1/2018  |       6 |
| Juan       | OPS    | 2018-06-01 00:00:00.000 | 2018-12-31 00:00:00.000 | 6/2/2018  |       6 |
| Juan       | OPS    | 2018-06-01 00:00:00.000 | 2018-12-31 00:00:00.000 | 6/3/2018  |       6 |
| Juan       | OPS    | 2018-06-01 00:00:00.000 | 2018-12-31 00:00:00.000 | 6/4/2018  |       6 |
| Juan       | OPS    | 2018-06-01 00:00:00.000 | 2018-12-31 00:00:00.000 | 6/5/2018  |       6 |
| Juan       | OPS    | 2018-06-01 00:00:00.000 | 2018-12-31 00:00:00.000 | 6/6/2018  |       6 |
| Juan       | OPS    | 2018-06-01 00:00:00.000 | 2018-12-31 00:00:00.000 | 6/7/2018  |       6 |
| Juan       | OPS    | 2018-06-01 00:00:00.000 | 2018-12-31 00:00:00.000 | 6/8/2018  |       6 |
| Juan       | OPS    | 2018-06-01 00:00:00.000 | 2018-12-31 00:00:00.000 | 6/9/2018  |       6 |
| Juan       | OPS    | 2018-06-01 00:00:00.000 | 2018-12-31 00:00:00.000 | 6/10/2018 |       6 |


Table: Table15 2
|   ID | Category   | Start                   | End                     |   Number |
|-----:|:-----------|:------------------------|:------------------------|---------:|
|  100 | A          | 2018-02-01 00:00:00.000 | 2018-02-28 00:00:00.000 |    50000 |
|  101 | A          | 2018-02-06 00:00:00.000 | 2018-02-16 00:00:00.000 |    60000 |
|  102 | B          | 2018-02-03 00:00:00.000 | 2018-02-08 00:00:00.000 |    70000 |
|  103 | A          | 2018-03-01 00:00:00.000 | 2018-03-31 00:00:00.000 |    40000 |
|  104 | C          |                         |                         |    30000 |


Table: Table15
| Employee   | Dept      |   Month |
|:-----------|:----------|--------:|
| Juan       | OPS       |       6 |
| Pepe       | MARKETING |       6 |
| Juan       | OPS       |       7 |
| Pepe       | MARKETING |       7 |
| Juan       | OPS       |       8 |
| Pepe       | MARKETING |       8 |
| Juan       | OPS       |       9 |
| Pepe       | MARKETING |       9 |
| Juan       | OPS       |      10 |
| Pepe       | MARKETING |      10 |


Table: Table15_2_Calendar1
| Date                    |
|:------------------------|
| 2018-02-01 00:00:00.000 |
| 2018-02-02 00:00:00.000 |
| 2018-02-03 00:00:00.000 |
| 2018-02-04 00:00:00.000 |
| 2018-02-05 00:00:00.000 |
| 2018-02-06 00:00:00.000 |
| 2018-02-07 00:00:00.000 |
| 2018-02-08 00:00:00.000 |
| 2018-02-09 00:00:00.000 |
| 2018-02-10 00:00:00.000 |


Table: Table15_2_Calendar2
| Date                    |
|:------------------------|
| 2018-02-01 00:00:00.000 |
| 2018-02-02 00:00:00.000 |
| 2018-02-03 00:00:00.000 |
| 2018-02-04 00:00:00.000 |
| 2018-02-05 00:00:00.000 |
| 2018-02-06 00:00:00.000 |
| 2018-02-07 00:00:00.000 |
| 2018-02-08 00:00:00.000 |
| 2018-02-09 00:00:00.000 |
| 2018-02-10 00:00:00.000 |


Table: Table16
| Employee   | StartDate               | EndDate                 |   Days Sick |
|:-----------|:------------------------|:------------------------|------------:|
| Frans      | 2018-11-01 00:00:00.000 | 2018-11-30 00:00:00.000 |          30 |
| Sonja      | 2018-11-01 00:00:00.000 | 2018-11-06 00:00:00.000 |           6 |
| Frans      | 2018-11-12 00:00:00.000 | 2018-11-16 00:00:00.000 |           5 |
| Sonja      | 2018-11-14 00:00:00.000 | 2018-11-15 00:00:00.000 |           2 |
| Frans      | 2018-11-14 00:00:00.000 | 2018-11-16 00:00:00.000 |           3 |
| Sonja      | 2018-11-23 00:00:00.000 | 2018-11-25 00:00:00.000 |           3 |
| Remi       | 2018-12-10 00:00:00.000 | 2018-12-12 00:00:00.000 |           3 |
| Remi       | 2019-01-27 00:00:00.000 | 2019-01-31 00:00:00.000 |           5 |
| Frans      | 2019-02-01 00:00:00.000 |                         |        1234 |
| Sonja      | 2019-02-06 00:00:00.000 |                         |        1229 |


Table: Table17
| ColumnA     | ColumnB       |   Column |
|:------------|:--------------|---------:|
| W345678-New | 45635|W345678 |        1 |


Table: Table18
|   Unique ID | Payment Types   | Column         |
|------------:|:----------------|:---------------|
|           1 | Payment Scheme  | Payment Scheme |
|           1 | Standard        | Payment Scheme |
|           2 | Payment Scheme  | Payment Scheme |
|           2 | Standard        | Payment Scheme |
|           3 | Payment Scheme  | Payment Scheme |
|           3 | Standard        | Payment Scheme |
|           4 | Refund          | Standard       |
|           4 | Standard        | Standard       |
|           5 | Payment Scheme  | Payment Scheme |
|           5 | Standard        | Payment Scheme |


Table: Table19
| Agent   |   Sales |   Year | Product   | Region   |
|:--------|--------:|-------:|:----------|:---------|
| Sam     |    1000 |   2019 | A         | West     |
| Sam     |     200 |   2017 | B         | West     |
| Sam     |     300 |   2019 | C         | West     |
| Emily   |    3000 |   2019 | C         | East     |
| Karen   |    1000 |   2018 | B         | West     |
| Karen   |     200 |   2019 | C         | West     |


Table: Table2
| Store   | Date                    | Time                    |   Hour |   Quantity | Staff Type   |
|:--------|:------------------------|:------------------------|-------:|-----------:|:-------------|
| Peters  | 2018-02-01 00:00:00.000 | 1899-12-30 09:00:00.000 |      9 |          4 | Cashier      |
| Peters  | 2018-02-01 00:00:00.000 | 1899-12-30 09:05:00.000 |      9 |          4 | Cashier      |
| Peters  | 2018-02-01 00:00:00.000 | 1899-12-30 09:10:00.000 |      9 |          4 | Cashier      |
| Peters  | 2018-02-01 00:00:00.000 | 1899-12-30 09:15:00.000 |      9 |          4 | Cashier      |
| Peters  | 2018-02-01 00:00:00.000 | 1899-12-30 09:20:00.000 |      9 |          4 | Cashier      |
| Peters  | 2018-02-01 00:00:00.000 | 1899-12-30 09:25:00.000 |      9 |          4 | Cashier      |
| Peters  | 2018-02-01 00:00:00.000 | 1899-12-30 09:30:00.000 |      9 |          4 | Cashier      |
| Peters  | 2018-02-01 00:00:00.000 | 1899-12-30 09:35:00.000 |      9 |          4 | Cashier      |
| Peters  | 2018-02-01 00:00:00.000 | 1899-12-30 09:40:00.000 |      9 |          4 | Cashier      |
| Peters  | 2018-02-01 00:00:00.000 | 1899-12-30 09:45:00.000 |      9 |          4 | Cashier      |


Table: Table20
|   Customer |   NetTotal |   Index |
|-----------:|-----------:|--------:|
|       1048 |      96000 |       1 |
|       1046 |      86000 |       2 |
|       1006 |      67000 |       3 |
|     787787 |      66000 |       4 |


Table: Table21
| Account   | Inside Sales   | Territory Sales   |
|:----------|:---------------|:------------------|
| Account 1 | Julien         | Michael           |
| Account 2 | Julien         | Michael           |
| Account 3 |                | Michael           |


Table: Table22
| Column1   | Column2   | Column3   |
|:----------|:----------|:----------|
| Red       | One       | A         |
| Green     | Two       | B         |
| Blue      | Three     | C         |


Table: Table23
| Attribute   | Value         |
|:------------|:--------------|
| Line No_    | 40000         |
| Row No_     | 1.A.I.1       |
| Description | 1. Desarrollo |
| Totaling.1  | 200           |
| Totaling.2  | 201           |
| Totaling.3  | 2801          |
| Totaling.4  | 2901          |
| Totaling.5  | 2800          |


Table: Table24
|   B00_QT | DEL       |   LDG | PICK      | PREQ      |   QTY |   RETAIL | SOURCE   | TRANS     | U_MCH   |
|---------:|:----------|------:|:----------|:----------|------:|---------:|:---------|:----------|:--------|
|        0 | 1/30/2019 |    69 | 1/28/2019 | 1/20/2019 |     6 |   203581 | D060     | 1/27/2019 | M003310 |
|        0 | 1/30/2019 |    69 | 1/28/2019 | 1/20/2019 |     6 |   203581 | D060     | 1/27/2019 | M003310 |
|        0 | 1/30/2019 |    69 | 1/28/2019 | 1/20/2019 |     6 |   203581 | D060     | 1/27/2019 | M003310 |
|        0 | 1/30/2019 |    69 | 1/28/2019 | 1/20/2019 |     6 |   203581 | D060     | 1/27/2019 | M003310 |
|        0 | 1/30/2019 |    69 | 1/31/2019 | 1/20/2019 |     6 |   203581 | D060     | 1/27/2019 | M003310 |
|        0 | 1/30/2019 |    69 | 1/31/2019 | 1/20/2019 |     6 |   203581 | D060     | 1/27/2019 | M003310 |
|        0 | 1/30/2019 |    69 | 1/31/2019 | 1/20/2019 |     6 |   203581 | D060     | 1/27/2019 | M003310 |
|        0 | 1/30/2019 |    69 | 1/31/2019 | 1/20/2019 |     6 |   203581 | D060     | 1/27/2019 | M003310 |
|        0 | 1/30/2019 |    69 | 1/31/2019 | 1/20/2019 |    11 |   203581 | D060     | 1/27/2019 | M003310 |
|        0 | 1/30/2019 |    69 | 1/31/2019 | 1/20/2019 |     6 |   203581 | D060     | 1/27/2019 | M003310 |


Table: Table25
| Emp   | Date                    |   Hours |
|:------|:------------------------|--------:|
| Greg  | 2019-01-06 00:00:00.000 |    40   |
| Bill  | 2019-01-06 00:00:00.000 |    30   |
| Bill  | 2019-01-13 00:00:00.000 |    45   |
| Bill  | 2019-01-20 00:00:00.000 |    37.5 |
| Bill  | 2019-01-27 00:00:00.000 |    37.5 |


Table: Table3
| Name   | Class   |   Minimum | Attribute   |   Value |   Custom |
|:-------|:--------|----------:|:------------|--------:|---------:|
| Greg   | A       |         1 | Sept        |       9 |        1 |
| Greg   | A       |         1 | Oct         |       8 |        2 |
| Greg   | A       |         1 | Nov         |       9 |        3 |
| Greg   | A       |         1 | Dec         |       8 |        4 |
| Greg   | A       |         1 | Mock        |       9 |        5 |
| Joe    | A       |         1 | Sept        |       5 |        1 |
| Joe    | A       |         1 | Oct         |       6 |        2 |
| Joe    | A       |         1 | Nov         |       8 |        3 |
| Joe    | A       |         1 | Dec         |       6 |        4 |
| Joe    | A       |         1 | Mock        |       5 |        5 |


Table: Table4
| Item   | Unit of Measure   |   Quantity |
|:-------|:------------------|-----------:|
| A      | kg                |          1 |
| B      | mg                |    1000000 |
| C      | mg                |    1000000 |
| A      | mg                |    1000000 |


Table: Table5
| Type                       |   Value |
|:---------------------------|--------:|
| On hand inventory          |     100 |
| Scheduled Receipts (today) |      25 |


Table: Table6
| Date                    |   Sales Demand |   Column |
|:------------------------|---------------:|---------:|
| 2019-02-01 00:00:00.000 |              5 |      120 |
| 2019-02-02 00:00:00.000 |             10 |      110 |
| 2019-02-03 00:00:00.000 |              7 |      103 |
| 2019-02-04 00:00:00.000 |             20 |       83 |
| 2019-02-05 00:00:00.000 |             83 |        0 |


Table: Table7
|   Id_Product | Product   | Group      | Subgroup    |   Value_Sold | Date_Sold               |
|-------------:|:----------|:-----------|:------------|-------------:|:------------------------|
|            1 | Computer  | Eletronics | IT          |         1000 | 2018-05-01 00:00:00.000 |
|            1 | Computer  | Eletronics | IT          |         1000 | 2017-06-01 00:00:00.000 |
|            1 | Computer  | Eletronics | IT          |         1000 | 2017-07-01 00:00:00.000 |
|            2 | Mouse     | Eletronics | Peripherals |           25 | 2018-05-01 00:00:00.000 |
|            2 | Mouse     | Eletronics | Peripherals |           25 | 2018-06-01 00:00:00.000 |
|            3 | Headphone | Eletronics | Sound       |           35 | 2018-12-01 00:00:00.000 |


Table: Table8 2
| Color   | Col1   |   Col2 | Col3   | Column   |
|:--------|:-------|-------:|:-------|:---------|
| Red     | 10     |     10 | 10     | 1        |
| Blue    |        |     10 | 10     |          |
| White   | 20     |     10 | 10     | 1        |
| Green   | 10     |     20 | 15     | 1        |
| Brown   | 10     |     10 |        |          |
| Pink    |        |     10 | 10     |          |


Table: Table8
| Date_Sold               |
|:------------------------|
| 2018-05-01 00:00:00.000 |
| 2017-06-01 00:00:00.000 |
| 2017-07-01 00:00:00.000 |
| 2018-06-01 00:00:00.000 |
| 2018-12-01 00:00:00.000 |


Table: Table9
| s_ordernr   |   Amount |
|:------------|---------:|
| S4142       |      147 |
| S4143       |      147 |
| S4144       |      147 |
| S4145       |      147 |
| S4146       |      147 |


Table: UnitOptions
|   UnitKey | OptionKey   |
|----------:|:------------|
|       123 | 35B         |
|       123 | 12A         |
|       123 | 51G         |
|       456 | 66F         |
|       456 | 12A         |
|       456 | 77X         |
|       789 | 35B         |
|       789 | 21G         |
|       789 | 12A         |
|       951 | 89K         |


Table: Units
|   UnitKey |
|----------:|
|       123 |
|       456 |
|       789 |
|       951 |

 


tables: name: Calendar
data: Calendar.csv
name: New Calendar
data: New Calendar.csv
name: Options
data: Options.csv
name: SlicerTable
data: SlicerTable.csv
name: Table 2
data: Table 2.csv
name: Table
data: Table.csv
name: Table1
data: Table1.csv
name: Table10
data: Table10.csv
name: Table11
data: Table11.csv
name: Table12
data: Table12.csv
name: Table13
data: Table13.csv
name: Table14
data: Table14.csv
name: Table15 2
data: Table15 2.csv
name: Table15
data: Table15.csv
name: Table15_2_Calendar1
data: Table15_2_Calendar1.csv
name: Table15_2_Calendar2
data: Table15_2_Calendar2.csv
name: Table16
data: Table16.csv
name: Table17
data: Table17.csv
name: Table18
data: Table18.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: Table24
data: Table24.csv
name: Table25
data: Table25.csv
name: Table3
data: Table3.csv
name: Table4
data: Table4.csv
name: Table5
data: Table5.csv
name: Table6
data: Table6.csv
name: Table7
data: Table7.csv
name: Table8 2
data: Table8 2.csv
name: Table8
data: Table8.csv
name: Table9
data: Table9.csv
name: UnitOptions
data: UnitOptions.csv
name: Units
data: Units.csv
label: Table10
s_ordernr
Table9
s_ordernr
UnitOptions
UnitKey
Units
UnitKey
UnitOptions
OptionKey
Options
OptionKey
output: {
    "joins": [
        {
            "from_table": "Table10",
            "from_column": "s_ordernr",
            "to_table": "Table9",
            "to_column": "s_ordernr"
        },
        {
            "from_table": "UnitOptions",
            "from_column": "UnitKey",
            "to_table": "Units",
            "to_column": "UnitKey"
        },
        {
            "from_table": "UnitOptions",
            "from_column": "OptionKey",
            "to_table": "Options",
            "to_column": "OptionKey"
        }
    ]
}