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: DimCurrency
|   CurrencyKey | CurrencyAlternateKey   | CurrencyName        |
|--------------:|:-----------------------|:--------------------|
|             1 | AFA                    | Afghani             |
|             2 | DZD                    | Algerian Dinar      |
|             3 | ARS                    | Argentine Peso      |
|             4 | AMD                    | Armenian Dram       |
|             5 | AWG                    | Aruban Guilder      |
|             6 | AUD                    | Australian Dollar   |
|             7 | AZM                    | Azerbaijanian Manat |
|             8 | BSD                    | Bahamian Dollar     |
|             9 | BHD                    | Bahraini Dinar      |
|            10 | THB                    | Baht                |


Table: DimCustomer
|   CustomerKey |   GeographyKey | FirstName   | MiddleName   | LastName   |   NameStyle | BirthDate               | MaritalStatus   | Suffix   | Gender   | EmailAddress                    |   TotalChildren |   NumberChildrenAtHome | DateFirstPurchase       | CommuteDistance   | Fullname         |   Age | Age group   |
|--------------:|---------------:|:------------|:-------------|:-----------|------------:|:------------------------|:----------------|:---------|:---------|:--------------------------------|----------------:|-----------------------:|:------------------------|:------------------|:-----------------|------:|:------------|
|         11063 |            634 | Angela      | NULL         | Murphy     |           0 | 1980-10-04 00:00:00.000 | S               | NULL     | F        | angela41@adventure-works.com    |               0 |                      0 | 2013-01-12 00:00:00.000 | 5-10 Miles        | Angela Murphy    |    41 | 41-50       |
|         11103 |              3 | Cassie      | NULL         | Chande     |           0 | 1981-04-12 00:00:00.000 | S               | NULL     | F        | cassie13@adventure-works.com    |               0 |                      0 | 2011-04-15 00:00:00.000 | 5-10 Miles        | Cassie Chande    |    41 | 41-50       |
|         11127 |            361 | Jan         | NULL         | Edwards    |           0 | 1981-04-19 00:00:00.000 | M               | NULL     | F        | jan11@adventure-works.com       |               0 |                      0 | 2013-04-10 00:00:00.000 | 5-10 Miles        | Jan Edwards      |    41 | 41-50       |
|         11163 |            372 | Gabriel     | NULL         | Wang       |           0 | 1980-06-18 00:00:00.000 | M               | NULL     | M        | gabriel21@adventure-works.com   |               0 |                      0 | 2013-05-01 00:00:00.000 | 5-10 Miles        | Gabriel Wang     |    41 | 41-50       |
|         11448 |             35 | Kyle        | NULL         | Patterson  |           0 | 1980-10-25 00:00:00.000 | S               | NULL     | M        | kyle5@adventure-works.com       |               0 |                      0 | 2011-06-16 00:00:00.000 | 10+ Miles         | Kyle Patterson   |    41 | 41-50       |
|         11610 |            269 | Blake       | NULL         | Collins    |           0 | 1980-10-20 00:00:00.000 | S               | NULL     | M        | blake47@adventure-works.com     |               0 |                      0 | 2012-01-10 00:00:00.000 | 0-1 Miles         | Blake Collins    |    41 | 41-50       |
|         12281 |            263 | Janelle     | NULL         | Sanchez    |           0 | 1981-04-19 00:00:00.000 | M               | NULL     | F        | janelle17@adventure-works.com   |               0 |                      0 | 2012-04-13 00:00:00.000 | 0-1 Miles         | Janelle Sanchez  |    41 | 41-50       |
|         12337 |              6 | Dustin      | NULL         | Goldstein  |           0 | 1981-04-07 00:00:00.000 | S               | NULL     | M        | dustin20@adventure-works.com    |               0 |                      0 | 2011-12-05 00:00:00.000 | 5-10 Miles        | Dustin Goldstein |    41 | 41-50       |
|         12344 |              3 | Dominique   | NULL         | Perez      |           0 | 1980-11-29 00:00:00.000 | S               | NULL     | F        | dominique18@adventure-works.com |               0 |                      0 | 2013-03-14 00:00:00.000 | 10+ Miles         | Dominique Perez  |    41 | 41-50       |
|         12346 |             15 | Wesley      | NULL         | Gao        |           0 | 1980-11-18 00:00:00.000 | S               | NULL     | M        | wesley15@adventure-works.com    |               0 |                      0 | 2012-01-04 00:00:00.000 | 10+ Miles         | Wesley Gao       |    41 | 41-50       |


Table: DimDate
|   DateKey | FullDateAlternateKey    |   DayNumberOfWeek | EnglishDayNameOfWeek   |   WeekNumberOfYear | EnglishMonthName   |   MonthNumberOfYear |   CalendarQuarter |   CalendarYear | Monthyear   |
|----------:|:------------------------|------------------:|:-----------------------|-------------------:|:-------------------|--------------------:|------------------:|---------------:|:------------|
|  20050703 | 2005-07-03 00:00:00.000 |                 1 | Sunday                 |                 28 | July               |                   7 |                 3 |           2005 | Jul 2005    |
|  20050704 | 2005-07-04 00:00:00.000 |                 2 | Monday                 |                 28 | July               |                   7 |                 3 |           2005 | Jul 2005    |
|  20050705 | 2005-07-05 00:00:00.000 |                 3 | Tuesday                |                 28 | July               |                   7 |                 3 |           2005 | Jul 2005    |
|  20050706 | 2005-07-06 00:00:00.000 |                 4 | Wednesday              |                 28 | July               |                   7 |                 3 |           2005 | Jul 2005    |
|  20050707 | 2005-07-07 00:00:00.000 |                 5 | Thursday               |                 28 | July               |                   7 |                 3 |           2005 | Jul 2005    |
|  20050708 | 2005-07-08 00:00:00.000 |                 6 | Friday                 |                 28 | July               |                   7 |                 3 |           2005 | Jul 2005    |
|  20050709 | 2005-07-09 00:00:00.000 |                 7 | Saturday               |                 28 | July               |                   7 |                 3 |           2005 | Jul 2005    |
|  20060709 | 2006-07-09 00:00:00.000 |                 1 | Sunday                 |                 28 | July               |                   7 |                 3 |           2006 | Jul 2006    |
|  20060710 | 2006-07-10 00:00:00.000 |                 2 | Monday                 |                 28 | July               |                   7 |                 3 |           2006 | Jul 2006    |
|  20060711 | 2006-07-11 00:00:00.000 |                 3 | Tuesday                |                 28 | July               |                   7 |                 3 |           2006 | Jul 2006    |


Table: DimGeography
|   GeographyKey | City          | StateProvinceCode   | StateProvinceName   | CountryRegionCode   | EnglishCountryRegionName   |   SalesTerritoryKey |
|---------------:|:--------------|:--------------------|:--------------------|:--------------------|:---------------------------|--------------------:|
|            292 | Alhambra      | CA                  | California          | US                  | United States              |                   4 |
|            293 | Alpine        | CA                  | California          | US                  | United States              |                   4 |
|            294 | Auburn        | CA                  | California          | US                  | United States              |                   4 |
|            295 | Baldwin Park  | CA                  | California          | US                  | United States              |                   4 |
|            296 | Barstow       | CA                  | California          | US                  | United States              |                   4 |
|            297 | Bell Gardens  | CA                  | California          | US                  | United States              |                   4 |
|            298 | Bellflower    | CA                  | California          | US                  | United States              |                   4 |
|            299 | Berkeley      | CA                  | California          | US                  | United States              |                   4 |
|            300 | Beverly Hills | CA                  | California          | US                  | United States              |                   4 |
|            301 | Burbank       | CA                  | California          | US                  | United States              |                   4 |


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


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


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


Table: DimSalesTerritory
|   SalesTerritoryKey |   SalesTerritoryAlternateKey | SalesTerritoryRegion   | SalesTerritoryCountry   | SalesTerritoryGroup   |
|--------------------:|-----------------------------:|:-----------------------|:------------------------|:----------------------|
|                   1 |                            1 | Northwest              | United States           | North America         |
|                   2 |                            2 | Northeast              | United States           | North America         |
|                   3 |                            3 | Central                | United States           | North America         |
|                   4 |                            4 | Southwest              | United States           | North America         |
|                   5 |                            5 | Southeast              | United States           | North America         |
|                   6 |                            6 | Canada                 | Canada                  | North America         |
|                   7 |                            7 | France                 | France                  | Europe                |
|                   8 |                            8 | Germany                | Germany                 | Europe                |
|                   9 |                            9 | Australia              | Australia               | Pacific               |
|                  10 |                           10 | United Kingdom         | United Kingdom          | Europe                |


Table: FactInternetSales
|   ProductKey |   OrderDateKey |   ShipDateKey |   CustomerKey |   PromotionKey |   CurrencyKey |   SalesTerritoryKey | SalesOrderNumber   |   SalesOrderLineNumber |   RevisionNumber |   OrderQuantity |   UnitPrice |   ExtendedAmount |   UnitPriceDiscountPct |   TotalProductCost |   SalesAmount |   TaxAmt |   Freight | CarrierTrackingNumber   | CustomerPONumber   | OrderDate               | ShipDate                |
|-------------:|---------------:|--------------:|--------------:|---------------:|--------------:|--------------------:|:-------------------|-----------------------:|-----------------:|----------------:|------------:|-----------------:|-----------------------:|-------------------:|--------------:|---------:|----------:|:------------------------|:-------------------|:------------------------|:------------------------|
|          528 |       20130128 |      20130204 |         14870 |              1 |           100 |                   4 | SO51900            |                      1 |                1 |               1 |        4.99 |             4.99 |                      0 |             1.8663 |          4.99 |   0.3992 |    0.1248 | NULL                    | NULL               | 2013-01-28 00:00:00.000 | 2013-02-04 00:00:00.000 |
|          528 |       20130129 |      20130205 |         15319 |              1 |           100 |                   4 | SO51948            |                      1 |                1 |               1 |        4.99 |             4.99 |                      0 |             1.8663 |          4.99 |   0.3992 |    0.1248 | NULL                    | NULL               | 2013-01-29 00:00:00.000 | 2013-02-05 00:00:00.000 |
|          528 |       20130131 |      20130207 |         16384 |              1 |           100 |                   4 | SO52043            |                      1 |                1 |               1 |        4.99 |             4.99 |                      0 |             1.8663 |          4.99 |   0.3992 |    0.1248 | NULL                    | NULL               | 2013-01-31 00:00:00.000 | 2013-02-07 00:00:00.000 |
|          528 |       20130131 |      20130207 |         15476 |              1 |           100 |                   4 | SO52045            |                      1 |                1 |               1 |        4.99 |             4.99 |                      0 |             1.8663 |          4.99 |   0.3992 |    0.1248 | NULL                    | NULL               | 2013-01-31 00:00:00.000 | 2013-02-07 00:00:00.000 |
|          528 |       20130201 |      20130208 |         15861 |              1 |           100 |                   4 | SO52094            |                      1 |                1 |               1 |        4.99 |             4.99 |                      0 |             1.8663 |          4.99 |   0.3992 |    0.1248 | NULL                    | NULL               | 2013-02-01 00:00:00.000 | 2013-02-08 00:00:00.000 |
|          528 |       20130203 |      20130210 |         26017 |              1 |           100 |                   4 | SO52175            |                      1 |                1 |               1 |        4.99 |             4.99 |                      0 |             1.8663 |          4.99 |   0.3992 |    0.1248 | NULL                    | NULL               | 2013-02-03 00:00:00.000 | 2013-02-10 00:00:00.000 |
|          528 |       20130203 |      20130210 |         14761 |              1 |           100 |                   4 | SO52190            |                      1 |                1 |               1 |        4.99 |             4.99 |                      0 |             1.8663 |          4.99 |   0.3992 |    0.1248 | NULL                    | NULL               | 2013-02-03 00:00:00.000 | 2013-02-10 00:00:00.000 |
|          528 |       20130204 |      20130211 |         22038 |              1 |           100 |                   4 | SO52232            |                      1 |                1 |               1 |        4.99 |             4.99 |                      0 |             1.8663 |          4.99 |   0.3992 |    0.1248 | NULL                    | NULL               | 2013-02-04 00:00:00.000 | 2013-02-11 00:00:00.000 |
|          528 |       20130204 |      20130211 |         22163 |              1 |           100 |                   4 | SO52234            |                      1 |                1 |               1 |        4.99 |             4.99 |                      0 |             1.8663 |          4.99 |   0.3992 |    0.1248 | NULL                    | NULL               | 2013-02-04 00:00:00.000 | 2013-02-11 00:00:00.000 |
|          528 |       20130204 |      20130211 |         16018 |              1 |           100 |                   4 | SO52245            |                      1 |                1 |               1 |        4.99 |             4.99 |                      0 |             1.8663 |          4.99 |   0.3992 |    0.1248 | NULL                    | NULL               | 2013-02-04 00:00:00.000 | 2013-02-11 00:00:00.000 |


Table: Measures (2)
|   Month No | Month Name   |
|-----------:|:-------------|
|          1 | Jan          |
|          2 | Feb          |
|          3 | Mar          |
|          4 | Apr          |
|          5 | May          |
|          6 | Jun          |
|          7 | Jul          |
|          8 | Aug          |
|          9 | Sept         |
|         10 | Oct          |

 


tables: name: DimCurrency
data: DimCurrency.csv
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: DimSalesTerritory
data: DimSalesTerritory.csv
name: FactInternetSales
data: FactInternetSales.csv
name: Measures (2)
data: Measures (2).csv
label: FactInternetSales
CurrencyKey
DimCurrency
CurrencyKey
FactInternetSales
CustomerKey
DimCustomer
CustomerKey
DimCustomer
GeographyKey
DimGeography
GeographyKey
DimGeography
SalesTerritoryKey
DimSalesTerritory
SalesTerritoryKey
FactInternetSales
ProductKey
DimProduct
ProductKey
DimProductSubCategory
ProductCategoryKey
DimProductCategory
ProductCategoryKey
DimProduct
ProductSubcategoryKey
DimProductSubCategory
ProductSubcategoryKey
FactInternetSales
OrderDate
DimDate
FullDateAlternateKey
output: {
    "joins": [
        {
            "from_table": "FactInternetSales",
            "from_column": "CurrencyKey",
            "to_table": "DimCurrency",
            "to_column": "CurrencyKey"
        },
        {
            "from_table": "FactInternetSales",
            "from_column": "CustomerKey",
            "to_table": "DimCustomer",
            "to_column": "CustomerKey"
        },
        {
            "from_table": "DimCustomer",
            "from_column": "GeographyKey",
            "to_table": "DimGeography",
            "to_column": "GeographyKey"
        },
        {
            "from_table": "DimGeography",
            "from_column": "SalesTerritoryKey",
            "to_table": "DimSalesTerritory",
            "to_column": "SalesTerritoryKey"
        },
        {
            "from_table": "FactInternetSales",
            "from_column": "ProductKey",
            "to_table": "DimProduct",
            "to_column": "ProductKey"
        },
        {
            "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": "OrderDate",
            "to_table": "DimDate",
            "to_column": "FullDateAlternateKey"
        }
    ]
}