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: Calendario
| Fecha                   |
|:------------------------|
| 2018-01-01 00:00:00.000 |
| 2018-01-02 00:00:00.000 |
| 2018-01-03 00:00:00.000 |
| 2018-01-04 00:00:00.000 |
| 2018-01-05 00:00:00.000 |
| 2018-01-06 00:00:00.000 |
| 2018-01-07 00:00:00.000 |
| 2018-01-08 00:00:00.000 |
| 2018-01-09 00:00:00.000 |
| 2018-01-10 00:00:00.000 |


Table: Clientes
|   IdCliente | País      | Ciudad            |
|------------:|:----------|:------------------|
|           1 | Argentina | Buenos Aires      |
|           2 | Chile     | Santiago de Chile |
|           3 | Colombia  | Bogotá            |
|           4 | España    | Madrid            |
|           5 | España    | Santander         |
|           6 | España    | Valladolid        |
|           7 | México    | Guadalajara       |
|           8 | México    | Ciudad de México  |
|           9 | México    | Monterrey         |
|          10 | España    | Sevilla           |


Table: Productos
|   IdProducto | Categoría   | Color   | Tamaño   |   Prioridad |   Precio Catálogo |
|-------------:|:------------|:--------|:---------|------------:|------------------:|
|            1 | A           | Rojo    | Grande   |           0 |                13 |
|            2 | C           | Blanco  | Grande   |           1 |                24 |
|            3 | A           | Verde   | Grande   |           2 |                10 |
|            6 | C           | Gris    | Grande   |           0 |                34 |
|            9 | C           | Blanco  | Grande   |           3 |                16 |
|           12 | A           | Blanco  | Grande   |           0 |                14 |
|           14 | A           | Negro   | Grande   |           1 |                10 |
|           15 | A           | Gris    | Grande   |           1 |                18 |
|           16 | B           | Blanco  | Grande   |           1 |                24 |
|           17 | B           | Verde   | Grande   |           2 |                10 |


Table: Ventas
|   IdProducto |   IdCliente | Fecha                   |   Cantidades |   Precio |
|-------------:|------------:|:------------------------|-------------:|---------:|
|           16 |           4 | 2018-06-22 00:00:00.000 |            1 |       15 |
|           42 |           2 | 2018-06-26 00:00:00.000 |            1 |       15 |
|            5 |           2 | 2018-06-26 00:00:00.000 |            1 |       15 |
|          111 |           4 | 2018-08-03 00:00:00.000 |            1 |       15 |
|           57 |           4 | 2018-08-03 00:00:00.000 |            1 |       15 |
|          121 |           3 | 2018-08-09 00:00:00.000 |            1 |       15 |
|          108 |           3 | 2018-08-09 00:00:00.000 |            1 |       15 |
|           12 |           3 | 2018-08-09 00:00:00.000 |            1 |       15 |
|            8 |           2 | 2018-09-13 00:00:00.000 |            1 |       15 |
|           50 |           2 | 2018-09-13 00:00:00.000 |            1 |       15 |

 


tables: name: Calendario
data: Calendario.csv
name: Clientes
data: Clientes.csv
name: Productos
data: Productos.csv
name: Ventas
data: Ventas.csv
label: Ventas
IdCliente
Clientes
IdCliente
Ventas
IdProducto
Productos
IdProducto
Ventas
Fecha
Calendario
Fecha
output: {
    "joins": [
        {
            "from_table": "Ventas",
            "from_column": "IdCliente",
            "to_table": "Clientes",
            "to_column": "IdCliente"
        },
        {
            "from_table": "Ventas",
            "from_column": "IdProducto",
            "to_table": "Productos",
            "to_column": "IdProducto"
        },
        {
            "from_table": "Ventas",
            "from_column": "Fecha",
            "to_table": "Calendario",
            "to_column": "Fecha"
        }
    ]
}