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: dw dim_customers
|   id_customers | name          | address          | city            | state   |   zipcode | date                    |   année |   mois |   jours |
|---------------:|:--------------|:-----------------|:----------------|:--------|----------:|:------------------------|--------:|-------:|--------:|
|              1 | MichelleSmith | 10 Albany st     | Boston          | MA      |      2201 | 2014-02-18 00:00:00.000 |    2014 |      2 |      18 |
|              2 | BenBarro      | 12 Rushmont st   | New York City   | NY      |     10026 | 2014-03-20 00:00:00.000 |    2014 |      3 |      20 |
|              3 | WilliamTerry  | 33 Vernon st     | Seaside Heights | NJ      |      8751 | 2015-06-15 00:00:00.000 |    2015 |      6 |      15 |
|              4 | SarahThompson | 22 Market st     | Baltimore       | MD      |     21075 | 2014-01-19 00:00:00.000 |    2014 |      1 |      19 |
|              5 | DonaldDuck    | 404 Dorch Ave    | Miami           | FL      |     33010 | 2014-02-25 00:00:00.000 |    2014 |      2 |      25 |
|              6 | BethMcAdams   | 110 Montvale Ave | Chicago         | IL      |     60652 | 2015-07-18 00:00:00.000 |    2015 |      7 |      18 |
|              7 | HenryWallace  | 605 Mass Ave     | Boston          | MA      |      2201 | 2015-08-27 00:00:00.000 |    2015 |      8 |      27 |
|              8 | CorinSabbath  | 99 Pots Way      | Chicago         | IL      |     60632 | 2014-02-12 00:00:00.000 |    2014 |      2 |      12 |
|              9 | GeorgeHarris  | 55 Pond St       | Miami           | FL      |     33010 | 2014-03-22 00:00:00.000 |    2014 |      3 |      22 |
|             10 | KarenWhite    | 777 Moxy Rd      | Baltimore       | MD      |     21075 | 2015-07-20 00:00:00.000 |    2015 |      7 |      20 |


Table: dw dim_orders
|   id_orders |   id_customers |   id_product |   quantity | date                    |   année |   mois |   jours |
|------------:|---------------:|-------------:|-----------:|:------------------------|--------:|-------:|--------:|
|           1 |              1 |            5 |          5 | 2017-10-06 00:00:00.000 |    2017 |     10 |       6 |
|           2 |              2 |            6 |          4 | 2017-08-09 00:00:00.000 |    2017 |      8 |       9 |
|           3 |              1 |           12 |          3 | 2014-05-21 00:00:00.000 |    2014 |      5 |      21 |
|           4 |              6 |           10 |          2 | 2016-02-29 00:00:00.000 |    2016 |      2 |      29 |
|           5 |              1 |            7 |          4 | 2018-03-26 00:00:00.000 |    2018 |      3 |      26 |
|           6 |              2 |           12 |          2 | 2019-06-04 00:00:00.000 |    2019 |      6 |       4 |
|           7 |              3 |            6 |          6 | 2014-10-09 00:00:00.000 |    2014 |     10 |       9 |
|           8 |              4 |           13 |          1 | 2019-05-20 00:00:00.000 |    2019 |      5 |      20 |
|           9 |             18 |            1 |          5 | 2016-04-27 00:00:00.000 |    2016 |      4 |      27 |
|          10 |             11 |            5 |          1 | 2015-02-07 00:00:00.000 |    2015 |      2 |       7 |


Table: dw dim_product
|   id_product | name                                  |   price |   id_category | name_category   |
|-------------:|:--------------------------------------|--------:|--------------:|:----------------|
|            1 | Android Phone                         |     300 |             1 | Electronics     |
|            3 | Microsoft Surface Tablet              |     500 |             1 | Electronics     |
|            4 | Nextbook Tablet                       |     100 |             1 | Electronics     |
|            5 | Philips BTM2180/37 Micro Music System |     150 |             1 | Electronics     |
|            6 | Memorex Boombox                       |      46 |             1 | Electronics     |
|            7 | Mossy Oak Infinity Seat Cover         |      20 |             6 | Auto            |
|            8 | Remington Floor Mat Set               |      30 |             1 | Electronics     |
|            9 | Rawlings RBG36 Baseball Glove         |      30 |             5 | Sporting Goods  |
|           10 | Franklin Pro Batting Gloves           |      20 |             5 | Sporting Goods  |
|           11 | Golds Gym Trainer 420                 |     377 |             5 | Sporting Goods  |


Table: dw dim_review
|   id_reviews |   rating |   id_customers |   id_product | date                    |   année |   mois |   jours |
|-------------:|---------:|---------------:|-------------:|:------------------------|--------:|-------:|--------:|
|            9 |        9 |              2 |            6 | 2014-02-18 00:00:00.000 |    2014 |      2 |      18 |
|           10 |        6 |              1 |            5 | 2014-02-18 00:00:00.000 |    2014 |      2 |      18 |
|           11 |        8 |              1 |           12 | 2014-02-18 00:00:00.000 |    2014 |      2 |      18 |
|           12 |        2 |              6 |           10 | 2014-02-18 00:00:00.000 |    2014 |      2 |      18 |
|           13 |        8 |              9 |           65 | 2015-05-14 00:00:00.000 |    2015 |      5 |      14 |
|           14 |        2 |              2 |           35 | 2017-12-23 00:00:00.000 |    2017 |     12 |      23 |
|           15 |        2 |             12 |           12 | 2016-02-09 00:00:00.000 |    2016 |      2 |       9 |
|           16 |        5 |              3 |           52 | 2019-04-05 00:00:00.000 |    2019 |      4 |       5 |
|           17 |        6 |             41 |           46 | 2015-06-30 00:00:00.000 |    2015 |      6 |      30 |
|           18 |        8 |              5 |           65 | 2018-06-25 00:00:00.000 |    2018 |      6 |      25 |


Table: dw fact_ca
|   année |   CA_total |
|--------:|-----------:|
|    2014 |       9736 |
|    2015 |       4189 |
|    2016 |      10934 |
|    2017 |       7378 |
|    2018 |       3290 |
|    2019 |       3155 |


Table: dw fact_product
|   id_product | name_product                              |   rating |   id_category |
|-------------:|:------------------------------------------|---------:|--------------:|
|            1 | Android Phone                             |        8 |             1 |
|            5 | Philips BTM2180/37 Micro Music System     |        9 |             1 |
|           14 | Fashion Jewelry Bracelet                  |        8 |             3 |
|           19 | Coldplay Double Album Tab Slipcase Broché |        8 |             4 |
|           24 | Hal Leonard Album d'Malmsteen Anthology   |        8 |             4 |
|           28 | Catkoo 50pcs                              |        8 |             7 |
|           31 | Kloius Seeds                              |        8 |             7 |
|           34 | Msyou 50 pcs                              |        8 |             7 |
|           44 | Rubber Floor Mat                          |        9 |             6 |
|           45 | Menu Classic                              |        9 |             8 |


Table: dw fact_vente
|   id_fact |   id_produit |   id_orders |   vente | date                    |
|----------:|-------------:|------------:|--------:|:------------------------|
|         1 |            1 |          28 |    1500 | 2015-05-01 00:00:00.000 |
|         2 |            3 |          27 |    1500 | 2019-05-29 00:00:00.000 |
|         3 |            4 |          26 |     100 | 2018-07-18 00:00:00.000 |
|         4 |            5 |          38 |    2550 | 2016-03-10 00:00:00.000 |
|         5 |            6 |          65 |    1288 | 2019-06-23 00:00:00.000 |
|         6 |            7 |           5 |      80 | 2018-03-26 00:00:00.000 |
|         7 |            8 |          14 |      60 | 2017-03-24 00:00:00.000 |
|         8 |           10 |          11 |      40 | 2014-06-23 00:00:00.000 |
|         9 |           11 |          56 |    6786 | 2016-07-19 00:00:00.000 |
|        10 |           12 |          66 |    2296 | 2014-06-20 00:00:00.000 |

 


tables: name: dw dim_customers
data: dw dim_customers.csv
name: dw dim_orders
data: dw dim_orders.csv
name: dw dim_product
data: dw dim_product.csv
name: dw dim_review
data: dw dim_review.csv
name: dw fact_ca
data: dw fact_ca.csv
name: dw fact_product
data: dw fact_product.csv
name: dw fact_vente
data: dw fact_vente.csv
label: dw dim_orders
id_customers
dw dim_customers
id_customers
dw dim_review
id_customers
dw dim_customers
id_customers
dw dim_customers
année
dw fact_ca
année
dw fact_vente
id_orders
dw dim_orders
id_orders
dw dim_orders
id_product
dw dim_product
id_product
dw dim_review
id_product
dw dim_product
id_product
dw fact_product
id_product
dw dim_product
id_product
output: {
    "joins": [
        {
            "from_table": "dw dim_orders",
            "from_column": "id_customers",
            "to_table": "dw dim_customers",
            "to_column": "id_customers"
        },
        {
            "from_table": "dw dim_review",
            "from_column": "id_customers",
            "to_table": "dw dim_customers",
            "to_column": "id_customers"
        },
        {
            "from_table": "dw dim_customers",
            "from_column": "ann\u00e9e",
            "to_table": "dw fact_ca",
            "to_column": "ann\u00e9e"
        },
        {
            "from_table": "dw fact_vente",
            "from_column": "id_orders",
            "to_table": "dw dim_orders",
            "to_column": "id_orders"
        },
        {
            "from_table": "dw dim_orders",
            "from_column": "id_product",
            "to_table": "dw dim_product",
            "to_column": "id_product"
        },
        {
            "from_table": "dw dim_review",
            "from_column": "id_product",
            "to_table": "dw dim_product",
            "to_column": "id_product"
        },
        {
            "from_table": "dw fact_product",
            "from_column": "id_product",
            "to_table": "dw dim_product",
            "to_column": "id_product"
        }
    ]
}