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: dimChannel
|   ChannelKey |   ChannelLabel | ChannelName   | ChannelDescription   |
|-------------:|---------------:|:--------------|:---------------------|
|            1 |              1 | Store         | Store                |
|            2 |              2 | Online        | Online               |
|            3 |              3 | Catalog       | Catalog              |
|            4 |              4 | Reseller      | Reseller             |


Table: dimDate
| Date                    |   Year |   QuarterNo | Quarter   |   MonthNo | Month   |   DayNo | Day   |
|:------------------------|-------:|------------:|:----------|----------:|:--------|--------:|:------|
| 2018-07-01 00:00:00.000 |   2018 |           3 | Q3        |         7 | Jul     |       7 | Sun   |
| 2018-07-02 00:00:00.000 |   2018 |           3 | Q3        |         7 | Jul     |       1 | Mon   |
| 2018-07-03 00:00:00.000 |   2018 |           3 | Q3        |         7 | Jul     |       2 | Tue   |
| 2018-07-04 00:00:00.000 |   2018 |           3 | Q3        |         7 | Jul     |       3 | Wed   |
| 2018-07-05 00:00:00.000 |   2018 |           3 | Q3        |         7 | Jul     |       4 | Thu   |
| 2018-07-06 00:00:00.000 |   2018 |           3 | Q3        |         7 | Jul     |       5 | Fri   |
| 2018-07-07 00:00:00.000 |   2018 |           3 | Q3        |         7 | Jul     |       6 | Sat   |
| 2018-07-08 00:00:00.000 |   2018 |           3 | Q3        |         7 | Jul     |       7 | Sun   |
| 2018-07-09 00:00:00.000 |   2018 |           3 | Q3        |         7 | Jul     |       1 | Mon   |
| 2018-07-10 00:00:00.000 |   2018 |           3 | Q3        |         7 | Jul     |       2 | Tue   |


Table: dimLocation
|   LocationKey | GeographyType   | Continent   | City       | State                  | Country         | Geometry                 |
|--------------:|:----------------|:------------|:-----------|:-----------------------|:----------------|:-------------------------|
|           529 | City            | Europe      | Paris      | Seine (Paris)          | France          | POINT (-89.5976 36.8915) |
|           586 | City            | Europe      | Berlin     | Berlin                 | Germany         | POINT (-76.5535 41.5873) |
|           736 | City            | Europe      | Amsterdam  | Noord-Holland          | the Netherlands | POINT (-74.1845 42.9401) |
|           747 | City            | Europe      | Dusseldorf | North Rhine-Westphalia | Germany         | POINT (6.77994 51.2283)  |
|           765 | City            | Europe      | Munich     | Bavaria                | Germany         | POINT (11.5755 48.1432)  |


Table: dimProduct
|   ProductKey | ProductName                  | Manufacturer   | ClassName   | StyleName      | ColorName   | StockTypeName   |   UnitCost |   UnitPrice | ProductSubcategoryName   | ProductCategoryName   |
|-------------:|:-----------------------------|:---------------|:------------|:---------------|:------------|:----------------|-----------:|------------:|:-------------------------|:----------------------|
|          338 | Harics Laptop19W M9800 Black | Harics         | Regular     | Product0301001 | Black       | High            |     397.25 |     1199    | Laptops                  | Computers             |
|          339 | Harics Laptop17W M7080 Black | Harics         | Regular     | Product0301002 | Black       | High            |     404.63 |      879.9  | Laptops                  | Computers             |
|          340 | Harics Laptop17 M7000 Black  | Harics         | Regular     | Product0301003 | Black       | High            |     376.63 |      819    | Laptops                  | Computers             |
|          341 | Harics Laptop16W M6080 Black | Harics         | Regular     | Product0301004 | Black       | High            |     444.69 |      967    | Laptops                  | Computers             |
|          342 | Harics Laptop16 M6000 Black  | Harics         | Regular     | Product0301005 | Black       | High            |     275.46 |      599    | Laptops                  | Computers             |
|          343 | Harics Laptop19 M9000 Black  | Harics         | Regular     | Product0301006 | Black       | High            |     364.12 |     1099    | Laptops                  | Computers             |
|          362 | Koder Laptop19 X1900 Black   | Koder          | Deluxe      | Product0301025 | Black       | High            |     430.38 |     1299    | Laptops                  | Computers             |
|          363 | Koder Laptop15 M1500 Black   | Koder          | Regular     | Product0301026 | Black       | High            |     321.44 |      699    | Laptops                  | Computers             |
|          364 | Koder Laptop12 M1200 Black   | Koder          | Regular     | Product0301027 | Black       | High            |     195.24 |      382.95 | Laptops                  | Computers             |
|          365 | Koder Laptop16 M1600 Black   | Koder          | Regular     | Product0301028 | Black       | High            |     275.46 |      599    | Laptops                  | Computers             |


Table: dimPromotion
|   PromotionKey |   PromotionLabel | PromotionName                     | PromotionDescription              |   DiscountPercent | PromotionType     | PromotionCategory   | StartDate               | EndDate                 |
|---------------:|-----------------:|:----------------------------------|:----------------------------------|------------------:|:------------------|:--------------------|:------------------------|:------------------------|
|              1 |                1 | No Discount                       | No Discount                       |              0    | No Discount       | No Discount         | 2018-01-01 00:00:00.000 | 2020-12-31 00:00:00.000 |
|              8 |                8 | European Spring Promotion         | European Spring Promotion         |              0.07 | Seasonal Discount | Store               | 2018-02-01 00:00:00.000 | 2018-04-30 00:00:00.000 |
|              9 |                9 | European Back-to-Scholl Promotion | European Back-to-Scholl Promotion |              0.1  | Seasonal Discount | Store               | 2018-08-01 00:00:00.000 | 2018-09-30 00:00:00.000 |
|             10 |               10 | European Holiday Promotion        | European Holiday Promotion        |              0.2  | Seasonal Discount | Store               | 2018-10-01 00:00:00.000 | 2019-01-31 00:00:00.000 |
|             17 |               17 | European Spring Promotion         | European Spring Promotion         |              0.07 | Seasonal Discount | Store               | 2019-02-01 00:00:00.000 | 2019-04-30 00:00:00.000 |
|             18 |               18 | European Back-to-Scholl Promotion | European Back-to-Scholl Promotion |              0.1  | Seasonal Discount | Store               | 2019-08-01 00:00:00.000 | 2019-09-30 00:00:00.000 |
|             19 |               19 | European Holiday Promotion        | European Holiday Promotion        |              0.2  | Seasonal Discount | Store               | 2019-10-01 00:00:00.000 | 2020-01-31 00:00:00.000 |
|             26 |               26 | European Spring Promotion         | European Spring Promotion         |              0.07 | Seasonal Discount | Store               | 2020-02-01 00:00:00.000 | 2020-04-30 00:00:00.000 |
|             27 |               27 | European Back-to-Scholl Promotion | European Back-to-Scholl Promotion |              0.1  | Seasonal Discount | Store               | 2020-08-01 00:00:00.000 | 2020-09-30 00:00:00.000 |
|             28 |               28 | European Holiday Promotion        | European Holiday Promotion        |              0.2  | Seasonal Discount | Store               | 2020-10-01 00:00:00.000 | 2020-01-31 00:00:00.000 |


Table: dimStore
|   StoreKey |   LocationKey |   StoreManager | StoreType   | StoreName           | ZipCode   | StorePhone   | AddressLine1                                                     |   EmployeeCount |   SellingAreaSize |
|-----------:|--------------:|---------------:|:------------|:--------------------|:----------|:-------------|:-----------------------------------------------------------------|----------------:|------------------:|
|        200 |           765 |            213 | Catalog     | Catalog Store       | 21234     | 278-555-0118 | Citycenter München, Germany                                      |             120 |               462 |
|        215 |           529 |            233 | Store       | Paris Store         | 75001     | 139-555-0131 | Rue de Rivoli Citycenter  Paris, France                          |              12 |               680 |
|        234 |           747 |            251 | Store       | Dusseldorf Store    | 40229     | 283-555-0185 | Citycenter, Düsseldorf, Germany                                  |              24 |               500 |
|        240 |           736 |            257 | Store       | Amsterdam Store     |           | 230-555-0144 | Citycenter Shopping mall, Amsterdam (Noord-Holland), Netherlands |              26 |               680 |
|        306 |           586 |            246 | Online      | Europe Online Store | 10178     | 731-555-0117 | Downtown Berlin, Germany                                         |               7 |              1000 |
|        309 |           529 |            233 | Reseller    | Europe Reseller     | 535455    | 55-555-0119  | France Shopping Mall                                             |              12 |               551 |


Table: fctForecast
|   ChannelKey |   StoreKey |   ProductKey | DateKey                 |   SalesQuantityQuota |   SalesAmountQuota |   GrossMarginQuota |
|-------------:|-----------:|-------------:|:------------------------|---------------------:|-------------------:|-------------------:|
|            3 |        200 |          621 | 2019-08-01 00:00:00.000 |                   30 |            4510.91 |            2167.63 |
|            3 |        200 |          706 | 2019-08-01 00:00:00.000 |                   30 |            2607.58 |            1276.06 |
|            3 |        200 |          602 | 2019-08-01 00:00:00.000 |                   30 |           32835.8  |           17672    |
|            3 |        200 |          393 | 2019-08-01 00:00:00.000 |                   30 |           19439.1  |           10345    |
|            3 |        200 |           46 | 2019-08-01 00:00:00.000 |                   30 |            4866.27 |            2338.49 |
|            3 |        200 |          713 | 2019-08-01 00:00:00.000 |                   30 |            5281.17 |            2852.62 |
|            3 |        200 |         1418 | 2019-08-01 00:00:00.000 |                   30 |            9589.88 |            5142.12 |
|            3 |        200 |          682 | 2019-08-01 00:00:00.000 |                   30 |            4470.14 |            2405.83 |
|            3 |        200 |         1437 | 2019-08-01 00:00:00.000 |                   30 |            6596.06 |            3275.61 |
|            3 |        200 |          613 | 2019-08-01 00:00:00.000 |                   30 |           22878.2  |           11740.1  |


Table: fctSales
|   channelKey |   StoreKey |   ProductKey |   PromotionKey | DateKey                 |   UnitCost |   UnitPrice |   SalesQuantity |   ReturnQuantity |   ReturnAmount |   DiscountQuantity |   DiscountAmount |   TotalCost |   SalesAmount |
|-------------:|-----------:|-------------:|---------------:|:------------------------|-----------:|------------:|----------------:|-----------------:|---------------:|-------------------:|-----------------:|------------:|--------------:|
|            3 |        200 |          601 |              1 | 2019-10-15 00:00:00.000 |     321.44 |         699 |              10 |                0 |              0 |                  0 |                0 |      3214.4 |          6990 |
|            3 |        200 |          369 |              1 | 2018-10-16 00:00:00.000 |     321.44 |         699 |              10 |                0 |              0 |                  0 |                0 |      3214.4 |          6990 |
|            3 |        200 |          601 |              1 | 2018-05-16 00:00:00.000 |     321.44 |         699 |              10 |                0 |              0 |                  0 |                0 |      3214.4 |          6990 |
|            3 |        200 |          345 |              1 | 2019-04-27 00:00:00.000 |     321.44 |         699 |              10 |                0 |              0 |                  0 |                0 |      3214.4 |          6990 |
|            3 |        200 |          345 |              1 | 2020-06-17 00:00:00.000 |     321.44 |         699 |              10 |                0 |              0 |                  0 |                0 |      3214.4 |          6990 |
|            3 |        200 |          391 |              1 | 2019-04-28 00:00:00.000 |     321.44 |         699 |              10 |                0 |              0 |                  0 |                0 |      3214.4 |          6990 |
|            3 |        200 |          381 |              1 | 2018-10-21 00:00:00.000 |     321.44 |         699 |              10 |                0 |              0 |                  0 |                0 |      3214.4 |          6990 |
|            3 |        200 |          577 |              1 | 2018-10-05 00:00:00.000 |     321.44 |         699 |              10 |                0 |              0 |                  0 |                0 |      3214.4 |          6990 |
|            3 |        200 |          381 |              1 | 2019-04-07 00:00:00.000 |     321.44 |         699 |              10 |                0 |              0 |                  0 |                0 |      3214.4 |          6990 |
|            3 |        200 |          565 |              1 | 2019-04-16 00:00:00.000 |     321.44 |         699 |              10 |                0 |              0 |                  0 |                0 |      3214.4 |          6990 |


Table: StatusBar_Support
|   Status ID | Status Description   | Color       |
|------------:|:---------------------|:------------|
|           1 | Very Bad             | Red         |
|           2 | Bad                  | Orange      |
|           3 | Neutral              | Yellow      |
|           4 | Good                 | Light Green |
|           5 | Very Good            | Green       |

 


tables: name: dimChannel
data: dimChannel.csv
name: dimDate
data: dimDate.csv
name: dimLocation
data: dimLocation.csv
name: dimProduct
data: dimProduct.csv
name: dimPromotion
data: dimPromotion.csv
name: dimStore
data: dimStore.csv
name: fctForecast
data: fctForecast.csv
name: fctSales
data: fctSales.csv
name: StatusBar_Support
data: StatusBar_Support.csv
label: fctForecast
ChannelKey
dimChannel
ChannelKey
fctSales
channelKey
dimChannel
ChannelKey
fctForecast
ProductKey
dimProduct
ProductKey
fctSales
ProductKey
dimProduct
ProductKey
fctSales
StoreKey
dimStore
StoreKey
fctForecast
StoreKey
dimStore
StoreKey
fctSales
PromotionKey
dimPromotion
PromotionKey
dimStore
LocationKey
dimLocation
LocationKey
fctSales
DateKey
dimDate
Date
fctForecast
DateKey
dimDate
Date
output: {
    "joins": [
        {
            "from_table": "fctForecast",
            "from_column": "ChannelKey",
            "to_table": "dimChannel",
            "to_column": "ChannelKey"
        },
        {
            "from_table": "fctSales",
            "from_column": "channelKey",
            "to_table": "dimChannel",
            "to_column": "ChannelKey"
        },
        {
            "from_table": "fctForecast",
            "from_column": "ProductKey",
            "to_table": "dimProduct",
            "to_column": "ProductKey"
        },
        {
            "from_table": "fctSales",
            "from_column": "ProductKey",
            "to_table": "dimProduct",
            "to_column": "ProductKey"
        },
        {
            "from_table": "fctSales",
            "from_column": "StoreKey",
            "to_table": "dimStore",
            "to_column": "StoreKey"
        },
        {
            "from_table": "fctForecast",
            "from_column": "StoreKey",
            "to_table": "dimStore",
            "to_column": "StoreKey"
        },
        {
            "from_table": "fctSales",
            "from_column": "PromotionKey",
            "to_table": "dimPromotion",
            "to_column": "PromotionKey"
        },
        {
            "from_table": "dimStore",
            "from_column": "LocationKey",
            "to_table": "dimLocation",
            "to_column": "LocationKey"
        },
        {
            "from_table": "fctSales",
            "from_column": "DateKey",
            "to_table": "dimDate",
            "to_column": "Date"
        },
        {
            "from_table": "fctForecast",
            "from_column": "DateKey",
            "to_table": "dimDate",
            "to_column": "Date"
        }
    ]
}