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                    |   Year |   YearOffset | YearCompleted   |   QuarterOfYear | Quarter & Year   |   QuarternYear |   QuarterOffset | QuarterCompleted   |   MonthOfYear |   DayOfMonth | Month Name   | MonthShortName   | Month Initial   | Month & Year   |   MonthnYear |   MonthOffset | MonthCompleted   | MonthEnding             |   DateInt |   DayOfWeek | DayOfWeekName   | Weekday Initial   | Day Type   |   ISO Year |   ISO YearOffset |   ISO QuarterOfYear | ISO Quarter   | ISO Quarter & Year   |   ISO QuarternYear |   ISO QuarterOffset |   ISO Weeknumber | Week & Year   |   WeeknYear |   WeekOffset | WeekCompleted   | WeekEnding              | Fiscal Year   |   FiscalYearOffset | Fiscal Quarter   |   FQuarternYear | IsCurrentFQ   |   Fiscal Period |   FPeriodnYear | IsCurrentFP   |   Fiscal Week | Fiscal Year & Week   |   FWeeknYear | IsCurrentFW   | IsAfterToday   | IsWorkingDay   | IsHoliday   | IsBusinessDay   | IsPYTD   | IsPFYTD   |
|:------------------------|-------:|-------------:|:----------------|----------------:|:-----------------|---------------:|----------------:|:-------------------|--------------:|-------------:|:-------------|:-----------------|:----------------|:---------------|-------------:|--------------:|:-----------------|:------------------------|----------:|------------:|:----------------|:------------------|:-----------|-----------:|-----------------:|--------------------:|:--------------|:---------------------|-------------------:|--------------------:|-----------------:|:--------------|------------:|-------------:|:----------------|:------------------------|:--------------|-------------------:|:-----------------|----------------:|:--------------|----------------:|---------------:|:--------------|--------------:|:---------------------|-------------:|:--------------|:---------------|:---------------|:------------|:----------------|:---------|:----------|
| 2021-01-04 00:00:00.000 |   2021 |            0 | False           |               1 | Q1 2021          |       20210100 |              -3 | True               |             1 |            4 | January      | Jan              | J​               | Jan 2021       |     20210100 |            -9 | True             | 2021-01-31 00:00:00.000 |  20210104 |           0 | Monday          | M                 | Weekday    |       2021 |                0 |                   1 | Q1            | Q1 2021              |           20210100 |                  -3 |                1 | 2021-01       |    20210100 |          -42 | True            | 2021-01-10 00:00:00.000 | FY21          |                  0 | FQ1              |        20210100 | False         |               1 |       20210100 | False         |             2 | 2021-01              |     20210100 | False         | False          | True           | Unknown     | True            | False    | False     |
| 2021-01-05 00:00:00.000 |   2021 |            0 | False           |               1 | Q1 2021          |       20210100 |              -3 | True               |             1 |            5 | January      | Jan              | J​               | Jan 2021       |     20210100 |            -9 | True             | 2021-01-31 00:00:00.000 |  20210105 |           1 | Tuesday         | T​                 | Weekday    |       2021 |                0 |                   1 | Q1            | Q1 2021              |           20210100 |                  -3 |                1 | 2021-01       |    20210100 |          -42 | True            | 2021-01-10 00:00:00.000 | FY21          |                  0 | FQ1              |        20210100 | False         |               1 |       20210100 | False         |             2 | 2021-01              |     20210100 | False         | False          | True           | Unknown     | True            | False    | False     |
| 2021-01-06 00:00:00.000 |   2021 |            0 | False           |               1 | Q1 2021          |       20210100 |              -3 | True               |             1 |            6 | January      | Jan              | J​               | Jan 2021       |     20210100 |            -9 | True             | 2021-01-31 00:00:00.000 |  20210106 |           2 | Wednesday       | W​​                 | Weekday    |       2021 |                0 |                   1 | Q1            | Q1 2021              |           20210100 |                  -3 |                1 | 2021-01       |    20210100 |          -42 | True            | 2021-01-10 00:00:00.000 | FY21          |                  0 | FQ1              |        20210100 | False         |               1 |       20210100 | False         |             2 | 2021-01              |     20210100 | False         | False          | True           | Unknown     | True            | False    | False     |
| 2021-01-07 00:00:00.000 |   2021 |            0 | False           |               1 | Q1 2021          |       20210100 |              -3 | True               |             1 |            7 | January      | Jan              | J​               | Jan 2021       |     20210100 |            -9 | True             | 2021-01-31 00:00:00.000 |  20210107 |           3 | Thursday        | T​​​                 | Weekday    |       2021 |                0 |                   1 | Q1            | Q1 2021              |           20210100 |                  -3 |                1 | 2021-01       |    20210100 |          -42 | True            | 2021-01-10 00:00:00.000 | FY21          |                  0 | FQ1              |        20210100 | False         |               1 |       20210100 | False         |             2 | 2021-01              |     20210100 | False         | False          | True           | Unknown     | True            | False    | False     |
| 2021-01-08 00:00:00.000 |   2021 |            0 | False           |               1 | Q1 2021          |       20210100 |              -3 | True               |             1 |            8 | January      | Jan              | J​               | Jan 2021       |     20210100 |            -9 | True             | 2021-01-31 00:00:00.000 |  20210108 |           4 | Friday          | F​​​​                 | Weekday    |       2021 |                0 |                   1 | Q1            | Q1 2021              |           20210100 |                  -3 |                1 | 2021-01       |    20210100 |          -42 | True            | 2021-01-10 00:00:00.000 | FY21          |                  0 | FQ1              |        20210100 | False         |               1 |       20210100 | False         |             2 | 2021-01              |     20210100 | False         | False          | True           | Unknown     | True            | False    | False     |
| 2021-01-09 00:00:00.000 |   2021 |            0 | False           |               1 | Q1 2021          |       20210100 |              -3 | True               |             1 |            9 | January      | Jan              | J​               | Jan 2021       |     20210100 |            -9 | True             | 2021-01-31 00:00:00.000 |  20210109 |           5 | Saturday        | S​​​​​                 | Weekend    |       2021 |                0 |                   1 | Q1            | Q1 2021              |           20210100 |                  -3 |                1 | 2021-01       |    20210100 |          -42 | True            | 2021-01-10 00:00:00.000 | FY21          |                  0 | FQ1              |        20210100 | False         |               1 |       20210100 | False         |             2 | 2021-01              |     20210100 | False         | False          | False          | Unknown     | False           | False    | False     |
| 2021-01-10 00:00:00.000 |   2021 |            0 | False           |               1 | Q1 2021          |       20210100 |              -3 | True               |             1 |           10 | January      | Jan              | J​               | Jan 2021       |     20210100 |            -9 | True             | 2021-01-31 00:00:00.000 |  20210110 |           6 | Sunday          | S​​​​​​                 | Weekend    |       2021 |                0 |                   1 | Q1            | Q1 2021              |           20210100 |                  -3 |                1 | 2021-01       |    20210100 |          -42 | True            | 2021-01-10 00:00:00.000 | FY21          |                  0 | FQ1              |        20210100 | False         |               1 |       20210100 | False         |             2 | 2021-01              |     20210100 | False         | False          | False          | Unknown     | False           | False    | False     |
| 2021-01-11 00:00:00.000 |   2021 |            0 | False           |               1 | Q1 2021          |       20210100 |              -3 | True               |             1 |           11 | January      | Jan              | J​               | Jan 2021       |     20210100 |            -9 | True             | 2021-01-31 00:00:00.000 |  20210111 |           0 | Monday          | M                 | Weekday    |       2021 |                0 |                   1 | Q1            | Q1 2021              |           20210100 |                  -3 |                2 | 2021-02       |    20210200 |          -41 | True            | 2021-01-17 00:00:00.000 | FY21          |                  0 | FQ1              |        20210100 | False         |               1 |       20210100 | False         |             3 | 2021-02              |     20210200 | False         | False          | True           | Unknown     | True            | False    | False     |
| 2021-01-12 00:00:00.000 |   2021 |            0 | False           |               1 | Q1 2021          |       20210100 |              -3 | True               |             1 |           12 | January      | Jan              | J​               | Jan 2021       |     20210100 |            -9 | True             | 2021-01-31 00:00:00.000 |  20210112 |           1 | Tuesday         | T​                 | Weekday    |       2021 |                0 |                   1 | Q1            | Q1 2021              |           20210100 |                  -3 |                2 | 2021-02       |    20210200 |          -41 | True            | 2021-01-17 00:00:00.000 | FY21          |                  0 | FQ1              |        20210100 | False         |               1 |       20210100 | False         |             3 | 2021-02              |     20210200 | False         | False          | True           | Unknown     | True            | False    | False     |
| 2021-01-13 00:00:00.000 |   2021 |            0 | False           |               1 | Q1 2021          |       20210100 |              -3 | True               |             1 |           13 | January      | Jan              | J​               | Jan 2021       |     20210100 |            -9 | True             | 2021-01-31 00:00:00.000 |  20210113 |           2 | Wednesday       | W​​                 | Weekday    |       2021 |                0 |                   1 | Q1            | Q1 2021              |           20210100 |                  -3 |                2 | 2021-02       |    20210200 |          -41 | True            | 2021-01-17 00:00:00.000 | FY21          |                  0 | FQ1              |        20210100 | False         |               1 |       20210100 | False         |             3 | 2021-02              |     20210200 | False         | False          | True           | Unknown     | True            | False    | False     |


Table: Depts
|   Dept ID | Dep Name   | Manager Group1   | Manager Group2   |
|----------:|:-----------|:-----------------|:-----------------|
|         1 | Dept 1     | Manager 1        |                  |
|         2 | Dept 2     | Manager 2        | Manager 7        |
|         3 | Dept 3     | Manager 1        |                  |
|         4 | Dept 4     | Manager 4        |                  |
|         5 | Dept 5     | Manager 3        |                  |
|         6 | Dept 6     | Manager 3        | Manager 7        |
|         7 | Dept 7     | Manager 5        | Manager 7        |
|         8 | Dept 8     | Manager 6        |                  |


Table: Managers
|   ManagerId | Manager          | Managergroup   | ReportsTo   | MgrHierarchy Group 1   | Hierarchy Group 2   | Org01        | Org02            | Org03     | Org04     |
|------------:|:-----------------|:---------------|:------------|:-----------------------|:--------------------|:-------------|:-----------------|:----------|:----------|
|           2 | The Big Boss     | Manager Group1 |             | 2                      | 2                   | The Big Boss |                  |           |           |
|           3 | Senior Manager 1 | Manager Group1 | 2           | 2|3                    | 2|3                 | The Big Boss | Senior Manager 1 |           |           |
|           4 | Senior Manager 2 | Manager Group1 | 2           | 2|4                    | 2|4                 | The Big Boss | Senior Manager 2 |           |           |
|           5 | Manager 1        | Manager Group1 | 3           | 2|3|5                  | 5                   | The Big Boss | Senior Manager 1 | Manager 1 |           |
|           6 | Manager 2        | Manager Group1 | 3           | 2|3|6                  | 6                   | The Big Boss | Senior Manager 1 | Manager 2 |           |
|           7 | Manager 3        | Manager Group1 | 5           | 2|3|5|7                | 5|7                 | The Big Boss | Senior Manager 1 | Manager 1 | Manager 3 |
|           8 | Manager 4        | Manager Group1 | 4           | 2|4|8                  | 8                   | The Big Boss | Senior Manager 2 | Manager 4 |           |
|           9 | Manager 5        | Manager Group1 | 6           | 2|3|6|9                | 6|9                 | The Big Boss | Senior Manager 1 | Manager 2 | Manager 5 |
|          10 | Manager 6        | Manager Group1 | 4           | 2|4|10                 | 10                  | The Big Boss | Senior Manager 2 | Manager 6 |           |
|          11 | Manager 7        | Manager Group2 | 3           | 2|3|11                 | 11                  | The Big Boss | Senior Manager 1 | Manager 7 |           |


Table: Sales
| Date                    |   Dept ID |   Sales |
|:------------------------|----------:|--------:|
| 2021-01-31 00:00:00.000 |         1 |    2600 |
| 2021-01-31 00:00:00.000 |         2 |    3900 |
| 2021-01-31 00:00:00.000 |         3 |    6700 |
| 2021-01-31 00:00:00.000 |         4 |    8600 |
| 2021-01-31 00:00:00.000 |         5 |    7400 |
| 2021-01-31 00:00:00.000 |         6 |    4200 |
| 2021-01-31 00:00:00.000 |         7 |    8500 |
| 2021-01-31 00:00:00.000 |         8 |    3500 |
| 2021-02-28 00:00:00.000 |         1 |    9100 |
| 2021-02-28 00:00:00.000 |         2 |    6900 |

 


tables: name: Calendar
data: Calendar.csv
name: Depts
data: Depts.csv
name: Managers
data: Managers.csv
name: Sales
data: Sales.csv
label: Sales
Date
Calendar
Date
Sales
Dept ID
Depts
Dept ID
Depts
Manager Group1
Managers
Manager
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "Date",
            "to_table": "Calendar",
            "to_column": "Date"
        },
        {
            "from_table": "Sales",
            "from_column": "Dept ID",
            "to_table": "Depts",
            "to_column": "Dept ID"
        },
        {
            "from_table": "Depts",
            "from_column": "Manager Group1",
            "to_table": "Managers",
            "to_column": "Manager"
        }
    ]
}