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
| Data                    |   Mês_num |   Dia_num | Mês_nome   |
|:------------------------|----------:|----------:|:-----------|
| 1900-01-01 00:00:00.000 |         1 |         1 | jan        |
| 1900-01-02 00:00:00.000 |         1 |         2 | jan        |
| 1900-01-03 00:00:00.000 |         1 |         3 | jan        |
| 1900-01-04 00:00:00.000 |         1 |         4 | jan        |
| 1900-01-05 00:00:00.000 |         1 |         5 | jan        |
| 1900-01-06 00:00:00.000 |         1 |         6 | jan        |
| 1900-01-07 00:00:00.000 |         1 |         7 | jan        |
| 1900-01-08 00:00:00.000 |         1 |         8 | jan        |
| 1900-01-09 00:00:00.000 |         1 |         9 | jan        |
| 1900-01-10 00:00:00.000 |         1 |        10 | jan        |


Table: desafiofinal_dw dim_clientes
|   sk_clientes |   version | date_from               | date_to                 | idcustomer   | customerName         |   idcity | city   |   idstate | state   |   idcountry | country   |
|--------------:|----------:|:------------------------|:------------------------|:-------------|:---------------------|---------:|:-------|----------:|:--------|------------:|:----------|
|           368 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | CM-2655      | Corinna Mitchell     |     4112 | Adana  |        17 | Adana   |          12 | Turkey    |
|           369 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | CS-2355      | Christine Sundaresam |     4112 | Adana  |        17 | Adana   |          12 | Turkey    |
|           370 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | EP-3915      | Emily Phan           |     4112 | Adana  |        17 | Adana   |          12 | Turkey    |
|           371 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | LB-6795      | Laurel Beltran       |     4112 | Adana  |        17 | Adana   |          12 | Turkey    |
|           372 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | LO-7170      | Lori Olson           |     4112 | Adana  |        17 | Adana   |          12 | Turkey    |
|           373 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | LS-6945      | Linda Southworth     |     4112 | Adana  |        17 | Adana   |          12 | Turkey    |
|           374 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | MO-7950      | Michael Oakman       |     4112 | Adana  |        17 | Adana   |          12 | Turkey    |
|           375 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | MY-8295      | Muhammed Yedwab      |     4112 | Adana  |        17 | Adana   |          12 | Turkey    |
|           376 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | SB-10290     | Sean Braxton         |     4112 | Adana  |        17 | Adana   |          12 | Turkey    |
|           377 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | TS-11610     | Troy Staebel         |     4112 | Adana  |        17 | Adana   |          12 | Turkey    |


Table: desafiofinal_dw dim_pedidos
|   sk_pedidos |   version | date_from               | date_to                 | idorder         | orderDate               | customer_idcustomer   |   idpriority | priority   |
|-------------:|----------:|:------------------------|:------------------------|:----------------|:------------------------|:----------------------|-------------:|:-----------|
|            1 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | CA-2011-138100  | 2011-09-15 00:00:00.000 | AA-10315              |            1 | Medium     |
|            2 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | CA-2014-147039  | 2014-06-30 00:00:00.000 | AA-10315              |            1 | Medium     |
|            3 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | ES-2012-2960821 | 2012-05-16 00:00:00.000 | AA-10315              |            1 | Medium     |
|            4 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | ID-2014-65824   | 2014-01-07 00:00:00.000 | AA-10315              |            1 | Medium     |
|            5 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | IN-2013-58152   | 2013-12-31 00:00:00.000 | AA-10315              |            1 | Medium     |
|            6 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | IN-2014-55191   | 2014-12-23 00:00:00.000 | AA-10315              |            1 | Medium     |
|            7 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | IT-2014-2944328 | 2014-06-24 00:00:00.000 | AA-10315              |            1 | Medium     |
|            8 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | MX-2013-140354  | 2013-02-05 00:00:00.000 | AA-10315              |            1 | Medium     |
|           14 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | CA-2011-158064  | 2011-04-21 00:00:00.000 | AA-10375              |            1 | Medium     |
|           15 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | CA-2013-126613  | 2013-07-11 00:00:00.000 | AA-10375              |            1 | Medium     |


Table: desafiofinal_dw dim_produtos
|   sk_produtos |   version | date_from               | date_to                 | idproduct        | productName                               |   idsubCategory | subCategory   |   idcategory | category        |
|--------------:|----------:|:------------------------|:------------------------|:-----------------|:------------------------------------------|----------------:|:--------------|-------------:|:----------------|
|          4039 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | OFF-EAT-10000522 | Eaton Computer Printout Paper, Multicolor |              13 | Paper         |            2 | Office Supplies |
|          4040 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | OFF-EAT-10000652 | Eaton Computer Printout Paper, 8.5 x 11   |              13 | Paper         |            2 | Office Supplies |
|          4041 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | OFF-EAT-10000820 | Eaton Message Books, Multicolor           |              13 | Paper         |            2 | Office Supplies |
|          4042 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | OFF-EAT-10000854 | Eaton Parchment Paper, Recycled           |              13 | Paper         |            2 | Office Supplies |
|          4043 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | OFF-EAT-10001137 | Eaton Parchment Paper, 8.5 x 11           |              13 | Paper         |            2 | Office Supplies |
|          4044 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | OFF-EAT-10001303 | Eaton Message Books, Premium              |              13 | Paper         |            2 | Office Supplies |
|          4045 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | OFF-EAT-10001933 | Eaton Cards & Envelopes, Recycled         |              13 | Paper         |            2 | Office Supplies |
|          4046 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | OFF-EAT-10002068 | Eaton Note Cards, Premium                 |              13 | Paper         |            2 | Office Supplies |
|          4047 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | OFF-EAT-10002122 | Eaton Cards & Envelopes, Premium          |              13 | Paper         |            2 | Office Supplies |
|          4048 |         1 | 1900-01-01 00:00:00.000 | 2200-01-01 00:00:00.000 | OFF-EAT-10002674 | Eaton Memo Slips, Multicolor              |              13 | Paper         |            2 | Office Supplies |


Table: desafiofinal_dw fato_vendas
| category   | city    | country       | customerName     |   discount | idcustomer   | idorder        | idproduct       |   idsales | orderDate               | priority   | productName                                             |   profit |   quantity |   sales | shipDate                |   shippingCost | state    | subCategory   |   version |
|:-----------|:--------|:--------------|:-----------------|-----------:|:-------------|:---------------|:----------------|----------:|:------------------------|:-----------|:--------------------------------------------------------|---------:|-----------:|--------:|:------------------------|---------------:|:---------|:--------------|----------:|
| Furniture  | Chicago | United States | Russell DAscenzo |          0 | RD-19930     | MX-2011-168893 | FUR-BO-10004340 |      1788 | 2011-11-25 00:00:00.000 | Medium     | Safco Classic Bookcase, Mobile                          |   58.72  |          4 | 1175.12 | 2011-11-26 00:00:00.000 |         153.05 | Illinois | Bookcases     |         1 |
| Furniture  | Chicago | United States | Russell DAscenzo |          0 | RD-19930     | MX-2011-168893 | FUR-FU-10003237 |      1789 | 2011-11-25 00:00:00.000 | Medium     | Eldon Stacking Tray, Durable                            |    9.12  |          4 |   76.08 | 2011-11-26 00:00:00.000 |          10.03 | Illinois | Furnishings   |         1 |
| Furniture  | Chicago | United States | Charlotte Melton |          0 | CM-12190     | MX-2014-101469 | FUR-CH-10003107 |      1870 | 2014-07-30 00:00:00.000 | Medium     | Office Star Swivel Stool, Red                           |   64.92  |          2 |  231.92 | 2014-08-03 00:00:00.000 |          15.56 | Illinois | Chairs        |         1 |
| Furniture  | Chicago | United States | Arthur Gainer    |          0 | AG-10900     | CA-2013-160108 | FUR-BO-10003450 |      2529 | 2013-12-09 00:00:00.000 | Medium     | Bush Westfield Collection Bookcases, Dark Cherry Finish |   32.469 |          7 |  405.86 | 2013-12-13 00:00:00.000 |          29.51 | Illinois | Bookcases     |         1 |
| Furniture  | Chicago | United States | Arthur Gainer    |          0 | AG-10900     | CA-2013-160108 | FUR-CH-10002335 |      2530 | 2013-12-09 00:00:00.000 | Medium     | Hon Steel Folding Chair, Red                            |  176.803 |          3 |  680.01 | 2013-12-13 00:00:00.000 |          39.74 | Illinois | Chairs        |         1 |
| Furniture  | Chicago | United States | Gary Mitchum     |          0 | GM-14455     | US-2011-143231 | FUR-FU-10002501 |      2749 | 2011-12-31 00:00:00.000 | Medium     | Nu-Dell Executive Frame                                 |   23.384 |          5 |   63.2  | 2012-01-03 00:00:00.000 |           1.22 | Illinois | Furnishings   |         1 |
| Furniture  | Chicago | United States | Rob Lucas        |          0 | RL-19615     | IN-2012-34324  | FUR-FU-10004820 |      2955 | 2012-10-03 00:00:00.000 | Medium     | Advantus Photo Frame, Erganomic                         |   44.34  |          2 |  103.2  | 2012-10-07 00:00:00.000 |           8.3  | Illinois | Furnishings   |         1 |
| Furniture  | Chicago | United States | Paul Stevenson   |          0 | PS-18970     | IN-2014-80559  | FUR-TA-10002650 |      3350 | 2014-12-04 00:00:00.000 | Medium     | Hon Wood Table, with Bottom Storage                     |  148.68  |          4 | 2125.32 | 2014-12-08 00:00:00.000 |         234.67 | Illinois | Tables        |         1 |
| Furniture  | Chicago | United States | Gary Mitchum     |          0 | GM-14455     | IN-2012-70619  | FUR-CH-10004572 |      3497 | 2012-07-31 00:00:00.000 | Medium     | Office Star Executive Leather Armchair, Adjustable      |   23.4   |          1 |   61.62 | 2012-08-04 00:00:00.000 |           5.23 | Illinois | Chairs        |         1 |
| Furniture  | Chicago | United States | Dan Reichenbach  |          0 | DR-12880     | CA-2014-161956 | FUR-FU-10002937 |      3561 | 2014-08-28 00:00:00.000 | Medium     | Rubbermaid Light Bulb, Durable                          |   99.23  |          2 |  198.46 | 2014-08-30 00:00:00.000 |          12.63 | Illinois | Furnishings   |         1 |


Table: Medidas


 


tables: name: Calendario
data: Calendario.csv
name: desafiofinal_dw dim_clientes
data: desafiofinal_dw dim_clientes.csv
name: desafiofinal_dw dim_pedidos
data: desafiofinal_dw dim_pedidos.csv
name: desafiofinal_dw dim_produtos
data: desafiofinal_dw dim_produtos.csv
name: desafiofinal_dw fato_vendas
data: desafiofinal_dw fato_vendas.csv
name: Medidas
data: Medidas.csv
label: desafiofinal_dw fato_vendas
idcustomer
desafiofinal_dw dim_clientes
idcustomer
desafiofinal_dw fato_vendas
idorder
desafiofinal_dw dim_pedidos
idorder
desafiofinal_dw fato_vendas
idproduct
desafiofinal_dw dim_produtos
idproduct
desafiofinal_dw dim_produtos
date_to
Calendario
Data
output: {
    "joins": [
        {
            "from_table": "desafiofinal_dw fato_vendas",
            "from_column": "idcustomer",
            "to_table": "desafiofinal_dw dim_clientes",
            "to_column": "idcustomer"
        },
        {
            "from_table": "desafiofinal_dw fato_vendas",
            "from_column": "idorder",
            "to_table": "desafiofinal_dw dim_pedidos",
            "to_column": "idorder"
        },
        {
            "from_table": "desafiofinal_dw fato_vendas",
            "from_column": "idproduct",
            "to_table": "desafiofinal_dw dim_produtos",
            "to_column": "idproduct"
        },
        {
            "from_table": "desafiofinal_dw dim_produtos",
            "from_column": "date_to",
            "to_table": "Calendario",
            "to_column": "Data"
        }
    ]
}