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: Currency
|   CurrencyKey | CurrencyAlternateKey   | Currency            |
|--------------:|:-----------------------|:--------------------|
|             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: Customers
|   BusinessEntityID | Title   | FirstName   | MiddleName   | LastName   | PhoneNumber   | PhoneNumberType   | EmailAddress                  | AddressType   | Address               | City          | StateProvinceName   |   PostalCode | CountryRegionName   |
|-------------------:|:--------|:------------|:-------------|:-----------|:--------------|:------------------|:------------------------------|:--------------|:----------------------|:--------------|:--------------------|-------------:|:--------------------|
|              28725 |         | Isabella    |              | Torres     | 905-555-0117  | Cell              | isabella3@adventure-works.com | Home          | 1955 Montgomery Ave   | National City | California          |        91950 | United States       |
|              20604 |         | Lisa        |              | Yang       | 986-555-0135  | Cell              | lisa8@adventure-works.com     | Home          | 7549 Longview Rd.     | Beverly Hills | California          |        90210 | United States       |
|              11115 |         | Lisa        |              | Liang      | 644-555-0144  | Cell              | lisa20@adventure-works.com    | Home          | 639 Bird Drive        | Burlingame    | California          |        94010 | United States       |
|              16150 |         | Jamie       |              | Huang      | 410-555-0145  | Cell              | jamie8@adventure-works.com    | Home          | 312 Via Del Verdes    | Colma         | California          |        94014 | United States       |
|              17839 |         | Erica       |              | Zhao       | 981-555-0111  | Cell              | erica10@adventure-works.com   | Home          | 3629 Warren St.       | Beverly Hills | California          |        90210 | United States       |
|              25456 |         | Kristen     |              | Liu        | 136-555-0125  | Cell              | kristen4@adventure-works.com  | Home          | 3723 Mt. Sequoia Ct.  | Barstow       | California          |        92311 | United States       |
|              18486 |         | Kristen     |              | Lu         | 175-555-0145  | Cell              | kristen10@adventure-works.com | Home          | 6521 D Bel Air Dr     | Bellflower    | California          |        90706 | United States       |
|              28095 |         | Shannon     |              | Gao        | 784-555-0116  | Cell              | shannon14@adventure-works.com | Home          | 7772 Golden Meadow    | Colma         | California          |        94014 | United States       |
|              21540 |         | Dustin      |              | Xu         | 433-555-0138  | Cell              | dustin4@adventure-works.com   | Home          | 3556 High Maple Court | Beverly Hills | California          |        90210 | United States       |
|              24394 |         | Dustin      |              | Chande     | 352-555-0145  | Cell              | dustin15@adventure-works.com  | Home          | 2292 Springlake Drive | Bellflower    | California          |        90706 | United States       |


Table: Date
| Date                    |   Year |   MonthNumber | MonthName   |   Day |   DateKey |   DayOfWeekNumber | DayOfWeek   |
|:------------------------|-------:|--------------:|:------------|------:|----------:|------------------:|:------------|
| 2011-01-01 00:00:00.000 |   2011 |             1 | January     |     1 |  20110101 |                 6 | Saturday    |
| 2011-01-02 00:00:00.000 |   2011 |             1 | January     |     2 |  20110102 |                 7 | Sunday      |
| 2011-01-03 00:00:00.000 |   2011 |             1 | January     |     3 |  20110103 |                 1 | Monday      |
| 2011-01-04 00:00:00.000 |   2011 |             1 | January     |     4 |  20110104 |                 2 | Tuesday     |
| 2011-01-05 00:00:00.000 |   2011 |             1 | January     |     5 |  20110105 |                 3 | Wednesday   |
| 2011-01-06 00:00:00.000 |   2011 |             1 | January     |     6 |  20110106 |                 4 | Thursday    |
| 2011-01-07 00:00:00.000 |   2011 |             1 | January     |     7 |  20110107 |                 5 | Friday      |
| 2011-01-08 00:00:00.000 |   2011 |             1 | January     |     8 |  20110108 |                 6 | Saturday    |
| 2011-01-09 00:00:00.000 |   2011 |             1 | January     |     9 |  20110109 |                 7 | Sunday      |
| 2011-01-10 00:00:00.000 |   2011 |             1 | January     |    10 |  20110110 |                 1 | Monday      |


Table: Parameter
|   Parameter |
|------------:|
|           0 |
|           1 |
|           2 |
|           3 |
|           4 |
|           5 |
|           6 |
|           7 |
|           8 |
|           9 |


Table: Product
|   ProductKey | ProductAlternateKey   | ProductSubcategoryKey   | WeightUnitMeasureCode   | SizeUnitMeasureCode   | EnglishProductName   | SpanishProductName   | FrenchProductName   | StandardCost   | FinishedGoodsFlag   | Color   |   SafetyStockLevel |   ReorderPoint | ListPrice   | Size   | SizeRange   | Weight   |   DaysToManufacture | ProductLine   | DealerPrice   | Class   | Style   | ModelName   | EnglishDescription   | FrenchDescription   | ChineseDescription   | ArabicDescription   | HebrewDescription   | ThaiDescription   | GermanDescription   | JapaneseDescription   | TurkishDescription   | StartDate               | EndDate   | Status   |
|-------------:|:----------------------|:------------------------|:------------------------|:----------------------|:---------------------|:---------------------|:--------------------|:---------------|:--------------------|:--------|-------------------:|---------------:|:------------|:-------|:------------|:---------|--------------------:|:--------------|:--------------|:--------|:--------|:------------|:---------------------|:--------------------|:---------------------|:--------------------|:--------------------|:------------------|:--------------------|:----------------------|:---------------------|:------------------------|:----------|:---------|
|            1 | AR-5381               |                         |                         |                       | Adjustable Race      |                      |                     |                | False               | NA      |               1000 |            750 |             |        | NA          |          |                   0 |               |               |         |         |             |                      |                     |                      |                     |                     |                   |                     |                       |                      | 2003-07-01 00:00:00.000 |           | Current  |
|            2 | BA-8327               |                         |                         |                       | Bearing Ball         |                      |                     |                | False               | NA      |               1000 |            750 |             |        | NA          |          |                   0 |               |               |         |         |             |                      |                     |                      |                     |                     |                   |                     |                       |                      | 2003-07-01 00:00:00.000 |           | Current  |
|           12 | CR-9981               |                         |                         |                       | Crown Race           |                      |                     |                | False               | NA      |               1000 |            750 |             |        | NA          |          |                   0 |               |               |         |         |             |                      |                     |                      |                     |                     |                   |                     |                       |                      | 2003-07-01 00:00:00.000 |           | Current  |
|           14 | DC-8732               |                         |                         |                       | Decal 1              |                      |                     |                | False               | NA      |               1000 |            750 |             |        | NA          |          |                   0 |               |               |         |         |             |                      |                     |                      |                     |                     |                   |                     |                       |                      | 2003-07-01 00:00:00.000 |           | Current  |
|           15 | DC-9824               |                         |                         |                       | Decal 2              |                      |                     |                | False               | NA      |               1000 |            750 |             |        | NA          |          |                   0 |               |               |         |         |             |                      |                     |                      |                     |                     |                   |                     |                       |                      | 2003-07-01 00:00:00.000 |           | Current  |
|           22 | FW-1000               |                         |                         |                       | Flat Washer 1        |                      |                     |                | False               | NA      |               1000 |            750 |             |        | NA          |          |                   0 |               |               |         |         |             |                      |                     |                      |                     |                     |                   |                     |                       |                      | 2003-07-01 00:00:00.000 |           | Current  |
|           23 | FW-1200               |                         |                         |                       | Flat Washer 6        |                      |                     |                | False               | NA      |               1000 |            750 |             |        | NA          |          |                   0 |               |               |         |         |             |                      |                     |                      |                     |                     |                   |                     |                       |                      | 2003-07-01 00:00:00.000 |           | Current  |
|           24 | FW-1400               |                         |                         |                       | Flat Washer 2        |                      |                     |                | False               | NA      |               1000 |            750 |             |        | NA          |          |                   0 |               |               |         |         |             |                      |                     |                      |                     |                     |                   |                     |                       |                      | 2003-07-01 00:00:00.000 |           | Current  |
|           25 | FW-3400               |                         |                         |                       | Flat Washer 9        |                      |                     |                | False               | NA      |               1000 |            750 |             |        | NA          |          |                   0 |               |               |         |         |             |                      |                     |                      |                     |                     |                   |                     |                       |                      | 2003-07-01 00:00:00.000 |           | Current  |
|           26 | FW-3800               |                         |                         |                       | Flat Washer 4        |                      |                     |                | False               | NA      |               1000 |            750 |             |        | NA          |          |                   0 |               |               |         |         |             |                      |                     |                      |                     |                     |                   |                     |                       |                      | 2003-07-01 00:00:00.000 |           | Current  |


Table: ProductCategory
|   ProductCategoryKey |   ProductCategoryAlternateKey | EnglishProductCategoryName   | SpanishProductCategoryName   | FrenchProductCategoryName   |
|---------------------:|------------------------------:|:-----------------------------|:-----------------------------|:----------------------------|
|                    1 |                             1 | Bikes                        | Bicicleta                    | Vélo                        |
|                    2 |                             2 | Components                   | Componente                   | Composant                   |
|                    3 |                             3 | Clothing                     | Prenda                       | Vêtements                   |
|                    4 |                             4 | Accessories                  | Accesorio                    | Accessoire                  |


Table: ProductSubcategory
|   ProductSubcategoryKey |   ProductSubcategoryAlternateKey | EnglishProductSubcategoryName   | SpanishProductSubcategoryName   | FrenchProductSubcategoryName   |   ProductCategoryKey |
|------------------------:|---------------------------------:|:--------------------------------|:--------------------------------|:-------------------------------|---------------------:|
|                       1 |                                1 | Mountain Bikes                  | Bicicleta de montaña            | VTT                            |                    1 |
|                       2 |                                2 | Road Bikes                      | Bicicleta de carretera          | Vélo de route                  |                    1 |
|                       3 |                                3 | Touring Bikes                   | Bicicleta de paseo              | Vélo de randonnée              |                    1 |
|                       4 |                                4 | Handlebars                      | Barra                           | Barre d'appui                  |                    2 |
|                       5 |                                5 | Bottom Brackets                 | Eje de pedalier                 | Axe de pédalier                |                    2 |
|                       6 |                                6 | Brakes                          | Frenos                          | Freins                         |                    2 |
|                       7 |                                7 | Chains                          | Cadena                          | Chaîne                         |                    2 |
|                       8 |                                8 | Cranksets                       | Bielas                          | Pédalier                       |                    2 |
|                       9 |                                9 | Derailleurs                     | Desviador                       | Dérailleur                     |                    2 |
|                      10 |                               10 | Forks                           | Horquilla                       | Fourche                        |                    2 |


Table: Promotion
|   PromotionKey |   PromotionAlternateKey | Promotion                   | SpanishPromotionName                         | FrenchPromotionName                 |   DiscountPct | EnglishPromotionType   | SpanishPromotionType   | FrenchPromotionType                 | EnglishPromotionCategory   | SpanishPromotionCategory   | FrenchPromotionCategory   | StartDate               | EndDate                 |   MinQty | MaxQty   |
|---------------:|------------------------:|:----------------------------|:---------------------------------------------|:------------------------------------|--------------:|:-----------------------|:-----------------------|:------------------------------------|:---------------------------|:---------------------------|:--------------------------|:------------------------|:------------------------|---------:|:---------|
|              1 |                       1 | No Discount                 | Sin descuento                                | Aucune remise                       |          0    | No Discount            | Sin descuento          | Aucune remise                       | No Discount                | Sin descuento              | Aucune remise             | 2010-11-29 00:00:00.000 | 2014-06-30 00:00:00.000 |        0 |          |
|              2 |                       2 | Volume Discount 11 to 14    | Descuento por volumen (entre 11 y 14)        | Remise sur quantité (de 11 à 14)    |          0.02 | Volume Discount        | Descuento por volumen  | Remise sur quantité                 | Reseller                   | Distribuidor               | Revendeur                 | 2010-12-29 00:00:00.000 | 2013-12-28 00:00:00.000 |       11 | 14       |
|              3 |                       3 | Volume Discount 15 to 24    | Descuento por volumen (entre 15 y 24)        | Remise sur quantité (de 15 à 24)    |          0.05 | Volume Discount        | Descuento por volumen  | Remise sur quantité                 | Reseller                   | Distribuidor               | Revendeur                 | 2010-12-29 00:00:00.000 | 2013-12-28 00:00:00.000 |       15 | 24       |
|              4 |                       4 | Volume Discount 25 to 40    | Descuento por volumen (entre 25 y 40)        | Remise sur quantité (de 25 à 40)    |          0.1  | Volume Discount        | Descuento por volumen  | Remise sur quantité                 | Reseller                   | Distribuidor               | Revendeur                 | 2010-12-29 00:00:00.000 | 2013-12-28 00:00:00.000 |       25 | 40       |
|              5 |                       5 | Volume Discount 41 to 60    | Descuento por volumen (entre 41 y 60)        | Remise sur quantité (de 41 à 60)    |          0.15 | Volume Discount        | Descuento por volumen  | Remise sur quantité                 | Reseller                   | Distribuidor               | Revendeur                 | 2010-12-29 00:00:00.000 | 2013-12-28 00:00:00.000 |       41 | 60       |
|              6 |                       6 | Volume Discount over 60     | Descuento por volumen (más de 60)            | Remise sur quantité (au-delà de 60) |          0.2  | Volume Discount        | Descuento por volumen  | Remise sur quantité                 | Reseller                   | Distribuidor               | Revendeur                 | 2010-12-29 00:00:00.000 | 2013-12-28 00:00:00.000 |       61 |          |
|              7 |                       7 | Mountain-100 Clearance Sale | Liquidación de bicicleta de montaña, 100     | Liquidation VTT 100                 |          0.35 | Discontinued Product   | Descatalogado          | Ce produit n'est plus commercialisé | Reseller                   | Distribuidor               | Revendeur                 | 2011-11-12 00:00:00.000 | 2011-12-28 00:00:00.000 |        0 |          |
|              8 |                       8 | Sport Helmet Discount-2002  | Casco deportivo, descuento: 2002             | Remise sur les casques sport - 2002 |          0.1  | Seasonal Discount      | Descuento de temporada | Remise saisonnière                  | Reseller                   | Distribuidor               | Revendeur                 | 2011-12-29 00:00:00.000 | 2012-01-28 00:00:00.000 |        0 |          |
|              9 |                       9 | Road-650 Overstock          | Bicicleta de carretera: 650, oferta especial | Déstockage Vélo de route 650        |          0.3  | Excess Inventory       | Inventario excedente   | Déstockage                          | Reseller                   | Distribuidor               | Revendeur                 | 2011-12-29 00:00:00.000 | 2012-02-28 00:00:00.000 |        0 |          |
|             10 |                      10 | Mountain Tire Sale          | Oferta de cubierta de montaña                | Vente de pneus de VTT               |          0.5  | Excess Inventory       | Inventario excedente   | Déstockage                          | Customer                   | Cliente                    | Client                    | 2012-12-12 00:00:00.000 | 2013-02-26 00:00:00.000 |        0 |          |


Table: Sales
| OrderDate               |   ProductKey |   DueDateKey |   ShipDateKey |   CustomerID |   PromotionKey |   CurrencyKey |   SalesTerritoryKey |   RevisionNumber |   OrderQuantity |   UnitPrice |   ExtendedAmount |   UnitPriceDiscountPct |   DiscountAmount |   ProductStandardCost |   TotalProductCost |   SalesAmount |   TaxAmount |   Freight | CarrierTrackingNumber   | CustomerPONumber   |
|:------------------------|-------------:|-------------:|--------------:|-------------:|---------------:|--------------:|--------------------:|-----------------:|----------------:|------------:|-----------------:|-----------------------:|-----------------:|----------------------:|-------------------:|--------------:|------------:|----------:|:------------------------|:-------------------|
| 2017-10-29 00:00:00.000 |          477 |     20130110 |      20130105 |        21440 |              1 |           100 |                   4 |                1 |               1 |        4.99 |             4.99 |                      0 |                0 |                1.8663 |             1.8663 |          4.99 |      0.3992 |    0.1248 |                         |                    |
| 2017-10-31 00:00:00.000 |          477 |     20130112 |      20130107 |        11292 |              1 |           100 |                   4 |                1 |               1 |        4.99 |             4.99 |                      0 |                0 |                1.8663 |             1.8663 |          4.99 |      0.3992 |    0.1248 |                         |                    |
| 2017-11-05 00:00:00.000 |          477 |     20130117 |      20130112 |        18958 |              1 |           100 |                   4 |                1 |               1 |        4.99 |             4.99 |                      0 |                0 |                1.8663 |             1.8663 |          4.99 |      0.3992 |    0.1248 |                         |                    |
| 2017-11-05 00:00:00.000 |          477 |     20130117 |      20130112 |        15553 |              1 |           100 |                   4 |                1 |               1 |        4.99 |             4.99 |                      0 |                0 |                1.8663 |             1.8663 |          4.99 |      0.3992 |    0.1248 |                         |                    |
| 2017-11-07 00:00:00.000 |          477 |     20130119 |      20130114 |        11267 |              1 |           100 |                   4 |                1 |               1 |        4.99 |             4.99 |                      0 |                0 |                1.8663 |             1.8663 |          4.99 |      0.3992 |    0.1248 |                         |                    |
| 2017-11-07 00:00:00.000 |          477 |     20130119 |      20130114 |        19393 |              1 |           100 |                   4 |                1 |               1 |        4.99 |             4.99 |                      0 |                0 |                1.8663 |             1.8663 |          4.99 |      0.3992 |    0.1248 |                         |                    |
| 2017-11-08 00:00:00.000 |          477 |     20130120 |      20130115 |        15557 |              1 |           100 |                   4 |                1 |               1 |        4.99 |             4.99 |                      0 |                0 |                1.8663 |             1.8663 |          4.99 |      0.3992 |    0.1248 |                         |                    |
| 2017-11-08 00:00:00.000 |          477 |     20130120 |      20130115 |        24417 |              1 |           100 |                   4 |                1 |               1 |        4.99 |             4.99 |                      0 |                0 |                1.8663 |             1.8663 |          4.99 |      0.3992 |    0.1248 |                         |                    |
| 2017-11-10 00:00:00.000 |          477 |     20130122 |      20130117 |        21469 |              1 |           100 |                   4 |                1 |               1 |        4.99 |             4.99 |                      0 |                0 |                1.8663 |             1.8663 |          4.99 |      0.3992 |    0.1248 |                         |                    |
| 2017-11-11 00:00:00.000 |          477 |     20130123 |      20130118 |        11281 |              1 |           100 |                   4 |                1 |               1 |        4.99 |             4.99 |                      0 |                0 |                1.8663 |             1.8663 |          4.99 |      0.3992 |    0.1248 |                         |                    |


Table: SalesTerritory
|   SalesTerritoryKey |   SalesTerritoryAlternateKey | Region         | Country        | Group         |
|--------------------:|-----------------------------:|:---------------|:---------------|:--------------|
|                   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        |

 


tables: name: Currency
data: Currency.csv
name: Customers
data: Customers.csv
name: Date
data: Date.csv
name: Parameter
data: Parameter.csv
name: Product
data: Product.csv
name: ProductCategory
data: ProductCategory.csv
name: ProductSubcategory
data: ProductSubcategory.csv
name: Promotion
data: Promotion.csv
name: Sales
data: Sales.csv
name: SalesTerritory
data: SalesTerritory.csv
label: Sales
CurrencyKey
Currency
CurrencyKey
Sales
ProductKey
Product
ProductKey
Sales
PromotionKey
Promotion
PromotionKey
Sales
SalesTerritoryKey
SalesTerritory
SalesTerritoryKey
Product
ProductSubcategoryKey
ProductSubcategory
ProductSubcategoryKey
ProductSubcategory
ProductCategoryKey
ProductCategory
ProductCategoryKey
Sales
CustomerID
Customers
BusinessEntityID
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "CurrencyKey",
            "to_table": "Currency",
            "to_column": "CurrencyKey"
        },
        {
            "from_table": "Sales",
            "from_column": "ProductKey",
            "to_table": "Product",
            "to_column": "ProductKey"
        },
        {
            "from_table": "Sales",
            "from_column": "PromotionKey",
            "to_table": "Promotion",
            "to_column": "PromotionKey"
        },
        {
            "from_table": "Sales",
            "from_column": "SalesTerritoryKey",
            "to_table": "SalesTerritory",
            "to_column": "SalesTerritoryKey"
        },
        {
            "from_table": "Product",
            "from_column": "ProductSubcategoryKey",
            "to_table": "ProductSubcategory",
            "to_column": "ProductSubcategoryKey"
        },
        {
            "from_table": "ProductSubcategory",
            "from_column": "ProductCategoryKey",
            "to_table": "ProductCategory",
            "to_column": "ProductCategoryKey"
        },
        {
            "from_table": "Sales",
            "from_column": "CustomerID",
            "to_table": "Customers",
            "to_column": "BusinessEntityID"
        }
    ]
}