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: DimCustomer
|   CustomerKey |   GeographyKey |   CustomerLabel | Title   | FirstName   | MiddleName   | LastName   | NameStyle   | BirthDate               | MaritalStatus   | Suffix   | Gender   | EmailAddress                  |   YearlyIncome |   TotalChildren |   NumberChildrenAtHome | Education       | Occupation     |   HouseOwnerFlag |   NumberCarsOwned | AddressLine1         | AddressLine2   | Phone               | DateFirstPurchase       | CustomerType   | CompanyName   |   ETLLoadID | LoadDate                | UpdateDate              |
|--------------:|---------------:|----------------:|:--------|:------------|:-------------|:-----------|:------------|:------------------------|:----------------|:---------|:---------|:------------------------------|---------------:|----------------:|-----------------------:|:----------------|:---------------|-----------------:|------------------:|:---------------------|:---------------|:--------------------|:------------------------|:---------------|:--------------|------------:|:------------------------|:------------------------|
|             4 |            519 |           11003 |         | Christy     |              | Zhu        | False       | 1968-02-15 00:00:00.000 | S               |          | F        | christy12@adventure-works.com |          70000 |               0 |                      0 | Bachelors       | Professional   |                0 |                 1 | 1825 Village Pl.     |                | 1 (11) 500 555-0162 | 2001-07-01 00:00:00.000 | Person         |               |           1 | 2009-10-01 00:00:00.000 | 2009-10-01 00:00:00.000 |
|             6 |            478 |           11005 |         | Julio       |              | Ruiz       | False       | 1965-08-05 00:00:00.000 | S               |          | M        | julio1@adventure-works.com    |          70000 |               0 |                      0 | Bachelors       | Professional   |                1 |                 1 | 7305 Humphrey Drive  |                | 1 (11) 500 555-0151 | 2001-07-02 00:00:00.000 | Person         |               |           1 | 2009-10-01 00:00:00.000 | 2009-10-01 00:00:00.000 |
|            15 |            677 |           11014 |         | Sydney      |              | Bennett    | False       | 1968-05-09 00:00:00.000 | S               |          | F        | sydney23@adventure-works.com  |         100000 |               3 |                      0 | Bachelors       | Management     |                0 |                 3 | 9011 Tank Drive      |                | 431-555-0156        | 2003-09-24 00:00:00.000 | Person         |               |           1 | 2009-10-01 00:00:00.000 | 2009-10-01 00:00:00.000 |
|            16 |            443 |           11015 |         | Chloe       |              | Young      | False       | 1979-02-27 00:00:00.000 | S               |          | F        | chloe23@adventure-works.com   |          30000 |               0 |                      0 | Partial College | Skilled Manual |                0 |                 1 | 244 Willow Pass Road |                | 208-555-0142        | 2003-07-22 00:00:00.000 | Person         |               |           1 | 2009-10-01 00:00:00.000 | 2009-10-01 00:00:00.000 |
|            18 |            699 |           11017 |         | Shannon     |              | Wang       | False       | 1944-06-26 00:00:00.000 | S               |          | F        | shannon1@adventure-works.com  |          20000 |               4 |                      0 | High School     | Skilled Manual |                1 |                 2 | 7330 Saddlehill Lane |                | 1 (11) 500 555-0195 | 2001-07-15 00:00:00.000 | Person         |               |           1 | 2009-10-01 00:00:00.000 | 2009-10-01 00:00:00.000 |
|            22 |            580 |           11021 |         | Destiny     |              | Wilson     | False       | 1978-09-03 00:00:00.000 | S               |          | F        | destiny7@adventure-works.com  |          40000 |               0 |                      0 | Partial College | Skilled Manual |                0 |                 1 | 8148 W. Lake Dr.     |                | 622-555-0158        | 2003-07-27 00:00:00.000 | Person         |               |           1 | 2009-10-01 00:00:00.000 | 2009-10-01 00:00:00.000 |
|            25 |            470 |           11024 |         | Russell     |              | Xie        | False       | 1978-09-17 00:00:00.000 | M               |          | M        | russell7@adventure-works.com  |          60000 |               0 |                      0 | Partial College | Skilled Manual |                1 |                 2 | 8734 Oxford Place    |                | 746-555-0186        | 2003-12-29 00:00:00.000 | Person         |               |           1 | 2009-10-01 00:00:00.000 | 2009-10-01 00:00:00.000 |
|            27 |            634 |           11026 |         | Harold      |              | Sai        | False       | 1946-04-03 00:00:00.000 | S               |          | M        | harold3@adventure-works.com   |          30000 |               2 |                      0 | Partial College | Clerical       |                0 |                 2 | 8211 Leeds Ct.       |                | 1 (11) 500 555-0131 | 2001-07-26 00:00:00.000 | Person         |               |           1 | 2009-10-01 00:00:00.000 | 2009-10-01 00:00:00.000 |
|            29 |            554 |           11028 |         | Jill        |              | Jimenez    | False       | 1946-04-11 00:00:00.000 | M               |          | F        | jill13@adventure-works.com    |          30000 |               2 |                      0 | Partial College | Clerical       |                1 |                 2 | 9111 Rose Ann Ave    |                | 1 (11) 500 555-0116 | 2001-07-29 00:00:00.000 | Person         |               |           1 | 2009-10-01 00:00:00.000 | 2009-10-01 00:00:00.000 |
|            33 |            656 |           11032 |         | Denise      |              | Stone      | False       | 1947-06-11 00:00:00.000 | M               |          | F        | denise10@adventure-works.com  |          20000 |               4 |                      0 | High School     | Skilled Manual |                1 |                 2 | 626 Bentley Street   |                | 1 (11) 500 555-0169 | 2001-08-21 00:00:00.000 | Person         |               |           1 | 2009-10-01 00:00:00.000 | 2009-10-01 00:00:00.000 |


Table: DimDate
| Datekey                 | FullDateLabel   | DateDescription   |   CalendarYear | CalendarYearLabel   |   CalendarHalfYear | CalendarHalfYearLabel   |   CalendarQuarter | CalendarQuarterLabel   |   CalendarMonth | CalendarMonthLabel   |   CalendarWeek | CalendarWeekLabel   |   CalendarDayOfWeek | CalendarDayOfWeekLabel   |   FiscalYear | FiscalYearLabel   |   FiscalHalfYear | FiscalHalfYearLabel   |   FiscalQuarter | FiscalQuarterLabel   |   FiscalMonth | FiscalMonthLabel   | IsWorkDay   |   IsHoliday | HolidayName   | EuropeSeason   | NorthAmericaSeason   | AsiaSeason   |
|:------------------------|:----------------|:------------------|---------------:|:--------------------|-------------------:|:------------------------|------------------:|:-----------------------|----------------:|:---------------------|---------------:|:--------------------|--------------------:|:-------------------------|-------------:|:------------------|-----------------:|:----------------------|----------------:|:---------------------|--------------:|:-------------------|:------------|------------:|:--------------|:---------------|:---------------------|:-------------|
| 2005-07-01 00:00:00.000 | 2005-07-01      | 2005/07/01        |           2005 | Year 2005           |              20052 | H2                      |             20053 | Q3                     |          200507 | July                 |         200527 | Week 27             |             2005276 | Friday                   |         2005 | FiscalYear 2005   |            20052 | H2                    |           20053 | Q3                   |        200507 | Month 7            | WorkDay     |           0 | None          | Back to School | Back to School       | None         |
| 2005-07-04 00:00:00.000 | 2005-07-04      | 2005/07/04        |           2005 | Year 2005           |              20052 | H2                      |             20053 | Q3                     |          200507 | July                 |         200528 | Week 28             |             2005282 | Monday                   |         2005 | FiscalYear 2005   |            20052 | H2                    |           20053 | Q3                   |        200507 | Month 7            | WorkDay     |           0 | None          | Back to School | Back to School       | None         |
| 2005-07-05 00:00:00.000 | 2005-07-05      | 2005/07/05        |           2005 | Year 2005           |              20052 | H2                      |             20053 | Q3                     |          200507 | July                 |         200528 | Week 28             |             2005283 | Tuesday                  |         2005 | FiscalYear 2005   |            20052 | H2                    |           20053 | Q3                   |        200507 | Month 7            | WorkDay     |           0 | None          | Back to School | Back to School       | None         |
| 2005-07-06 00:00:00.000 | 2005-07-06      | 2005/07/06        |           2005 | Year 2005           |              20052 | H2                      |             20053 | Q3                     |          200507 | July                 |         200528 | Week 28             |             2005284 | Wednesday                |         2005 | FiscalYear 2005   |            20052 | H2                    |           20053 | Q3                   |        200507 | Month 7            | WorkDay     |           0 | None          | Back to School | Back to School       | None         |
| 2005-07-07 00:00:00.000 | 2005-07-07      | 2005/07/07        |           2005 | Year 2005           |              20052 | H2                      |             20053 | Q3                     |          200507 | July                 |         200528 | Week 28             |             2005285 | Thursday                 |         2005 | FiscalYear 2005   |            20052 | H2                    |           20053 | Q3                   |        200507 | Month 7            | WorkDay     |           0 | None          | Back to School | Back to School       | None         |
| 2005-07-08 00:00:00.000 | 2005-07-08      | 2005/07/08        |           2005 | Year 2005           |              20052 | H2                      |             20053 | Q3                     |          200507 | July                 |         200528 | Week 28             |             2005286 | Friday                   |         2005 | FiscalYear 2005   |            20052 | H2                    |           20053 | Q3                   |        200507 | Month 7            | WorkDay     |           0 | None          | Back to School | Back to School       | None         |
| 2005-07-11 00:00:00.000 | 2005-07-11      | 2005/07/11        |           2005 | Year 2005           |              20052 | H2                      |             20053 | Q3                     |          200507 | July                 |         200529 | Week 29             |             2005292 | Monday                   |         2005 | FiscalYear 2005   |            20052 | H2                    |           20053 | Q3                   |        200507 | Month 7            | WorkDay     |           0 | None          | Back to School | Back to School       | None         |
| 2005-07-12 00:00:00.000 | 2005-07-12      | 2005/07/12        |           2005 | Year 2005           |              20052 | H2                      |             20053 | Q3                     |          200507 | July                 |         200529 | Week 29             |             2005293 | Tuesday                  |         2005 | FiscalYear 2005   |            20052 | H2                    |           20053 | Q3                   |        200507 | Month 7            | WorkDay     |           0 | None          | Back to School | Back to School       | None         |
| 2005-07-13 00:00:00.000 | 2005-07-13      | 2005/07/13        |           2005 | Year 2005           |              20052 | H2                      |             20053 | Q3                     |          200507 | July                 |         200529 | Week 29             |             2005294 | Wednesday                |         2005 | FiscalYear 2005   |            20052 | H2                    |           20053 | Q3                   |        200507 | Month 7            | WorkDay     |           0 | None          | Back to School | Back to School       | None         |
| 2005-07-14 00:00:00.000 | 2005-07-14      | 2005/07/14        |           2005 | Year 2005           |              20052 | H2                      |             20053 | Q3                     |          200507 | July                 |         200529 | Week 29             |             2005295 | Thursday                 |         2005 | FiscalYear 2005   |            20052 | H2                    |           20053 | Q3                   |        200507 | Month 7            | WorkDay     |           0 | None          | Back to School | Back to School       | None         |


Table: DimProduct
|   ProductKey |   ProductLabel | ProductName                                 | ProductDescription                                                            |   ProductSubcategoryKey | Manufacturer         | BrandName            |   ClassID | ClassName   |   StyleID | StyleName      |   ColorID | ColorName   | Size   | SizeRange   | SizeUnitMeasureID   | Weight   | WeightUnitMeasureID   |   UnitOfMeasureID | UnitOfMeasureName   |   StockTypeID | StockTypeName   |   UnitCost |   UnitPrice | AvailableForSaleDate    | StopSaleDate   | Status   | ImageURL   | ProductURL   |   ETLLoadID | LoadDate                | UpdateDate              |
|-------------:|---------------:|:--------------------------------------------|:------------------------------------------------------------------------------|------------------------:|:---------------------|:---------------------|----------:|:------------|----------:|:---------------|----------:|:------------|:-------|:------------|:--------------------|:---------|:----------------------|------------------:|:--------------------|--------------:|:----------------|-----------:|------------:|:------------------------|:---------------|:---------|:-----------|:-------------|------------:|:------------------------|:------------------------|
|          416 |         303001 | Adventure Works Desktop PC2.33 XD233 Silver | 2.33GHz dual processor, 4MB L2 cache, 750GB 7200RPM hard drive                |                      17 | Adventure Works      | Adventure Works      |         3 | Deluxe      |         1 | Product0303001 |         7 | Silver      |        |             |                     |          | pounds                |                 1 | inches              |             1 | High            |     321.05 |      969    | 2008-12-09 00:00:00.000 |                | On       |            |              |           1 | 2009-03-31 00:00:00.000 | 2009-03-31 00:00:00.000 |
|          417 |         303002 | Adventure Works Desktop PC2.30 MD230 Silver | 2.3GHz dual processor, 4 GB DDR2 SDRAM memories, 19" widescreen LCD monitors  |                      17 | Adventure Works      | Adventure Works      |         2 | Regular     |         1 | Product0303002 |         7 | Silver      |        |             |                     |          | pounds                |                 1 | inches              |             1 | High            |     275.46 |      599    | 2008-01-08 00:00:00.000 |                | On       |            |              |           1 | 2009-03-31 00:00:00.000 | 2009-03-31 00:00:00.000 |
|          418 |         303003 | Adventure Works Desktop PC1.60 ED160 Silver | 1.60GHz dual processor, 1GB DDR2 memory, 30GB 5400RPM hard drive              |                      17 | Adventure Works      | Adventure Works      |         1 | Economy     |         1 | Product0303003 |         7 | Silver      |        |             |                     |          | pounds                |                 1 | inches              |             1 | High            |     137.63 |      269.95 | 2005-05-06 00:00:00.000 |                | On       |            |              |           1 | 2009-03-31 00:00:00.000 | 2009-03-31 00:00:00.000 |
|          423 |         303008 | Adventure Works Desktop PC2.30 MD230 Black  | 2.3GHz dual processor, 4 GB DDR2 SDRAM memories, 19" widescreen LCD monitors  |                      17 | Adventure Works      | Adventure Works      |         2 | Regular     |         1 | Product0303008 |         2 | Black       |        |             |                     |          | pounds                |                 1 | inches              |             1 | High            |     275.46 |      599    | 2008-01-08 00:00:00.000 |                | On       |            |              |           1 | 2009-03-31 00:00:00.000 | 2009-03-31 00:00:00.000 |
|          429 |         303014 | Adventure Works Desktop PC2.30 MD230 Brown  | 2.3GHz dual processor, 4 GB DDR2 SDRAM memories, 19" widescreen LCD monitors  |                      17 | Adventure Works      | Adventure Works      |         2 | Regular     |         1 | Product0303014 |         4 | Brown       |        |             |                     |          | pounds                |                 1 | inches              |             1 | High            |     275.87 |      599.9  | 2008-01-08 00:00:00.000 |                | On       |            |              |           1 | 2009-03-31 00:00:00.000 | 2009-03-31 00:00:00.000 |
|          431 |         303016 | Adventure Works Desktop PC1.80 ED180 Brown  | 1.80GHz dual processor, 1GB DDR2 memory, 320GB 5400RPM hard drive             |                      17 | Adventure Works      | Adventure Works      |         2 | Regular     |         1 | Product0303016 |         4 | Brown       |        |             |                     |          | pounds                |                 1 | inches              |             1 | High            |     188.13 |      369    | 2005-01-02 00:00:00.000 |                | On       |            |              |           1 | 2009-03-31 00:00:00.000 | 2009-03-31 00:00:00.000 |
|          434 |         303019 | Adventure Works Desktop PC2.30 MD230 White  | 2.3GHz dual processor, 4 GB DDR2 SDRAM memories, 19" widescreen LCD monitors  |                      17 | Adventure Works      | Adventure Works      |         2 | Regular     |         1 | Product0303019 |         8 | White       |        |             |                     |          | pounds                |                 1 | inches              |             1 | High            |     275.46 |      599    | 2008-01-08 00:00:00.000 |                | On       |            |              |           1 | 2009-03-31 00:00:00.000 | 2009-03-31 00:00:00.000 |
|          436 |         303021 | Adventure Works Desktop PC1.80 ED180 White  | 1.80GHz dual processor, 1GB DDR2 memory, 320GB 5400RPM hard drive             |                      17 | Adventure Works      | Adventure Works      |         2 | Regular     |         1 | Product0303021 |         8 | White       |        |             |                     |          | pounds                |                 1 | inches              |             1 | High            |     188.13 |      369    | 2005-01-02 00:00:00.000 |                | On       |            |              |           1 | 2009-03-31 00:00:00.000 | 2009-03-31 00:00:00.000 |
|          438 |         303023 | WWI Desktop PC2.33 X2330 Silver             | 2.33GHz dual processor, 750GB 7200RPM hard drive, 19” widescreen LCD monitors |                      17 | Wide World Importers | Wide World Importers |         3 | Deluxe      |         1 | Product0303023 |         7 | Silver      |        |             |                     |          | pounds                |                 1 | inches              |             1 | High            |     304.48 |      919    | 2009-03-08 00:00:00.000 |                | On       |            |              |           1 | 2009-03-31 00:00:00.000 | 2009-03-31 00:00:00.000 |
|          441 |         303026 | WWI Desktop PC1.80 E1800 Brown              | 1.80GHz dual processor, 2GB DDR2 memories, 320GB 5400RPM hard drive           |                      17 | Wide World Importers | Wide World Importers |         1 | Economy     |         1 | Product0303026 |         4 | Brown       |        |             |                     |          | pounds                |                 1 | inches              |             1 | High            |     117.21 |      229.9  | 2005-01-02 00:00:00.000 |                | On       |            |              |           1 | 2009-03-31 00:00:00.000 | 2009-03-31 00:00:00.000 |


Table: FactSales
|   SalesKey | DateKey                 |   channelKey |   StoreKey |   ProductKey |   PromotionKey |   CurrencyKey |   UnitCost |   UnitPrice |   SalesQuantity |   ReturnQuantity |   ReturnAmount |   DiscountQuantity |   DiscountAmount |   TotalCost |   SalesAmount |   ETLLoadID | LoadDate                | UpdateDate              |
|-----------:|:------------------------|-------------:|-----------:|-------------:|---------------:|--------------:|-----------:|------------:|----------------:|-----------------:|---------------:|-------------------:|-----------------:|------------:|--------------:|------------:|:------------------------|:------------------------|
|        159 | 2009-06-07 00:00:00.000 |            1 |        207 |         1657 |              1 |             1 |      82.77 |      179.99 |              10 |                0 |              0 |                  0 |                0 |       827.7 |        1799.9 |           1 | 2010-01-01 00:00:00.000 | 2010-01-01 00:00:00.000 |
|        166 | 2009-05-17 00:00:00.000 |            1 |          5 |         2009 |              1 |             1 |      82.77 |      179.99 |              10 |                0 |              0 |                  0 |                0 |       827.7 |        1799.9 |           1 | 2010-01-01 00:00:00.000 | 2010-01-01 00:00:00.000 |
|        542 | 2007-05-12 00:00:00.000 |            1 |        164 |         2081 |              1 |             1 |      82.77 |      179.99 |              10 |                0 |              0 |                  0 |                0 |       827.7 |        1799.9 |           1 | 2010-01-01 00:00:00.000 | 2010-01-01 00:00:00.000 |
|        607 | 2009-10-18 00:00:00.000 |            1 |        274 |         2039 |              1 |             1 |      82.77 |      179.99 |              10 |                0 |              0 |                  0 |                0 |       827.7 |        1799.9 |           1 | 2010-01-01 00:00:00.000 | 2010-01-01 00:00:00.000 |
|        790 | 2008-04-27 00:00:00.000 |            1 |        161 |         1997 |              1 |             1 |      82.77 |      179.99 |              10 |                0 |              0 |                  0 |                0 |       827.7 |        1799.9 |           1 | 2010-01-01 00:00:00.000 | 2010-01-01 00:00:00.000 |
|       1079 | 2007-05-02 00:00:00.000 |            1 |        143 |         2027 |              1 |             1 |      82.77 |      179.99 |              10 |                0 |              0 |                  0 |                0 |       827.7 |        1799.9 |           1 | 2010-01-01 00:00:00.000 | 2010-01-01 00:00:00.000 |
|       1148 | 2007-10-10 00:00:00.000 |            1 |          3 |         2015 |              1 |             1 |      82.77 |      179.99 |              10 |                0 |              0 |                  0 |                0 |       827.7 |        1799.9 |           1 | 2010-01-01 00:00:00.000 | 2010-01-01 00:00:00.000 |
|       1185 | 2009-06-08 00:00:00.000 |            1 |        208 |         1602 |              1 |             1 |      82.77 |      179.99 |              10 |                0 |              0 |                  0 |                0 |       827.7 |        1799.9 |           1 | 2010-01-01 00:00:00.000 | 2010-01-01 00:00:00.000 |
|       1918 | 2007-05-10 00:00:00.000 |            1 |        188 |         1612 |              1 |             1 |      82.77 |      179.99 |              10 |                0 |              0 |                  0 |                0 |       827.7 |        1799.9 |           1 | 2010-01-01 00:00:00.000 | 2010-01-01 00:00:00.000 |
|       2053 | 2009-10-07 00:00:00.000 |            1 |         74 |         2081 |              1 |             1 |      82.77 |      179.99 |              10 |                0 |              0 |                  0 |                0 |       827.7 |        1799.9 |           1 | 2010-01-01 00:00:00.000 | 2010-01-01 00:00:00.000 |

 


tables: name: DimCustomer
data: DimCustomer.csv
name: DimDate
data: DimDate.csv
name: DimProduct
data: DimProduct.csv
name: FactSales
data: FactSales.csv
label: FactSales
DateKey
DimDate
Datekey
FactSales
ProductKey
DimProduct
ProductKey
FactSales
StoreKey
DimCustomer
CustomerKey
output: {
    "joins": [
        {
            "from_table": "FactSales",
            "from_column": "DateKey",
            "to_table": "DimDate",
            "to_column": "Datekey"
        },
        {
            "from_table": "FactSales",
            "from_column": "ProductKey",
            "to_table": "DimProduct",
            "to_column": "ProductKey"
        },
        {
            "from_table": "FactSales",
            "from_column": "StoreKey",
            "to_table": "DimCustomer",
            "to_column": "CustomerKey"
        }
    ]
}