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: BusinessUnits
|   BusinessUnitID | BusinessUnit   | Division      | Group     |
|-----------------:|:---------------|:--------------|:----------|
|                1 | Baby Care BU   | Personal care | Baby Care |
|                4 | Hair Care BU   | Personal care | Hair Care |
|                5 | Oral Care BU   | Personal care | Oral Care |
|                6 | Skin Care BU   | Personal care | Skin Care |
|                7 | Accessories    | Electronics   | Comp      |
|                8 | Desktop PC     | Electronics   | Comp      |
|                9 | Laptops        | Electronics   | Comp      |
|               10 | Monitors       | Electronics   | Comp      |
|               16 | Cameras        | Electronics   | Video     |
|               17 | TV             | Electronics   | Video     |


Table: Calendar
| Date                    |   Year |   MonthNo | Month   | Quarter   | YearMonth   |   WeekdayNo | Weekday   |
|:------------------------|-------:|----------:|:--------|:----------|:------------|------------:|:----------|
| 2016-01-01 00:00:00.000 |   2016 |         1 | Jan     | Q1        | 2016-01     |           5 | Fri       |
| 2016-01-02 00:00:00.000 |   2016 |         1 | Jan     | Q1        | 2016-01     |           6 | Sat       |
| 2016-01-03 00:00:00.000 |   2016 |         1 | Jan     | Q1        | 2016-01     |           7 | Sun       |
| 2016-01-04 00:00:00.000 |   2016 |         1 | Jan     | Q1        | 2016-01     |           1 | Mon       |
| 2016-01-05 00:00:00.000 |   2016 |         1 | Jan     | Q1        | 2016-01     |           2 | Tue       |
| 2016-01-06 00:00:00.000 |   2016 |         1 | Jan     | Q1        | 2016-01     |           3 | Wed       |
| 2016-01-07 00:00:00.000 |   2016 |         1 | Jan     | Q1        | 2016-01     |           4 | Thu       |
| 2016-01-08 00:00:00.000 |   2016 |         1 | Jan     | Q1        | 2016-01     |           5 | Fri       |
| 2016-01-09 00:00:00.000 |   2016 |         1 | Jan     | Q1        | 2016-01     |           6 | Sat       |
| 2016-01-10 00:00:00.000 |   2016 |         1 | Jan     | Q1        | 2016-01     |           7 | Sun       |


Table: Customers
|   CustomerID | Customer                       | Region        | CountryID     |   RegionID |
|-------------:|:-------------------------------|:--------------|:--------------|-----------:|
|          286 | Savoia Custom Classic Clothier | North America | United States |          1 |
|          302 | Automotive Asset Protection    | North America | United States |          1 |
|          306 | B & D Marketing                | North America | United States |          1 |
|          322 | Geekdeal.com                   | North America | United States |          1 |
|          330 | Battery Outfitters             | North America | United States |          1 |
|          340 | Mountain Expressions           | North America | United States |          1 |
|          345 | Catherine Malandrino           | North America | United States |          1 |
|          346 | Heritage Hosiery               | North America | United States |          1 |
|          347 | One Root Tea & Herbothecary    | North America | United States |          1 |
|          350 | Gifts Of Faith                 | North America | United States |          1 |


Table: KPIs
| KPI          |   KPI_ID |
|:-------------|---------:|
| Revenue      |        1 |
| Cost         |        2 |
| Gross Profit |        3 |


Table: Period Calculation
| Period Calculation   |   CalcID |
|:---------------------|---------:|
| Monthly              |        1 |
| YTD                  |        2 |
| Full year            |        3 |


Table: Products
|   ProductID | Product      | ProductCategoryID   | ProductGroupID   |
|------------:|:-------------|:--------------------|:-----------------|
|        2449 | Product 2449 | Llysstai            | Product Group 36 |
|        2453 | Product 2453 | Llysstai            | Product Group 36 |
|        2454 | Product 2454 | Llysstai            | Product Group 36 |
|        2459 | Product 2459 | Llysstai            | Product Group 36 |
|        2462 | Product 2462 | Llysstai            | Product Group 36 |
|        2463 | Product 2463 | Llysstai            | Product Group 36 |
|        2464 | Product 2464 | Llysstai            | Product Group 36 |
|        2465 | Product 2465 | Llysstai            | Product Group 36 |
|        2468 | Product 2468 | Llysstai            | Product Group 36 |
|        2471 | Product 2471 | Llysstai            | Product Group 36 |


Table: Sales
| Date                    |   ProductID |   CustomerID |   SalespersonID |   BusinessUnitID |   Revenue |   Cost |   Gross Profit | Scenario   |
|:------------------------|------------:|-------------:|----------------:|-----------------:|----------:|-------:|---------------:|:-----------|
| 2017-06-23 00:00:00.000 |        2892 |         1710 |             117 |               27 |        55 |      0 |             55 | AC         |
| 2017-07-21 00:00:00.000 |        2892 |         1710 |             117 |               27 |        55 |      0 |             55 | AC         |
| 2017-08-30 00:00:00.000 |        2892 |         1710 |             117 |               27 |        55 |      0 |             55 | AC         |
| 2017-09-28 00:00:00.000 |        2892 |         1710 |             117 |               27 |        55 |      0 |             55 | AC         |
| 2017-10-25 00:00:00.000 |        2892 |         1710 |             117 |               27 |        55 |      0 |             55 | AC         |
| 2017-11-27 00:00:00.000 |        2892 |         1710 |             117 |               27 |        55 |      0 |             55 | AC         |
| 2017-12-21 00:00:00.000 |        2892 |         1710 |             117 |               27 |        55 |      0 |             55 | AC         |
| 2018-01-29 00:00:00.000 |        2892 |         1710 |             117 |               27 |        55 |      0 |             55 | AC         |
| 2018-02-27 00:00:00.000 |        2892 |         1710 |             117 |               27 |        55 |      0 |             55 | AC         |
| 2018-03-29 00:00:00.000 |        2892 |         1710 |             117 |               27 |        55 |      0 |             55 | AC         |


Table: Salespersons
|   SalespersonID | Salesperson      |
|----------------:|:-----------------|
|               1 | Carmina Craft    |
|               2 | Keri Kung        |
|               3 | Maddie Mckinsey  |
|               4 | Alanna Ambler    |
|               5 | Jimmie Jarrett   |
|               7 | Gonzalo Gundlach |
|               8 | Noella Newman    |
|               9 | Almeta Ashman    |
|              10 | Maurita Mcmanis  |
|              11 | Mee Mallon       |

 


tables: name: BusinessUnits
data: BusinessUnits.csv
name: Calendar
data: Calendar.csv
name: Customers
data: Customers.csv
name: KPIs
data: KPIs.csv
name: Period Calculation
data: Period Calculation.csv
name: Products
data: Products.csv
name: Sales
data: Sales.csv
name: Salespersons
data: Salespersons.csv
label: Sales
ProductID
Products
ProductID
Sales
CustomerID
Customers
CustomerID
Sales
BusinessUnitID
BusinessUnits
BusinessUnitID
Sales
SalespersonID
Salespersons
SalespersonID
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "ProductID",
            "to_table": "Products",
            "to_column": "ProductID"
        },
        {
            "from_table": "Sales",
            "from_column": "CustomerID",
            "to_table": "Customers",
            "to_column": "CustomerID"
        },
        {
            "from_table": "Sales",
            "from_column": "BusinessUnitID",
            "to_table": "BusinessUnits",
            "to_column": "BusinessUnitID"
        },
        {
            "from_table": "Sales",
            "from_column": "SalespersonID",
            "to_table": "Salespersons",
            "to_column": "SalespersonID"
        }
    ]
}