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: Atributos Tienda
|   tienda_ID | tienda_nombre    | telefono_tienda   | email_tienda         | calle_tienda        | ciudad_tienda   | estado_tienda   |   codigopostal_tienda |   Metros Superficie | Horario       | Taller   |
|------------:|:-----------------|:------------------|:---------------------|:--------------------|:----------------|:----------------|----------------------:|--------------------:|:--------------|:---------|
|           1 | Santa Cruz Bikes | (831) 476-4321    | santacruz@bikes.shop | 3700 Portola Drive  | Santa Cruz      | CA              |                 95060 |                 550 | 08:00 a 21:00 | No       |
|           2 | Baldwin Bikes    | (516) 379-8888    | baldwin@bikes.shop   | 4200 Chestnut Lane  | Baldwin         | NY              |                 11432 |                 950 | 09:00 a 20:00 | Sí       |
|           3 | Rowlett Bikes    | (972) 530-5555    | rowlett@bikes.shop   | 8000 Fairway Avenue | Rowlett         | TX              |                 75088 |                 390 | 08:30 a 19:30 | No       |


Table: Categoria
|   categoria_ID | categoria_nombre    |
|---------------:|:--------------------|
|              1 | Children Bicycles   |
|              2 | Comfort Bicycles    |
|              3 | Cruisers Bicycles   |
|              4 | Cyclocross Bicycles |
|              5 | Electric Bikes      |
|              6 | Mountain Bikes      |
|              7 | Road Bikes          |


Table: Combinar1
| Source.Name   | venta_ID   | cliente_ID   | estado_pedido   | fecha_pedido   | fecha_requerido   | fecha_envio   | tienda_ID   | personal_ID   | item_ID   | producto_ID   | cantidad   | precio_venta   | descuento   |   producto_ID.1 | producto_nombre                       |   marca_ID |   categoria_ID |   modelo_año |   precio_lista | marca_nombre   | categoria_nombre   | Ventas Netas   |
|:--------------|:-----------|:-------------|:----------------|:---------------|:------------------|:--------------|:------------|:--------------|:----------|:--------------|:-----------|:---------------|:------------|----------------:|:--------------------------------------|-----------:|---------------:|-------------:|---------------:|:---------------|:-------------------|:---------------|
|               |            |              |                 |                |                   |               |             |               |           |               |            |                |             |               1 | Trek 820 - 2016                       |          9 |              6 |         2016 |         379.99 | Trek           | Mountain Bikes     |                |
|               |            |              |                 |                |                   |               |             |               |           |               |            |                |             |              16 | Electra Townie Original 7D EQ - 2016  |          1 |              3 |         2016 |         599.99 | Electra        | Cruisers Bicycles  |                |
|               |            |              |                 |                |                   |               |             |               |           |               |            |                |             |              30 | Surly Ice Cream Truck Frameset - 2017 |          8 |              6 |         2017 |         999.99 | Surly          | Mountain Bikes     |                |
|               |            |              |                 |                |                   |               |             |               |           |               |            |                |             |              73 | Sun Bicycles Brickell Tandem 7 - 2017 |          7 |              3 |         2017 |         749.99 | Sun Bicycles   | Cruisers Bicycles  |                |
|               |            |              |                 |                |                   |               |             |               |           |               |            |                |             |              74 | Electra Cruiser Lux 1 - 2017          |          1 |              3 |         2017 |         439.99 | Electra        | Cruisers Bicycles  |                |
|               |            |              |                 |                |                   |               |             |               |           |               |            |                |             |              83 | Trek Boy's Kickster - 2015/2017       |          9 |              1 |         2017 |         149.99 | Trek           | Children Bicycles  |                |
|               |            |              |                 |                |                   |               |             |               |           |               |            |                |             |              94 | Haro Shredder Pro 20 - 2017           |          2 |              1 |         2017 |         249.99 | Haro           | Children Bicycles  |                |
|               |            |              |                 |                |                   |               |             |               |           |               |            |                |             |             121 | Surly Krampus Frameset - 2018         |          8 |              6 |         2018 |        2499.99 | Surly          | Mountain Bikes     |                |
|               |            |              |                 |                |                   |               |             |               |           |               |            |                |             |             125 | Trek Kids' Dual Sport - 2018          |          9 |              6 |         2018 |         469.99 | Trek           | Mountain Bikes     |                |
|               |            |              |                 |                |                   |               |             |               |           |               |            |                |             |             154 | Trek Domane SLR 6 Disc Women's - 2018 |          9 |              7 |         2018 |        5499.99 | Trek           | Road Bikes         |                |


Table: Marca
|   marca_ID | marca_nombre   |
|-----------:|:---------------|
|          1 | Electra        |
|          2 | Haro           |
|          3 | Heller         |
|          4 | Pure Cycles    |
|          5 | Ritchey        |
|          6 | Strider        |
|          7 | Sun Bicycles   |
|          8 | Surly          |
|          9 | Trek           |


Table: Personal
|   personal_ID | Nombre     | Apellido   | eMail                         | Telefono       | Apellido Nombre    | Nombre Apellido    |
|--------------:|:-----------|:-----------|:------------------------------|:---------------|:-------------------|:-------------------|
|             1 | Fabiola    | Jackson    | fabiola.jackson@bikes.shop    | (831) 555-5554 | Jackson,Fabiola    | Fabiola Jackson    |
|             2 | Mireya     | Copeland   | mireya.copeland@bikes.shop    | (831) 555-5555 | Copeland,Mireya    | Mireya Copeland    |
|             3 | Genna      | Serrano    | genna.serrano@bikes.shop      | (831) 555-5556 | Serrano,Genna      | Genna Serrano      |
|             4 | Virgie     | Wiggins    | virgie.wiggins@bikes.shop     | (831) 555-5557 | Wiggins,Virgie     | Virgie Wiggins     |
|             5 | Jannette   | David      | jannette.david@bikes.shop     | (516) 379-4444 | David,Jannette     | Jannette David     |
|             6 | Marcelene  | Boyer      | marcelene.boyer@bikes.shop    | (516) 379-4445 | Boyer,Marcelene    | Marcelene Boyer    |
|             7 | Venita     | Daniel     | venita.daniel@bikes.shop      | (516) 379-4446 | Daniel,Venita      | Venita Daniel      |
|             8 | Kali       | Vargas     | kali.vargas@bikes.shop        | (972) 530-5555 | Vargas,Kali        | Kali Vargas        |
|             9 | Layla      | Terrell    | layla.terrell@bikes.shop      | (972) 530-5556 | Terrell,Layla      | Layla Terrell      |
|            10 | Bernardine | Houston    | bernardine.houston@bikes.shop | (972) 530-5557 | Houston,Bernardine | Bernardine Houston |


Table: Productos no Vendidos 2018
|   producto_ID | producto_nombre                       |   marca_ID |   categoria_ID |   modelo_año |   precio_lista | marca_nombre   | categoria_nombre   | cantidad   |
|--------------:|:--------------------------------------|-----------:|---------------:|-------------:|---------------:|:---------------|:-------------------|:-----------|
|             1 | Trek 820 - 2016                       |          9 |              6 |         2016 |         379.99 | Trek           | Mountain Bikes     |            |
|            16 | Electra Townie Original 7D EQ - 2016  |          1 |              3 |         2016 |         599.99 | Electra        | Cruisers Bicycles  |            |
|            30 | Surly Ice Cream Truck Frameset - 2017 |          8 |              6 |         2017 |         999.99 | Surly          | Mountain Bikes     |            |
|            73 | Sun Bicycles Brickell Tandem 7 - 2017 |          7 |              3 |         2017 |         749.99 | Sun Bicycles   | Cruisers Bicycles  |            |
|            74 | Electra Cruiser Lux 1 - 2017          |          1 |              3 |         2017 |         439.99 | Electra        | Cruisers Bicycles  |            |
|            83 | Trek Boy's Kickster - 2015/2017       |          9 |              1 |         2017 |         149.99 | Trek           | Children Bicycles  |            |
|            94 | Haro Shredder Pro 20 - 2017           |          2 |              1 |         2017 |         249.99 | Haro           | Children Bicycles  |            |
|           121 | Surly Krampus Frameset - 2018         |          8 |              6 |         2018 |        2499.99 | Surly          | Mountain Bikes     |            |
|           125 | Trek Kids' Dual Sport - 2018          |          9 |              6 |         2018 |         469.99 | Trek           | Mountain Bikes     |            |
|           154 | Trek Domane SLR 6 Disc Women's - 2018 |          9 |              7 |         2018 |        5499.99 | Trek           | Road Bikes         |            |


Table: Productos
|   producto_ID | producto_nombre                    |   marca_ID |   categoria_ID |   modelo_año |   precio_lista | marca_nombre   | categoria_nombre   |
|--------------:|:-----------------------------------|-----------:|---------------:|-------------:|---------------:|:---------------|:-------------------|
|           112 | Trek 820 - 2018                    |          9 |              6 |         2018 |         379.99 | Trek           | Mountain Bikes     |
|           113 | Trek Marlin 5 - 2018               |          9 |              6 |         2018 |         489.99 | Trek           | Mountain Bikes     |
|           114 | Trek Marlin 6 - 2018               |          9 |              6 |         2018 |         579.99 | Trek           | Mountain Bikes     |
|           115 | Trek Fuel EX 8 29 - 2018           |          9 |              6 |         2018 |        3199.99 | Trek           | Mountain Bikes     |
|           116 | Trek Marlin 7 - 2017/2018          |          9 |              6 |         2018 |         749.99 | Trek           | Mountain Bikes     |
|           117 | Trek Ticket S Frame - 2018         |          9 |              6 |         2018 |        1469.99 | Trek           | Mountain Bikes     |
|           118 | Trek X-Caliber 8 - 2018            |          9 |              6 |         2018 |         999.99 | Trek           | Mountain Bikes     |
|           119 | Trek Kids' Neko - 2018             |          9 |              6 |         2018 |         469.99 | Trek           | Mountain Bikes     |
|           120 | Trek Fuel EX 7 29 - 2018           |          9 |              6 |         2018 |        2499.99 | Trek           | Mountain Bikes     |
|           123 | Trek Farley Carbon Frameset - 2018 |          9 |              6 |         2018 |         999.99 | Trek           | Mountain Bikes     |


Table: Ventas 2018 por Tienda y Categoria
| categoria_nombre    | tienda_nombre   |   Resumen Ventasd 2018 |
|:--------------------|:----------------|-----------------------:|
| Cruisers Bicycles   | Baldwin Bikes   |                 151981 |
| Electric Bikes      | Baldwin Bikes   |                 189462 |
| Children Bicycles   | Baldwin Bikes   |                  37054 |
| Comfort Bicycles    | Baldwin Bikes   |                  38296 |
| Road Bikes          | Baldwin Bikes   |                 416457 |
| Mountain Bikes      | Baldwin Bikes   |                 269908 |
| Cyclocross Bicycles | Baldwin Bikes   |                  42296 |
| Cyclocross Bicycles | Rowlett Bikes   |                   7089 |
| Electric Bikes      | Rowlett Bikes   |                  50668 |
| Children Bicycles   | Rowlett Bikes   |                   5035 |


Table: Ventas 2018
| Source.Name     |   venta_ID |   cliente_ID |   estado_pedido | fecha_pedido            | fecha_requerido         | fecha_envio   |   tienda_ID |   personal_ID |   item_ID |   producto_ID |   cantidad |   precio_venta |   descuento |   Ventas Netas |
|:----------------|-----------:|-------------:|----------------:|:------------------------|:------------------------|:--------------|------------:|--------------:|----------:|--------------:|-----------:|---------------:|------------:|---------------:|
| Ventas2018.xlsx |       1479 |           23 |               2 | 2018-04-01 00:00:00.000 | 2018-04-01 00:00:00.000 |               |           2 |             7 |         1 |           252 |          1 |        2999.99 |        0.05 |           2850 |
| Ventas2018.xlsx |       1479 |           23 |               2 | 2018-04-01 00:00:00.000 | 2018-04-01 00:00:00.000 |               |           2 |             7 |         2 |           256 |          1 |         899.99 |        0.1  |            810 |
| Ventas2018.xlsx |       1480 |           27 |               2 | 2018-04-01 00:00:00.000 | 2018-04-01 00:00:00.000 |               |           2 |             7 |         1 |           308 |          2 |         749.99 |        0.1  |           1350 |
| Ventas2018.xlsx |       1480 |           27 |               2 | 2018-04-01 00:00:00.000 | 2018-04-01 00:00:00.000 |               |           2 |             7 |         2 |            82 |          2 |         659.99 |        0.1  |           1188 |
| Ventas2018.xlsx |       1480 |           27 |               2 | 2018-04-01 00:00:00.000 | 2018-04-01 00:00:00.000 |               |           2 |             7 |         3 |            92 |          2 |         209.99 |        0.07 |            391 |
| Ventas2018.xlsx |       1480 |           27 |               2 | 2018-04-01 00:00:00.000 | 2018-04-01 00:00:00.000 |               |           2 |             7 |         4 |           225 |          2 |         959.99 |        0.07 |           1786 |
| Ventas2018.xlsx |       1482 |           94 |               1 | 2018-04-01 00:00:00.000 | 2018-04-01 00:00:00.000 |               |           2 |             7 |         1 |            48 |          1 |        1499.99 |        0.1  |           1350 |
| Ventas2018.xlsx |       1482 |           94 |               1 | 2018-04-01 00:00:00.000 | 2018-04-01 00:00:00.000 |               |           2 |             7 |         2 |           113 |          1 |         489.99 |        0.05 |            465 |
| Ventas2018.xlsx |       1482 |           94 |               1 | 2018-04-01 00:00:00.000 | 2018-04-01 00:00:00.000 |               |           2 |             7 |         3 |            58 |          2 |        4999.99 |        0.07 |           9300 |
| Ventas2018.xlsx |       1482 |           94 |               1 | 2018-04-01 00:00:00.000 | 2018-04-01 00:00:00.000 |               |           2 |             7 |         4 |            40 |          1 |        4999.99 |        0.05 |           4750 |


Table: Ventas
| Source.Name     |   venta_ID |   cliente_ID |   estado_pedido | fecha_pedido            | fecha_requerido         | fecha_envio             |   tienda_ID |   personal_ID |   item_ID |   producto_ID |   cantidad |   precio_venta |   descuento |
|:----------------|-----------:|-------------:|----------------:|:------------------------|:------------------------|:------------------------|------------:|--------------:|----------:|--------------:|-----------:|---------------:|------------:|
| Ventas2017.xlsx |        637 |          512 |               4 | 2017-01-03 00:00:00.000 | 2017-01-05 00:00:00.000 | 2017-01-05 00:00:00.000 |           2 |             6 |         1 |             9 |          1 |        2999.99 |        0.1  |
| Ventas2017.xlsx |        639 |          550 |               4 | 2017-01-06 00:00:00.000 | 2017-01-07 00:00:00.000 | 2017-01-07 00:00:00.000 |           2 |             6 |         1 |            15 |          1 |         529.99 |        0.07 |
| Ventas2017.xlsx |        644 |          439 |               4 | 2017-01-08 00:00:00.000 | 2017-01-11 00:00:00.000 | 2017-01-10 00:00:00.000 |           2 |             6 |         1 |             9 |          1 |        2999.99 |        0.07 |
| Ventas2017.xlsx |        645 |         1199 |               4 | 2017-01-08 00:00:00.000 | 2017-01-11 00:00:00.000 | 2017-01-10 00:00:00.000 |           2 |             6 |         1 |            99 |          1 |         299.99 |        0.07 |
| Ventas2017.xlsx |        648 |          684 |               4 | 2017-01-09 00:00:00.000 | 2017-01-11 00:00:00.000 | 2017-01-11 00:00:00.000 |           2 |             6 |         1 |            24 |          1 |         549.99 |        0.07 |
| Ventas2017.xlsx |        665 |           29 |               4 | 2017-01-21 00:00:00.000 | 2017-01-22 00:00:00.000 | 2017-01-23 00:00:00.000 |           2 |             6 |         1 |            58 |          1 |        4999.99 |        0.07 |
| Ventas2017.xlsx |        670 |          361 |               4 | 2017-01-24 00:00:00.000 | 2017-01-25 00:00:00.000 | 2017-01-25 00:00:00.000 |           2 |             6 |         1 |           108 |          1 |         449.99 |        0.1  |
| Ventas2017.xlsx |        682 |          614 |               4 | 2017-01-29 00:00:00.000 | 2017-01-30 00:00:00.000 | 2017-01-30 00:00:00.000 |           2 |             6 |         1 |            39 |          1 |        1499.99 |        0.2  |
| Ventas2017.xlsx |        684 |          762 |               4 | 2017-01-31 00:00:00.000 | 2017-02-01 00:00:00.000 | 2017-02-02 00:00:00.000 |           2 |             6 |         1 |            56 |          1 |        5499.99 |        0.07 |
| Ventas2017.xlsx |        710 |          295 |               4 | 2017-02-13 00:00:00.000 | 2017-02-15 00:00:00.000 | 2017-02-16 00:00:00.000 |           2 |             6 |         1 |            42 |          1 |        2299.99 |        0.05 |

 


tables: name: Atributos Tienda
data: Atributos Tienda.csv
name: Categoria
data: Categoria.csv
name: Combinar1
data: Combinar1.csv
name: Marca
data: Marca.csv
name: Personal
data: Personal.csv
name: Productos no Vendidos 2018
data: Productos no Vendidos 2018.csv
name: Productos
data: Productos.csv
name: Ventas 2018 por Tienda y Categoria
data: Ventas 2018 por Tienda y Categoria.csv
name: Ventas 2018
data: Ventas 2018.csv
name: Ventas
data: Ventas.csv
label: Ventas
personal_ID
Personal
personal_ID
Ventas 2018
personal_ID
Personal
personal_ID
Productos
categoria_ID
Categoria
categoria_ID
Productos no Vendidos 2018
categoria_ID
Categoria
categoria_ID
Ventas 2018 por Tienda y Categoria
categoria_nombre
Categoria
categoria_nombre
Productos
marca_ID
Marca
marca_ID
Productos no Vendidos 2018
marca_ID
Marca
marca_ID
Ventas
producto_ID
Productos
producto_ID
Ventas 2018
producto_ID
Productos
producto_ID
Ventas
tienda_ID
Atributos Tienda
tienda_ID
Ventas 2018
tienda_ID
Atributos Tienda
tienda_ID
Combinar1
categoria_ID
Categoria
categoria_ID
Combinar1
marca_ID
Marca
marca_ID
output: {
    "joins": [
        {
            "from_table": "Ventas",
            "from_column": "personal_ID",
            "to_table": "Personal",
            "to_column": "personal_ID"
        },
        {
            "from_table": "Ventas 2018",
            "from_column": "personal_ID",
            "to_table": "Personal",
            "to_column": "personal_ID"
        },
        {
            "from_table": "Productos",
            "from_column": "categoria_ID",
            "to_table": "Categoria",
            "to_column": "categoria_ID"
        },
        {
            "from_table": "Productos no Vendidos 2018",
            "from_column": "categoria_ID",
            "to_table": "Categoria",
            "to_column": "categoria_ID"
        },
        {
            "from_table": "Ventas 2018 por Tienda y Categoria",
            "from_column": "categoria_nombre",
            "to_table": "Categoria",
            "to_column": "categoria_nombre"
        },
        {
            "from_table": "Productos",
            "from_column": "marca_ID",
            "to_table": "Marca",
            "to_column": "marca_ID"
        },
        {
            "from_table": "Productos no Vendidos 2018",
            "from_column": "marca_ID",
            "to_table": "Marca",
            "to_column": "marca_ID"
        },
        {
            "from_table": "Ventas",
            "from_column": "producto_ID",
            "to_table": "Productos",
            "to_column": "producto_ID"
        },
        {
            "from_table": "Ventas 2018",
            "from_column": "producto_ID",
            "to_table": "Productos",
            "to_column": "producto_ID"
        },
        {
            "from_table": "Ventas",
            "from_column": "tienda_ID",
            "to_table": "Atributos Tienda",
            "to_column": "tienda_ID"
        },
        {
            "from_table": "Ventas 2018",
            "from_column": "tienda_ID",
            "to_table": "Atributos Tienda",
            "to_column": "tienda_ID"
        },
        {
            "from_table": "Combinar1",
            "from_column": "categoria_ID",
            "to_table": "Categoria",
            "to_column": "categoria_ID"
        },
        {
            "from_table": "Combinar1",
            "from_column": "marca_ID",
            "to_table": "Marca",
            "to_column": "marca_ID"
        }
    ]
}