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


Table: DIMDate
| Date                    |   Calendar Year | Calendar Half Year   | Calendar Quarter   | Calendar Month   | Calendar Week   | Calendar Day of Week   |   Fiscal Year | Fiscal Half Year   | Fiscal Quarter   | Fiscal Month   | Is Workday?   | Europe Season   | North America Season   | Asia Season   |
|:------------------------|----------------:|:---------------------|:-------------------|:-----------------|:----------------|:-----------------------|--------------:|:-------------------|:-----------------|:---------------|:--------------|:----------------|:-----------------------|:--------------|
| 2007-07-02 00:00:00.000 |            2007 | H2                   | Q3                 | July             | Week 27         | Monday                 |          2007 | H2                 | Q3               | Month 7        | WorkDay       | Back to School  | Back to School         | None          |
| 2007-07-03 00:00:00.000 |            2007 | H2                   | Q3                 | July             | Week 27         | Tuesday                |          2007 | H2                 | Q3               | Month 7        | WorkDay       | Back to School  | Back to School         | None          |
| 2007-07-04 00:00:00.000 |            2007 | H2                   | Q3                 | July             | Week 27         | Wednesday              |          2007 | H2                 | Q3               | Month 7        | WorkDay       | Back to School  | Back to School         | None          |
| 2007-07-05 00:00:00.000 |            2007 | H2                   | Q3                 | July             | Week 27         | Thursday               |          2007 | H2                 | Q3               | Month 7        | WorkDay       | Back to School  | Back to School         | None          |
| 2007-07-06 00:00:00.000 |            2007 | H2                   | Q3                 | July             | Week 27         | Friday                 |          2007 | H2                 | Q3               | Month 7        | WorkDay       | Back to School  | Back to School         | None          |
| 2007-07-09 00:00:00.000 |            2007 | H2                   | Q3                 | July             | Week 28         | Monday                 |          2007 | H2                 | Q3               | Month 7        | WorkDay       | Back to School  | Back to School         | None          |
| 2007-07-10 00:00:00.000 |            2007 | H2                   | Q3                 | July             | Week 28         | Tuesday                |          2007 | H2                 | Q3               | Month 7        | WorkDay       | Back to School  | Back to School         | None          |
| 2007-07-11 00:00:00.000 |            2007 | H2                   | Q3                 | July             | Week 28         | Wednesday              |          2007 | H2                 | Q3               | Month 7        | WorkDay       | Back to School  | Back to School         | None          |
| 2007-07-12 00:00:00.000 |            2007 | H2                   | Q3                 | July             | Week 28         | Thursday               |          2007 | H2                 | Q3               | Month 7        | WorkDay       | Back to School  | Back to School         | None          |
| 2007-07-13 00:00:00.000 |            2007 | H2                   | Q3                 | July             | Week 28         | Friday                 |          2007 | H2                 | Q3               | Month 7        | WorkDay       | Back to School  | Back to School         | None          |


Table: DIMGeography
|   GeographyKey | ContinentName   | CityName     | StateProvinceName   | RegionCountryName   |
|---------------:|:----------------|:-------------|:--------------------|:--------------------|
|            424 | North America   | Bellevue     | Washington          | United States       |
|            840 | North America   | Green Bay    | Wisconsin           | United States       |
|            853 | North America   | Jacksonville | Florida             | United States       |
|            783 | North America   | Alexandria   | Virginia            | United States       |
|            784 | North America   | Anchorage    | Alaska              | United States       |
|            823 | North America   | Elmira       | New York            | United States       |
|            800 | North America   | Bethesda     | Maryland            | United States       |
|            882 | North America   | Morristown   | New Jersey          | United States       |
|            804 | North America   | Brooklyn     | New York            | United States       |
|            923 | North America   | Round Rock   | Texas               | United States       |


Table: DIMProduct
|   ProductKey | ProductName                                      | ProductDescription                                                                                                   |   ProductSubcategoryKey | Manufacturer    | BrandName       | ClassName   | ColorName   | Size   | SizeRange   |   Weight | WeightUnitMeasureID   |   UnitCost |   UnitPrice |
|-------------:|:-------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------|------------------------:|:----------------|:----------------|:------------|:------------|:-------|:------------|---------:|:----------------------|-----------:|------------:|
|          116 | Adventure Works 20" CRT TV E15 Silver            | 20'' CRT television, built-in ATSC/NTSC tuner, receive digital and analog channels                                   |                       9 | Adventure Works | Adventure Works | Economy     | Silver      |        |             |     27.9 | pounds                |      86.67 |      169.99 |
|          120 | Adventure Works 13" Color TV E25 Black           | 13'' Color TV, ATSC/QAM Tuner, 120 minute sleep timer                                                                |                       9 | Adventure Works | Adventure Works | Economy     | Black       |        |             |     20.1 | pounds                |      61.17 |      119.99 |
|          124 | Adventure Works 19" Portable LCD HDTV M110 White | 19'' 720p LCD HDTV, 2 HDMI inputs, PC input for computers                                                            |                       9 | Adventure Works | Adventure Works | Regular     | White       |        |             |      9.6 | pounds                |     128.76 |      279.99 |
|          128 | Adventure Works 19" Color Digital TV E35 Brown   | 19'' color TV, ATSC/QAM Tuner                                                                                        |                       9 | Adventure Works | Adventure Works | Economy     | Brown       |        |             |      2   | pounds                |      73.11 |      143.4  |
|          132 | Adventure Works 20" Analog CRT TV E45 Brown      | 20" Analog CRT TV, digital comb filter removes blurred edges between colors                                          |                       9 | Adventure Works | Adventure Works | Economy     | Brown       |        |             |     20.9 | pounds                |     101.97 |      200    |
|          136 | Adventure Works 20" LCD HDTV M120 Brown          | 20'' 720p LCD HDTV, HDMI v 1.3 digital inputs                                                                        |                       9 | Adventure Works | Adventure Works | Regular     | Brown       |        |             |     25.2 | pounds                |     160.93 |      349.95 |
|          140 | Adventure Works 32" LCD HDTV M130 Brown          | 32'' 720p LCD HDTV, Back-Light Control, Built-In ATSC/NTSC/QAM Digital Tuning                                        |                       9 | Adventure Works | Adventure Works | Regular     | Brown       |        |             |     49.2 | pounds                |     229.93 |      499.99 |
|          144 | Adventure Works 15.6" LCD TV M130W Brown         | 15.6'' Widescreen LCD TV, built-in DVD Player                                                                        |                       9 | Adventure Works | Adventure Works | Regular     | Brown       |        |             |     24   | pounds                |     152.94 |      299.99 |
|          148 | Adventure Works 52" LCD HDTV X590 Brown          | 52'' 1080p 240Hz LCD HDTV, Four HDMI, two component, one PC, and two composite video inputs                          |                       9 | Adventure Works | Adventure Works | Deluxe      | Brown       |        |             |     32.4 | pounds                |     960.82 |     2899.99 |
|          152 | Adventure Works 40" LCD HDTV M690 Brown          | 40'' 1080p LCD HDTV, 70,000:1 dynamic contrast ratio, 6ms response time, Wide Color Enhancer 2 for more vivid colors |                       9 | Adventure Works | Adventure Works | Regular     | Brown       |        |             |     31   | pounds                |     392.6  |     1184.97 |


Table: FACTSales
|   SalesKey |   DateKey |   channelKey |   StoreKey |   ProductKey |   PromotionKey |   UnitCost |   UnitPrice |   SalesQuantity |   ReturnQuantity |   ReturnAmount |   DiscountQuantity |   DiscountAmount |   TotalCost |   SalesAmount |   GeographyKey | Date                    |
|-----------:|----------:|-------------:|-----------:|-------------:|---------------:|-----------:|------------:|----------------:|-----------------:|---------------:|-------------------:|-----------------:|------------:|--------------:|---------------:|:------------------------|
|     190723 |     39173 |            1 |        121 |         2198 |              1 |     210.72 |      635.99 |              10 |                0 |              0 |                  0 |                0 |      2107.2 |        6359.9 |            804 | 2007-04-01 00:00:00.000 |
|     671563 |     39173 |            1 |        181 |         2198 |              1 |     210.72 |      635.99 |              10 |                0 |              0 |                  0 |                0 |      2107.2 |        6359.9 |            946 | 2007-04-01 00:00:00.000 |
|     766899 |     39173 |            1 |        150 |         2198 |              1 |     210.72 |      635.99 |              10 |                0 |              0 |                  0 |                0 |      2107.2 |        6359.9 |            789 | 2007-04-01 00:00:00.000 |
|    1424084 |     39174 |            1 |         18 |         2198 |              1 |     210.72 |      635.99 |              10 |                0 |              0 |                  0 |                0 |      2107.2 |        6359.9 |            944 | 2007-04-02 00:00:00.000 |
|    2015191 |     39174 |            1 |          9 |         2198 |              1 |     210.72 |      635.99 |              10 |                0 |              0 |                  0 |                0 |      2107.2 |        6359.9 |            941 | 2007-04-02 00:00:00.000 |
|     890650 |     39175 |            1 |        190 |         2198 |              1 |     210.72 |      635.99 |              10 |                0 |              0 |                  0 |                0 |      2107.2 |        6359.9 |            810 | 2007-04-03 00:00:00.000 |
|    2018629 |     39175 |            1 |         25 |         2198 |              1 |     210.72 |      635.99 |              10 |                0 |              0 |                  0 |                0 |      2107.2 |        6359.9 |            839 | 2007-04-03 00:00:00.000 |
|    2998425 |     39176 |            1 |        180 |         2198 |              1 |     210.72 |      635.99 |              10 |                0 |              0 |                  0 |                0 |      2107.2 |        6359.9 |            892 | 2007-04-04 00:00:00.000 |
|     961845 |     39177 |            1 |         17 |         2198 |              1 |     210.72 |      635.99 |              10 |                0 |              0 |                  0 |                0 |      2107.2 |        6359.9 |            551 | 2007-04-05 00:00:00.000 |
|    1084209 |     39177 |            1 |        102 |         2198 |              1 |     210.72 |      635.99 |              10 |                0 |              0 |                  0 |                0 |      2107.2 |        6359.9 |            875 | 2007-04-05 00:00:00.000 |

 


tables: name: DIMChannel
data: DIMChannel.csv
name: DIMDate
data: DIMDate.csv
name: DIMGeography
data: DIMGeography.csv
name: DIMProduct
data: DIMProduct.csv
name: FACTSales
data: FACTSales.csv
label: FACTSales
channelKey
DIMChannel
ChannelKey
FACTSales
ProductKey
DIMProduct
ProductKey
FACTSales
GeographyKey
DIMGeography
GeographyKey
FACTSales
Date
DIMDate
Date
output: {
    "joins": [
        {
            "from_table": "FACTSales",
            "from_column": "channelKey",
            "to_table": "DIMChannel",
            "to_column": "ChannelKey"
        },
        {
            "from_table": "FACTSales",
            "from_column": "ProductKey",
            "to_table": "DIMProduct",
            "to_column": "ProductKey"
        },
        {
            "from_table": "FACTSales",
            "from_column": "GeographyKey",
            "to_table": "DIMGeography",
            "to_column": "GeographyKey"
        },
        {
            "from_table": "FACTSales",
            "from_column": "Date",
            "to_table": "DIMDate",
            "to_column": "Date"
        }
    ]
}