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: Cambiador_unidades
| Unidades    |
|:------------|
| Miles       |
| Millones    |
| Sin resumir |


Table: Customer
|   CustomerKey | Name               | Marital Status   | Gender   | Education       | Occupation     | Continent     | City           | State      | CountryRegion   | Birth Date              |
|--------------:|:-------------------|:-----------------|:---------|:----------------|:---------------|:--------------|:---------------|:-----------|:----------------|:------------------------|
|            17 | Hill, Wyatt        | M                | M        | Partial College | Skilled Manual | North America | Imperial Beach | California | United States   | 1979-04-28 00:00:00.000 |
|            24 | Edwards, Seth      | M                | M        | Partial College | Skilled Manual | North America | Bellflower     | California | United States   | 1978-10-11 00:00:00.000 |
|            25 | Xie, Russell       | M                | M        | Partial College | Skilled Manual | North America | Concord        | California | United States   | 1978-09-17 00:00:00.000 |
|            44 | Simmons, Nathan    | M                | M        | Partial College | Skilled Manual | North America | Glendale       | California | United States   | 1976-02-24 00:00:00.000 |
|           164 | Wang, Gabriel      | M                | M        | Partial College | Skilled Manual | North America | Spring Valley  | California | United States   | 1974-12-20 00:00:00.000 |
|           735 | Chen, Omar         | M                | M        | Partial College | Skilled Manual | North America | Coronado       | California | United States   | 1959-08-25 00:00:00.000 |
|           737 | Sanchez, Sebastian | M                | M        | Partial College | Skilled Manual | North America | Fremont        | California | United States   | 1959-09-25 00:00:00.000 |
|           867 | Scott, Lucas       | M                | M        | Partial College | Skilled Manual | North America | Glendale       | California | United States   | 1961-07-02 00:00:00.000 |
|           939 | Alexander, Seth    | M                | M        | Partial College | Skilled Manual | North America | Daly City      | California | United States   | 1977-09-21 00:00:00.000 |
|           946 | Huang, Dennis      | M                | M        | Partial College | Skilled Manual | North America | Concord        | California | United States   | 1980-09-11 00:00:00.000 |


Table: InternetSales
|   StoreKey |   ProductKey |   CustomerKey |   Quantity |   Unit Price |   Unit Discount |   Unit Cost |   Net Price | Order Date              | Due Date                | Delivery Date           | Nombre del Producto                  |
|-----------:|-------------:|--------------:|-----------:|-------------:|----------------:|------------:|------------:|:------------------------|:------------------------|:------------------------|:-------------------------------------|
|        199 |         1316 |         18768 |          1 |         9.99 |               0 |        5.09 |        9.99 | 2007-05-02 00:00:00.000 | 2007-05-15 00:00:00.000 | 2007-05-10 00:00:00.000 | Contoso Single-line phones E10 Black |
|        199 |         1316 |         18768 |          1 |         9.99 |               0 |        5.09 |        9.99 | 2007-05-02 00:00:00.000 | 2007-05-08 00:00:00.000 | 2007-05-11 00:00:00.000 | Contoso Single-line phones E10 Black |
|        199 |         1316 |         18768 |          1 |         9.99 |               0 |        5.09 |        9.99 | 2007-05-02 00:00:00.000 | 2007-05-09 00:00:00.000 | 2007-05-12 00:00:00.000 | Contoso Single-line phones E10 Black |
|        199 |         1316 |         18768 |          1 |         9.99 |               0 |        5.09 |        9.99 | 2007-05-02 00:00:00.000 | 2007-05-11 00:00:00.000 | 2007-05-14 00:00:00.000 | Contoso Single-line phones E10 Black |
|        306 |         2505 |         19041 |          1 |         9.99 |               0 |        5.09 |        9.99 | 2007-07-01 00:00:00.000 | 2007-07-09 00:00:00.000 | 2007-07-10 00:00:00.000 | Contoso Touch Stylus Pen E150 Red    |
|        306 |         2505 |         19041 |          1 |         9.99 |               0 |        5.09 |        9.99 | 2007-07-01 00:00:00.000 | 2007-07-10 00:00:00.000 | 2007-07-11 00:00:00.000 | Contoso Touch Stylus Pen E150 Red    |
|        306 |         2505 |         19041 |          1 |         9.99 |               0 |        5.09 |        9.99 | 2007-07-01 00:00:00.000 | 2007-07-11 00:00:00.000 | 2007-07-12 00:00:00.000 | Contoso Touch Stylus Pen E150 Red    |
|        306 |         2505 |         19041 |          1 |         9.99 |               0 |        5.09 |        9.99 | 2007-07-01 00:00:00.000 | 2007-07-12 00:00:00.000 | 2007-07-13 00:00:00.000 | Contoso Touch Stylus Pen E150 Red    |
|        306 |         2505 |         19041 |          1 |         9.99 |               0 |        5.09 |        9.99 | 2007-07-01 00:00:00.000 | 2007-07-14 00:00:00.000 | 2007-07-08 00:00:00.000 | Contoso Touch Stylus Pen E150 Red    |
|        306 |         2505 |         19041 |          1 |         9.99 |               0 |        5.09 |        9.99 | 2007-07-01 00:00:00.000 | 2007-07-07 00:00:00.000 | 2007-07-09 00:00:00.000 | Contoso Touch Stylus Pen E150 Red    |


Table: Para╠ümetro
|   Parámetro |
|------------:|
|         1   |
|         1.1 |
|         1.2 |


Table: PresupuestoCompras
| Region   | Area    | Gerente   | Periodo   |   Monto |   Año |   Mes |
|:---------|:--------|:----------|:----------|--------:|------:|------:|
| NOA      | Compras | Juan      | 2019-01   |   42108 |  2019 |     1 |
| NOA      | Compras | Juan      | 2019-02   |   44915 |  2019 |     2 |
| NOA      | Compras | Juan      | 2019-03   |   23592 |  2019 |     3 |
| NOA      | Compras | Juan      | 2019-04   |   46121 |  2019 |     4 |
| NOA      | Compras | Juan      | 2019-05   |   91860 |  2019 |     5 |
| NOA      | Compras | Juan      | 2019-06   |   92093 |  2019 |     6 |
| NOA      | Compras | Juan      | 2019-07   |   62691 |  2019 |     7 |
| NOA      | Compras | Juan      | 2019-08   |   24626 |  2019 |     8 |
| NOA      | Compras | Juan      | 2019-09   |   84675 |  2019 |     9 |
| NOA      | Compras | Juan      | 2019-10   |   50597 |  2019 |    10 |


Table: Product
|   ProductKey | Product Name                                                |   ProductSubcategoryKey | Manufacturer   | Brand   | Color   |   Unit Cost |   Unit Price | Available Date          | Cantidad Ventas   |
|-------------:|:------------------------------------------------------------|------------------------:|:---------------|:--------|:--------|------------:|-------------:|:------------------------|:------------------|
|          743 | Contoso Rechargeable Battery E100 Black                     |                      22 | Contoso, Ltd   | Contoso | Black   |        6.6  |        12.95 | 2005-04-16 00:00:00.000 | 12                |
|          744 | Contoso Dual USB Power Adapter - power adapter E300 Black   |                      22 | Contoso, Ltd   | Contoso | Black   |       20.34 |        39.9  | 2006-02-05 00:00:00.000 |                   |
|          745 | Contoso Car power adapter M90 Black                         |                      22 | Contoso, Ltd   | Contoso | Black   |        9.17 |        19.95 | 2005-01-03 00:00:00.000 | 14                |
|          746 | Contoso Notebook Peripheral Kit M69 Black                   |                      22 | Contoso, Ltd   | Contoso | Black   |        7.59 |        16.5  | 2006-07-13 00:00:00.000 | 9                 |
|          747 | Contoso Mouse Lock Bundle E200 Black                        |                      22 | Contoso, Ltd   | Contoso | Black   |        6.6  |        12.95 | 2006-04-16 00:00:00.000 |                   |
|          748 | Contoso Education Supplies Bundle E200 Black                |                      22 | Contoso, Ltd   | Contoso | Black   |        6.88 |        13.5  | 2006-03-02 00:00:00.000 | 2                 |
|          749 | Contoso Laptop Starter Bundle M200 Black                    |                      22 | Contoso, Ltd   | Contoso | Black   |        7.59 |        16.5  | 2007-11-13 00:00:00.000 | 6                 |
|          750 | Contoso Education Essentials Bundle M300 Black              |                      22 | Contoso, Ltd   | Contoso | Black   |        4.37 |         9.5  | 2006-12-31 00:00:00.000 |                   |
|          751 | Contoso Desktop Alternative Bundle E200 Black               |                      22 | Contoso, Ltd   | Contoso | Black   |        5.86 |        11.5  | 2005-06-16 00:00:00.000 | 2                 |
|          752 | Contoso Power Inverter - DC to AC power inverter E900 Black |                      22 | Contoso, Ltd   | Contoso | Black   |        4.84 |         9.5  | 2006-09-03 00:00:00.000 | 8                 |


Table: ProductCategory
|   ProductCategoryKey | Category                      |
|---------------------:|:------------------------------|
|                    1 | Audio                         |
|                    2 | TV and Video                  |
|                    3 | Computers                     |
|                    4 | Cameras and camcorders        |
|                    5 | Cell phones                   |
|                    6 | Music, Movies and Audio Books |
|                    7 | Games and Toys                |
|                    8 | Home Appliances               |


Table: ProductSubCategory
|   ProductSubcategoryKey | Subcategory          |   ProductCategoryKey |
|------------------------:|:---------------------|---------------------:|
|                       1 | MP4&MP3              |                    1 |
|                       2 | Recorder             |                    1 |
|                       3 | Radio                |                    1 |
|                       4 | Recording Pen        |                    1 |
|                       5 | Headphones           |                    1 |
|                       6 | Bluetooth Headphones |                    1 |
|                       7 | Speakers             |                    1 |
|                       8 | Audio Accessories    |                    1 |
|                       9 | Televisions          |                    2 |
|                      10 | VCD & DVD            |                    2 |


Table: Stores
| Store Type   | Store Name                 | Continent     | City       | State         | CountryRegion   |   Employees |   Selling Area | Last Remodel Date       |   StoreKey |
|:-------------|:---------------------------|:--------------|:-----------|:--------------|:----------------|------------:|---------------:|:------------------------|-----------:|
| Store        | Contoso Spokane Store      | North America | Spokane    | Washington    | United States   |          25 |            700 | 2009-06-17 00:00:00.000 |         17 |
| Store        | Contoso Redmond Store      | North America | Redmond    | Washington    | United States   |          33 |            560 | 2009-06-17 00:00:00.000 |          5 |
| Store        | Contoso Renton Store       | North America | Renton     | Washington    | United States   |          22 |            500 | 2009-06-17 00:00:00.000 |         15 |
| Store        | Contoso Seattle No.2 Store | North America | Seattle    | Washington    | United States   |          25 |            700 | 2009-06-17 00:00:00.000 |          2 |
| Store        | Contoso Attleboro Store    | North America | Attleboro  | Massachusetts | United States   |          19 |            455 | 2009-06-17 00:00:00.000 |        150 |
| Store        | Contoso Aurora Store       | North America | Aurora     | Colorado      | United States   |          25 |            700 | 2009-06-17 00:00:00.000 |         40 |
| Store        | Contoso Back River Store   | North America | Back River | Maryland      | United States   |          33 |            560 | 2009-06-17 00:00:00.000 |        197 |
| Store        | Contoso Baltimore Store    | North America | Baltimore  | Maryland      | United States   |          17 |            460 | 2009-06-17 00:00:00.000 |        192 |
| Store        | Contoso Bar Harbor Store   | North America | Bar Harbor | Maine         | United States   |          47 |           1125 | 2009-06-17 00:00:00.000 |        167 |
| Store        | Contoso Bayonne Store      | North America | Bayonne    | New Jersey    | United States   |          47 |           1125 | 2009-06-17 00:00:00.000 |        137 |


Table: TablaFecha
| Fecha                   |   Año |   IdMes | Mes   |   Dia | Ultimo 4 quarters                | Quarter   | StartOfMonth            |
|:------------------------|------:|--------:|:------|------:|:---------------------------------|:----------|:------------------------|
| 2008-07-01 00:00:00.000 |  2008 |       7 | julio |     1 | From last 4 quarter to firt date | 2008Q3    | 2008-07-01 00:00:00.000 |
| 2008-07-02 00:00:00.000 |  2008 |       7 | julio |     2 | From last 4 quarter to firt date | 2008Q3    | 2008-07-01 00:00:00.000 |
| 2008-07-03 00:00:00.000 |  2008 |       7 | julio |     3 | From last 4 quarter to firt date | 2008Q3    | 2008-07-01 00:00:00.000 |
| 2008-07-04 00:00:00.000 |  2008 |       7 | julio |     4 | From last 4 quarter to firt date | 2008Q3    | 2008-07-01 00:00:00.000 |
| 2008-07-05 00:00:00.000 |  2008 |       7 | julio |     5 | From last 4 quarter to firt date | 2008Q3    | 2008-07-01 00:00:00.000 |
| 2008-07-06 00:00:00.000 |  2008 |       7 | julio |     6 | From last 4 quarter to firt date | 2008Q3    | 2008-07-01 00:00:00.000 |
| 2008-07-07 00:00:00.000 |  2008 |       7 | julio |     7 | From last 4 quarter to firt date | 2008Q3    | 2008-07-01 00:00:00.000 |
| 2008-07-08 00:00:00.000 |  2008 |       7 | julio |     8 | From last 4 quarter to firt date | 2008Q3    | 2008-07-01 00:00:00.000 |
| 2008-07-09 00:00:00.000 |  2008 |       7 | julio |     9 | From last 4 quarter to firt date | 2008Q3    | 2008-07-01 00:00:00.000 |
| 2008-07-10 00:00:00.000 |  2008 |       7 | julio |    10 | From last 4 quarter to firt date | 2008Q3    | 2008-07-01 00:00:00.000 |


Table: TableCountConsecutive
| Bar       |   Amount | Fecha                   |
|:----------|---------:|:------------------------|
| Patagonia |        8 | 2007-01-01 00:00:00.000 |
| Patagonia |        7 | 2007-02-01 00:00:00.000 |
| Patagonia |        6 | 2007-03-01 00:00:00.000 |
| Patagonia |        5 | 2007-04-01 00:00:00.000 |
| Patagonia |        2 | 2007-05-01 00:00:00.000 |
| Patagonia |        3 | 2007-06-01 00:00:00.000 |
| Patagonia |        4 | 2007-07-01 00:00:00.000 |
| Patagonia |        7 | 2007-08-01 00:00:00.000 |
| Patagonia |        5 | 2007-09-01 00:00:00.000 |
| Patagonia |        3 | 2007-10-01 00:00:00.000 |


Table: TableRLS
| Mail                   | Country       |
|:-----------------------|:--------------|
| park@ladataweb.com.ar  | China         |
| jan@ladataweb.com.ar   | China         |
| jonas@ladataweb.com.ar | Germany       |
| john@ladataweb.com.ar  | United States |
| east@ladataweb.com.ar  | Germany       |
| east@ladataweb.com.ar  | China         |


Table: TableTypes
|   Binary | Bool   |   Int |   Decimal |   FixedDecimal | Text   | Date                    | DateTime                | Time                    |   Duration |   Percentage | TimeZone                |
|---------:|:-------|------:|----------:|---------------:|:-------|:------------------------|:------------------------|:------------------------|-----------:|-------------:|:------------------------|
|        0 | True   |     1 |    1.23   |            1.2 | asd    | 2020-01-01 00:00:00.000 | 2020-01-01 01:00:00.000 | 1899-12-30 01:00:00.000 |        345 |         0.34 | 2020-01-01 01:00:00.000 |
|        1 | False  |     5 |   32.1255 |            1.6 | qwe    | 2020-02-02 00:00:00.000 | 2020-02-02 02:00:00.000 | 1899-12-30 05:00:00.000 |        343 |         0.23 | 2020-01-01 01:00:00.000 |


Table: UserByPage
| UserConnected               | PagePermission   |
|:----------------------------|:-----------------|
| iceclimber@ladataweb.com.ar | Switcher         |
| iceclimber@ladataweb.com.ar | Navegacion       |
| iceclimber@ladataweb.com.ar | WhatIfParameters |
| daxman@ladataweb.com.ar     | FormatPart2      |
| daxman@ladataweb.com.ar     | All vs           |
| daxman@ladataweb.com.ar     | AlertMessage     |
| daxman@ladataweb.com.ar     | Error in Totals  |
| admin@ladataweb.com.ar      | Todo             |

 


tables: name: Cambiador_unidades
data: Cambiador_unidades.csv
name: Customer
data: Customer.csv
name: InternetSales
data: InternetSales.csv
name: Para╠ümetro
data: Para╠ümetro.csv
name: PresupuestoCompras
data: PresupuestoCompras.csv
name: Product
data: Product.csv
name: ProductCategory
data: ProductCategory.csv
name: ProductSubCategory
data: ProductSubCategory.csv
name: Stores
data: Stores.csv
name: TablaFecha
data: TablaFecha.csv
name: TableCountConsecutive
data: TableCountConsecutive.csv
name: TableRLS
data: TableRLS.csv
name: TableTypes
data: TableTypes.csv
name: UserByPage
data: UserByPage.csv
label: InternetSales
ProductKey
Product
ProductKey
InternetSales
CustomerKey
Customer
CustomerKey
Product
ProductSubcategoryKey
ProductSubCategory
ProductSubcategoryKey
ProductSubCategory
ProductCategoryKey
ProductCategory
ProductCategoryKey
InternetSales
Order Date
TablaFecha
Fecha
InternetSales
StoreKey
Stores
StoreKey
Stores
CountryRegion
TableRLS
Country
TableCountConsecutive
Fecha
TablaFecha
Fecha
output: {
    "joins": [
        {
            "from_table": "InternetSales",
            "from_column": "ProductKey",
            "to_table": "Product",
            "to_column": "ProductKey"
        },
        {
            "from_table": "InternetSales",
            "from_column": "CustomerKey",
            "to_table": "Customer",
            "to_column": "CustomerKey"
        },
        {
            "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": "InternetSales",
            "from_column": "Order Date",
            "to_table": "TablaFecha",
            "to_column": "Fecha"
        },
        {
            "from_table": "InternetSales",
            "from_column": "StoreKey",
            "to_table": "Stores",
            "to_column": "StoreKey"
        },
        {
            "from_table": "Stores",
            "from_column": "CountryRegion",
            "to_table": "TableRLS",
            "to_column": "Country"
        },
        {
            "from_table": "TableCountConsecutive",
            "from_column": "Fecha",
            "to_table": "TablaFecha",
            "to_column": "Fecha"
        }
    ]
}