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   | LastName   | BirthDate               | MaritalStatus   | Gender   |   TotalChildren |   NumberChildrenAtHome | DateFirstPurchase       | CommuteDistance   | Customer Full Name   |
|--------------:|---------------:|:------------|:-----------|:------------------------|:----------------|:---------|----------------:|-----------------------:|:------------------------|:------------------|:---------------------|
|         11101 |             33 | Abby        | Sai        | 1970-11-05 00:00:00.000 | S               | F        |               0 |                      0 | 2011-04-29 00:00:00.000 | 0-1 Miles         | Abby Sai             |
|         11108 |             13 | Kari        | Alvarez    | 1969-01-10 00:00:00.000 | S               | F        |               0 |                      0 | 2011-05-03 00:00:00.000 | 0-1 Miles         | Kari Alvarez         |
|         11133 |            542 | Angela      | Griffin    | 1986-03-08 00:00:00.000 | S               | F        |               0 |                      0 | 2013-12-30 00:00:00.000 | 0-1 Miles         | Angela Griffin       |
|         11136 |             53 | Brianna     | Morgan     | 1984-04-24 00:00:00.000 | S               | F        |               0 |                      0 | 2013-01-03 00:00:00.000 | 0-1 Miles         | Brianna Morgan       |
|         11145 |            536 | Jasmine     | Coleman    | 1985-06-06 00:00:00.000 | S               | F        |               0 |                      0 | 2013-01-25 00:00:00.000 | 0-1 Miles         | Jasmine Coleman      |
|         11166 |            631 | Ashley      | Martinez   | 1977-10-22 00:00:00.000 | S               | F        |               0 |                      0 | 2013-10-14 00:00:00.000 | 0-1 Miles         | Ashley Martinez      |
|         11167 |            618 | Jasmine     | Barnes     | 1978-01-29 00:00:00.000 | S               | F        |               0 |                      0 | 2013-01-07 00:00:00.000 | 0-1 Miles         | Jasmine Barnes       |
|         11173 |            552 | Sarah       | Thomas     | 1973-02-28 00:00:00.000 | S               | F        |               0 |                      0 | 2013-03-02 00:00:00.000 | 0-1 Miles         | Sarah Thomas         |
|         11358 |              2 | Cynthia     | Malhotra   | 1984-05-10 00:00:00.000 | S               | F        |               0 |                      0 | 2011-06-28 00:00:00.000 | 0-1 Miles         | Cynthia Malhotra     |
|         11372 |             20 | Wendy       | Romero     | 1983-11-12 00:00:00.000 | S               | F        |               0 |                      0 | 2011-06-07 00:00:00.000 | 0-1 Miles         | Wendy Romero         |


Table: DimDate
|   DateKey | FullDateAlternateKey    |   DayNumberOfWeek | EnglishDayNameOfWeek   |   WeekNumberOfYear | EnglishMonthName   |   MonthNumberOfYear |   CalendarYear | YearMonth   |
|----------:|:------------------------|------------------:|:-----------------------|-------------------:|:-------------------|--------------------:|---------------:|:------------|
|  20050101 | 2005-01-01 00:00:00.000 |                 7 | Saturday               |                  1 | January            |                   1 |           2005 | 2005/1      |
|  20050108 | 2005-01-08 00:00:00.000 |                 7 | Saturday               |                  2 | January            |                   1 |           2005 | 2005/1      |
|  20050115 | 2005-01-15 00:00:00.000 |                 7 | Saturday               |                  3 | January            |                   1 |           2005 | 2005/1      |
|  20050122 | 2005-01-22 00:00:00.000 |                 7 | Saturday               |                  4 | January            |                   1 |           2005 | 2005/1      |
|  20050129 | 2005-01-29 00:00:00.000 |                 7 | Saturday               |                  5 | January            |                   1 |           2005 | 2005/1      |
|  20050205 | 2005-02-05 00:00:00.000 |                 7 | Saturday               |                  6 | February           |                   2 |           2005 | 2005/2      |
|  20050212 | 2005-02-12 00:00:00.000 |                 7 | Saturday               |                  7 | February           |                   2 |           2005 | 2005/2      |
|  20050219 | 2005-02-19 00:00:00.000 |                 7 | Saturday               |                  8 | February           |                   2 |           2005 | 2005/2      |
|  20050226 | 2005-02-26 00:00:00.000 |                 7 | Saturday               |                  9 | February           |                   2 |           2005 | 2005/2      |
|  20050305 | 2005-03-05 00:00:00.000 |                 7 | Saturday               |                 10 | March              |                   3 |           2005 | 2005/3      |


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   | EnglishProductName    | Color   | Size   | EnglishDescription   | StartDate               | EndDate   | Status   |
|-------------:|:----------------------|:------------------------|:----------------------|:--------|:-------|:---------------------|:------------------------|:----------|:---------|
|            1 | AR-5381               | NULL                    | Adjustable Race       | NA      | NULL   | NULL                 | 2003-07-01 00:00:00.000 | NULL      | Current  |
|            2 | BA-8327               | NULL                    | Bearing Ball          | NA      | NULL   | NULL                 | 2003-07-01 00:00:00.000 | NULL      | Current  |
|            3 | BE-2349               | NULL                    | BB Ball Bearing       | NA      | NULL   | NULL                 | 2003-07-01 00:00:00.000 | NULL      | Current  |
|            4 | BE-2908               | NULL                    | Headset Ball Bearings | NA      | NULL   | NULL                 | 2003-07-01 00:00:00.000 | NULL      | Current  |
|            5 | BL-2036               | NULL                    | Blade                 | NA      | NULL   | NULL                 | 2003-07-01 00:00:00.000 | NULL      | Current  |
|           12 | CR-9981               | NULL                    | Crown Race            | NA      | NULL   | NULL                 | 2003-07-01 00:00:00.000 | NULL      | Current  |
|           13 | CS-2812               | NULL                    | Chain Stays           | NA      | NULL   | NULL                 | 2003-07-01 00:00:00.000 | NULL      | Current  |
|           14 | DC-8732               | NULL                    | Decal 1               | NA      | NULL   | NULL                 | 2003-07-01 00:00:00.000 | NULL      | Current  |
|           15 | DC-9824               | NULL                    | Decal 2               | NA      | NULL   | NULL                 | 2003-07-01 00:00:00.000 | NULL      | Current  |
|           16 | DT-2377               | NULL                    | Down Tube             | NA      | NULL   | NULL                 | 2003-07-01 00:00:00.000 | NULL      | Current  |


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 |   UnitPriceDiscountPct |   SalesAmount |   TaxAmt | OrderDate               | ShipDate                |
|-------------:|---------------:|--------------:|--------------:|---------------:|--------------:|--------------------:|:-------------------|-----------------------:|-----------------:|----------------:|------------:|-----------------------:|--------------:|---------:|:------------------------|:------------------------|
|          528 |       20130128 |      20130204 |         14870 |              1 |           100 |                   4 | SO51900            |                      1 |                1 |               1 |        4.99 |                      0 |          4.99 |   0.3992 | 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 |                      0 |          4.99 |   0.3992 | 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 |                      0 |          4.99 |   0.3992 | 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 |                      0 |          4.99 |   0.3992 | 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 |                      0 |          4.99 |   0.3992 | 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 |                      0 |          4.99 |   0.3992 | 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 |                      0 |          4.99 |   0.3992 | 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 |                      0 |          4.99 |   0.3992 | 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 |                      0 |          4.99 |   0.3992 | 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 |                      0 |          4.99 |   0.3992 | 2013-02-04 00:00:00.000 | 2013-02-11 00:00:00.000 |


Table: MeasureTable


 


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: MeasureTable
data: MeasureTable.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
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"
        }
    ]
}