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 | CustomerAlternateKey   | FirstName   | LastName   | BirthDate               | MaritalStatus   | Gender   |   TotalChildren | DateFirstPurchase       | Name             |   YearlyIncome | EmailAddress                  |
|--------------:|---------------:|:-----------------------|:------------|:-----------|:------------------------|:----------------|:---------|----------------:|:------------------------|:-----------------|---------------:|:------------------------------|
|         11021 |            536 | AW00011021             | Destiny     | Wilson     | 1984-03-02 00:00:00.000 | S               | F        |               0 | 2013-01-23 00:00:00.000 | Destiny, Wilson  |          40000 | destiny7@adventure-works.com  |
|         11037 |             49 | AW00011037             | Chloe       | Garcia     | 1983-05-27 00:00:00.000 | S               | F        |               0 | 2013-01-20 00:00:00.000 | Chloe, Garcia    |          40000 | chloe27@adventure-works.com   |
|         11049 |            307 | AW00011049             | Carol       | Rai        | 1986-01-15 00:00:00.000 | S               | F        |               0 | 2013-03-09 00:00:00.000 | Carol, Rai       |          40000 | carol8@adventure-works.com    |
|         11063 |            634 | AW00011063             | Angela      | Murphy     | 1980-10-04 00:00:00.000 | S               | F        |               0 | 2013-01-12 00:00:00.000 | Angela, Murphy   |          40000 | angela41@adventure-works.com  |
|         11078 |             49 | AW00011078             | Gina        | Martin     | 1985-01-06 00:00:00.000 | S               | F        |               0 | 2013-02-15 00:00:00.000 | Gina, Martin     |          40000 | gina1@adventure-works.com     |
|         11129 |            638 | AW00011129             | Julia       | Wright     | 1981-02-01 00:00:00.000 | S               | F        |               0 | 2011-08-06 00:00:00.000 | Julia, Wright    |          40000 | julia17@adventure-works.com   |
|         11136 |             53 | AW00011136             | Brianna     | Morgan     | 1984-04-24 00:00:00.000 | S               | F        |               0 | 2013-01-03 00:00:00.000 | Brianna, Morgan  |          40000 | brianna30@adventure-works.com |
|         11145 |            536 | AW00011145             | Jasmine     | Coleman    | 1985-06-06 00:00:00.000 | S               | F        |               0 | 2013-01-25 00:00:00.000 | Jasmine, Coleman |          40000 | jasmine46@adventure-works.com |
|         11154 |            553 | AW00011154             | Megan       | Walker     | 1982-02-18 00:00:00.000 | S               | F        |               0 | 2013-01-10 00:00:00.000 | Megan, Walker    |          40000 | megan25@adventure-works.com   |
|         11156 |            334 | AW00011156             | Maria       | Roberts    | 1981-08-06 00:00:00.000 | S               | F        |               0 | 2013-01-08 00:00:00.000 | Maria, Roberts   |          40000 | maria47@adventure-works.com   |


Table: DimDate
| Date                    | EnglishMonth   |   MonthNumber |   Quarter |   Year |   CalendarSemester |
|:------------------------|:---------------|--------------:|----------:|-------:|-------------------:|
| 2017-07-01 00:00:00.000 | July           |             7 |         3 |   2017 |                  1 |
| 2017-07-02 00:00:00.000 | July           |             7 |         3 |   2017 |                  1 |
| 2017-07-03 00:00:00.000 | July           |             7 |         3 |   2017 |                  1 |
| 2017-07-04 00:00:00.000 | July           |             7 |         3 |   2017 |                  1 |
| 2017-07-05 00:00:00.000 | July           |             7 |         3 |   2017 |                  1 |
| 2017-07-06 00:00:00.000 | July           |             7 |         3 |   2017 |                  1 |
| 2017-07-07 00:00:00.000 | July           |             7 |         3 |   2017 |                  1 |
| 2017-07-08 00:00:00.000 | July           |             7 |         3 |   2017 |                  1 |
| 2017-07-09 00:00:00.000 | July           |             7 |         3 |   2017 |                  1 |
| 2017-07-10 00:00:00.000 | July           |             7 |         3 |   2017 |                  1 |


Table: DimGeography
|   GeographyKey | City          | StateProvinceName   | Country       |   PostalCode |
|---------------:|:--------------|:--------------------|:--------------|-------------:|
|            292 | Alhambra      | California          | United States |        91801 |
|            293 | Alpine        | California          | United States |        91901 |
|            294 | Auburn        | California          | United States |        95603 |
|            295 | Baldwin Park  | California          | United States |        91706 |
|            296 | Barstow       | California          | United States |        92311 |
|            297 | Bell Gardens  | California          | United States |        90201 |
|            298 | Bellflower    | California          | United States |        90706 |
|            299 | Berkeley      | California          | United States |        94704 |
|            300 | Beverly Hills | California          | United States |        90210 |
|            301 | Burbank       | California          | United States |        91502 |


Table: DimProduct
|   ProductKey | ProductAlternateKey   | ProductSubcategoryKey   | ProductName           | Color   | ListPrice   | Size   | Class   | Style   | ModelName   | Status   |
|-------------:|:----------------------|:------------------------|:----------------------|:--------|:------------|:-------|:--------|:--------|:------------|:---------|
|            1 | AR-5381               |                         | Adjustable Race       | NA      |             |        |         |         |             | Current  |
|            2 | BA-8327               |                         | Bearing Ball          | NA      |             |        |         |         |             | Current  |
|            3 | BE-2349               |                         | BB Ball Bearing       | NA      |             |        |         |         |             | Current  |
|            4 | BE-2908               |                         | Headset Ball Bearings | NA      |             |        |         |         |             | Current  |
|            5 | BL-2036               |                         | Blade                 | NA      |             |        |         |         |             | Current  |
|           12 | CR-9981               |                         | Crown Race            | NA      |             |        |         |         |             | Current  |
|           13 | CS-2812               |                         | Chain Stays           | NA      |             |        |         |         |             | Current  |
|           14 | DC-8732               |                         | Decal 1               | NA      |             |        |         |         |             | Current  |
|           15 | DC-9824               |                         | Decal 2               | NA      |             |        |         |         |             | Current  |
|           16 | DT-2377               |                         | Down Tube             | NA      |             |        |         |         |             | Current  |


Table: DimProductCategory
|   ProductCategoryKey | CategoryName   |
|---------------------:|:---------------|
|                    1 | Bikes          |
|                    2 | Components     |
|                    3 | Clothing       |
|                    4 | Accessories    |


Table: DimProductSubcategory
|   ProductSubcategoryKey | SubcategoryName   |   ProductCategoryKey |
|------------------------:|:------------------|---------------------:|
|                       1 | Mountain Bikes    |                    1 |
|                       2 | Road Bikes        |                    1 |
|                       3 | Touring Bikes     |                    1 |
|                       4 | Handlebars        |                    2 |
|                       5 | Bottom Brackets   |                    2 |
|                       6 | Brakes            |                    2 |
|                       7 | Chains            |                    2 |
|                       8 | Cranksets         |                    2 |
|                       9 | Derailleurs       |                    2 |
|                      10 | Forks             |                    2 |


Table: FactInternetSales
|   ProductKey | OrderDate               |   CustomerKey |   PromotionKey |   CurrencyKey |   SalesTerritoryKey | SalesOrderNumber   |   SalesOrderLineNumber |   RevisionNumber |   OrderQuantity |   UnitPrice |   SalesAmount |   TotalProductCost |
|-------------:|:------------------------|--------------:|---------------:|--------------:|--------------------:|:-------------------|-----------------------:|-----------------:|----------------:|------------:|--------------:|-------------------:|
|          528 | 2018-12-31 00:00:00.000 |         14870 |              1 |           100 |                   4 | SO51900            |                      1 |                1 |               1 |        4.99 |          4.99 |             1.8663 |
|          528 | 2019-01-01 00:00:00.000 |         15319 |              1 |           100 |                   4 | SO51948            |                      1 |                1 |               1 |        4.99 |          4.99 |             1.8663 |
|          528 | 2019-01-03 00:00:00.000 |         16384 |              1 |           100 |                   4 | SO52043            |                      1 |                1 |               1 |        4.99 |          4.99 |             1.8663 |
|          528 | 2019-01-03 00:00:00.000 |         15476 |              1 |           100 |                   4 | SO52045            |                      1 |                1 |               1 |        4.99 |          4.99 |             1.8663 |
|          528 | 2019-01-04 00:00:00.000 |         15861 |              1 |           100 |                   4 | SO52094            |                      1 |                1 |               1 |        4.99 |          4.99 |             1.8663 |
|          528 | 2019-01-06 00:00:00.000 |         26017 |              1 |           100 |                   4 | SO52175            |                      1 |                1 |               1 |        4.99 |          4.99 |             1.8663 |
|          528 | 2019-01-06 00:00:00.000 |         14761 |              1 |           100 |                   4 | SO52190            |                      1 |                1 |               1 |        4.99 |          4.99 |             1.8663 |
|          528 | 2019-01-07 00:00:00.000 |         22038 |              1 |           100 |                   4 | SO52232            |                      1 |                1 |               1 |        4.99 |          4.99 |             1.8663 |
|          528 | 2019-01-07 00:00:00.000 |         22163 |              1 |           100 |                   4 | SO52234            |                      1 |                1 |               1 |        4.99 |          4.99 |             1.8663 |
|          528 | 2019-01-07 00:00:00.000 |         16018 |              1 |           100 |                   4 | SO52245            |                      1 |                1 |               1 |        4.99 |          4.99 |             1.8663 |

 


tables: name: DimCustomer
data: DimCustomer.csv
name: DimDate
data: DimDate.csv
name: DimGeography
data: DimGeography.csv
name: DimProduct
data: DimProduct.csv
name: DimProductCategory
data: DimProductCategory.csv
name: DimProductSubcategory
data: DimProductSubcategory.csv
name: FactInternetSales
data: FactInternetSales.csv
label: DimCustomer
GeographyKey
DimGeography
GeographyKey
DimProductSubcategory
ProductCategoryKey
DimProductCategory
ProductCategoryKey
DimProduct
ProductSubcategoryKey
DimProductSubcategory
ProductSubcategoryKey
FactInternetSales
CustomerKey
DimCustomer
CustomerKey
FactInternetSales
ProductKey
DimProduct
ProductKey
FactInternetSales
OrderDate
DimDate
Date
output: {
    "joins": [
        {
            "from_table": "DimCustomer",
            "from_column": "GeographyKey",
            "to_table": "DimGeography",
            "to_column": "GeographyKey"
        },
        {
            "from_table": "DimProductSubcategory",
            "from_column": "ProductCategoryKey",
            "to_table": "DimProductCategory",
            "to_column": "ProductCategoryKey"
        },
        {
            "from_table": "DimProduct",
            "from_column": "ProductSubcategoryKey",
            "to_table": "DimProductSubcategory",
            "to_column": "ProductSubcategoryKey"
        },
        {
            "from_table": "FactInternetSales",
            "from_column": "CustomerKey",
            "to_table": "DimCustomer",
            "to_column": "CustomerKey"
        },
        {
            "from_table": "FactInternetSales",
            "from_column": "ProductKey",
            "to_table": "DimProduct",
            "to_column": "ProductKey"
        },
        {
            "from_table": "FactInternetSales",
            "from_column": "OrderDate",
            "to_table": "DimDate",
            "to_column": "Date"
        }
    ]
}