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: Account
| Account ID   | Account                    |
|:-------------|:---------------------------|
| B70100       | Produits Finis             |
| B70210       | Produits Semi Finis        |
| B70220       | Autres Produits Semi Finis |
| B70300       | Produits intermédiaires    |
| B70400       | Prestations de services    |
| B70500       | Ventes de marchandises     |
| B70600       | Autres activités           |
| B70700       | RRR                        |


Table: Activity_Product
| Activity ID   | Activity                          |
|:--------------|:----------------------------------|
| B1000         | Technologiques                    |
| B9000         | Autres                            |
| BC000         | Activités destinées à être cédées |
| BNA           | Non Applicable                    |
| E10000        | Futaille                          |
| E10ORM        | Fûts                              |
| E20000        | Tonneaux & Foudres                |
| E20ORM        | Grands Contenants                 |
| E30000        | Alternatifs                       |
| E30ORM        | Alternatifs                       |


Table: Category
| Activity ID   | Category ID   | Category                          |
|:--------------|:--------------|:----------------------------------|
| B1000         | B10000        | Technologiques                    |
| B9000         | B20000        | Techniques                        |
| B9000         | B30000        | Naturels                          |
| B9000         | B40000        | Negoce                            |
| B9000         | B90000        | Autres                            |
| BC000         | BC0000        | Activités destinées à être cédées |
| E10000        | E11000        | Français                          |
| E10ORM        | E11ORM        | FO                                |
| E10000        | E12000        | Américain                         |
| E10ORM        | E12ORM        | AO                                |


Table: Control gap
|   Control ID | Type         |
|-------------:|:-------------|
|            1 | Value gap    |
|            2 | Quantity gap |


Table: Country_Fact
| Zone ID   | Country ID   | Country                |
|:----------|:-------------|:-----------------------|
| G04       | ABW          | ARUBA                  |
| G06       | AFG          | AFGHANISTAN            |
| G04       | AGO          | ANGOLA                 |
| G02       | AIA          | ANGUILLA               |
| G01       | ALA          | îLES ALAND             |
| G01       | ALB          | ALBANIE                |
| G01       | AND          | ANDORRE                |
| G02       | ANT          | ANTILLES NEERLANDAISES |
| G06       | ARE          | EMIRATS ARABES UNIS    |
| G02       | ARG          | ARGENTINE              |


Table: Date
| Date                    |   Year |   Month number | Month   |   Fiscal Month | Month and Year   | Fiscal Year   |
|:------------------------|-------:|---------------:|:--------|---------------:|:-----------------|:--------------|
| 2018-04-01 00:00:00.000 |   2018 |              4 | April   |              1 | April 2018       | 2018-2019     |
| 2018-04-02 00:00:00.000 |   2018 |              4 | April   |              1 | April 2018       | 2018-2019     |
| 2018-04-03 00:00:00.000 |   2018 |              4 | April   |              1 | April 2018       | 2018-2019     |
| 2018-04-04 00:00:00.000 |   2018 |              4 | April   |              1 | April 2018       | 2018-2019     |
| 2018-04-05 00:00:00.000 |   2018 |              4 | April   |              1 | April 2018       | 2018-2019     |
| 2018-04-06 00:00:00.000 |   2018 |              4 | April   |              1 | April 2018       | 2018-2019     |
| 2018-04-07 00:00:00.000 |   2018 |              4 | April   |              1 | April 2018       | 2018-2019     |
| 2018-04-08 00:00:00.000 |   2018 |              4 | April   |              1 | April 2018       | 2018-2019     |
| 2018-04-09 00:00:00.000 |   2018 |              4 | April   |              1 | April 2018       | 2018-2019     |
| 2018-04-10 00:00:00.000 |   2018 |              4 | April   |              1 | April 2018       | 2018-2019     |


Table: Family
| Process ID   | Family ID   | Family                            |
|:-------------|:------------|:----------------------------------|
| P10          | F1010       | VT Diam                           |
| P10          | F1020       | VS Diam                           |
| P10          | F1030       | VE Diam                           |
| P20          | F2010       | VT Revtech                        |
| P20          | F2020       | VS Revtech                        |
| P20          | F2030       | VE Revtech                        |
| P30          | F3010       | Alfa                              |
| P80          | F8010       | Activités destinées à être cédées |
| P90          | F9010       | Autres                            |
| PNA          | FNA         | Non applicable                    |


Table: Market
| Market ID   | Market             |
|:------------|:-------------------|
| M10         | Vins Tranquilles   |
| M20         | Vins Effervescents |
| M30         | Vins Spiritueux    |
| M40         | Autres             |
| MNA         | Non applicable     |


Table: Pole
| Pole ID   | Pole              |
|:----------|:------------------|
| PV10      | Alternatifs Boisé |
| PV20      | Vivelys           |
| PV30      | Autres Services   |
| PVNA      | Non applicable    |


Table: Process
| Process ID   | Process                           |
|:-------------|:----------------------------------|
| P10          | Procédé Diamant                   |
| P20          | Procédé Revtech                   |
| P30          | Alfa                              |
| P80          | Activités destinées à être cédées |
| P90          | Autres                            |
| PNA          | Non applicable                    |


Table: Product Grouping
| Product Grouping ID   | Product Grouping   | Subpole ID   | Subrange ID   | Family ID   | Submarket ID   | Category ID   |
|:----------------------|:-------------------|:-------------|:--------------|:------------|:---------------|:--------------|
| B10100                | Technologiques     | SPVNA        | SGNA          | FNA         | SNA            | B10000        |
| E11100                | FO Standard        | SPVNA        | SG1010        | FNA         | SNA            | E11000        |
| E11200                | FO Icône           | SPVNA        | SG1020        | FNA         | SNA            | E11000        |
| E11300                | FO Crianza         | SPVNA        | SG1030        | FNA         | SNA            | E11000        |
| E11ORM                | FO                 | SPVNA        | SGNA          | FNA         | SNA            | E11ORM        |
| E12100                | AO Standard        | SPVNA        | SG1010        | FNA         | SNA            | E12000        |
| E12200                | AO Icône           | SPVNA        | SG1020        | FNA         | SNA            | E12000        |
| E12300                | AO Crianza         | SPVNA        | SG1030        | FNA         | SNA            | E12000        |
| E12400                | AO BB              | SPVNA        | SG1040        | FNA         | SNA            | E12000        |
| E12ORM                | AO                 | SPVNA        | SGNA          | FNA         | SNA            | E12ORM        |


Table: Product
| Product Grouping ID   | Product ID   | Product             |
|:----------------------|:-------------|:--------------------|
| B10100                | B10100       | Technologiques      |
| B11100                | B11100       | Diam 1 Brio         |
| B11100                | B11101       | Diam 1 Brio         |
| B11110                | B11110       | Diam 1              |
| B11110                | B11111       | Diam 1              |
| B11200                | B11201       | Diam 3              |
| B11300                | B11301       | Diam 5              |
| B11400                | B11401       | Diam 10             |
| B11500                | B11501       | Diam 30             |
| B11600                | B11601       | Origine by Diam  10 |


Table: Sales Budget VS Actual
| Date                    | Account ID   | Product ID   |   Actual Sales |   Budget Sales |   Actual Quantity |   Budget Quantity |   Sales value gap |   Sales quantity gap |
|:------------------------|:-------------|:-------------|---------------:|---------------:|------------------:|------------------:|------------------:|---------------------:|
| 2018-10-01 00:00:00.000 | B70100       | E11102       |              0 |              0 |                 0 |                 0 |                 0 |                    0 |
| 2018-10-01 00:00:00.000 | B70100       | E11103       |              0 |              0 |                 0 |                 0 |                 0 |                    0 |
| 2018-10-01 00:00:00.000 | B70100       | E11104       |              0 |              0 |                 0 |                 0 |                 0 |                    0 |
| 2018-10-01 00:00:00.000 | B70100       | E11105       |              0 |              0 |                 0 |                 0 |                 0 |                    0 |
| 2018-10-01 00:00:00.000 | B70100       | E11106       |              0 |              0 |                 0 |                 0 |                 0 |                    0 |
| 2018-10-01 00:00:00.000 | B70100       | E11107       |              0 |              0 |                 0 |                 0 |                 0 |                    0 |
| 2018-10-01 00:00:00.000 | B70100       | E11108       |              0 |              0 |                 0 |                 0 |                 0 |                    0 |
| 2018-10-01 00:00:00.000 | B70100       | E11109       |              0 |              0 |                 0 |                 0 |                 0 |                    0 |
| 2018-10-01 00:00:00.000 | B70100       | E11110       |              0 |              0 |                 0 |                 0 |                 0 |                    0 |
| 2018-10-01 00:00:00.000 | B70100       | E11111       |              0 |              0 |                 0 |                 0 |                 0 |                    0 |


Table: Sales
| Date                    | Account ID   | Product ID   | Country ID   |   Total sales |   Total quantity |
|:------------------------|:-------------|:-------------|:-------------|--------------:|-----------------:|
| 2018-12-01 00:00:00.000 | B70100       | E11102       | FRA          |             0 |                0 |
| 2018-12-01 00:00:00.000 | B70100       | E11103       | FRA          |             0 |                0 |
| 2018-12-01 00:00:00.000 | B70100       | E11104       | FRA          |             0 |                0 |
| 2018-12-01 00:00:00.000 | B70100       | E11105       | FRA          |             0 |                0 |
| 2018-12-01 00:00:00.000 | B70100       | E11106       | FRA          |             0 |                0 |
| 2018-12-01 00:00:00.000 | B70100       | E11107       | FRA          |             0 |                0 |
| 2018-12-01 00:00:00.000 | B70100       | E11108       | FRA          |             0 |                0 |
| 2018-12-01 00:00:00.000 | B70100       | E11109       | FRA          |             0 |                0 |
| 2018-12-01 00:00:00.000 | B70100       | E11110       | FRA          |             0 |                0 |
| 2018-12-01 00:00:00.000 | B70100       | E11111       | FRA          |             0 |                0 |


Table: Submarket
| Market ID   | Submarket ID   | Submarket   |
|:------------|:---------------|:------------|
| M10         | SM1010         | VT Diam     |
| M10         | SM1020         | VT Revtech  |
| M10         | SM1030         | VT Pietec   |
| M20         | SM2010         | VE Diam     |
| M20         | SM2020         | VE Revtech  |
| M20         | SM2030         | VE Pietec   |
| M30         | SM3010         | VS Diam     |
| M30         | SM3020         | VS Revtech  |
| M30         | SM3030         | VS Pietec   |
| M40         | SM4010         | Autres      |


Table: Subpole
| Subpole ID   | Subpole                           | Pole ID   |
|:-------------|:----------------------------------|:----------|
| SPV1010      | Innerstaves                       | PV10      |
| SPV1020      | Copeaux                           | PV10      |
| SPV2010      | Pôle Vigne                        | PV20      |
| SPV2020      | Pôle Cave                         | PV20      |
| SPV2030      | Pôle Microbio                     | PV20      |
| SPV2040      | Pôle Sensoriel                    | PV20      |
| SPV3010      | Réparation & Maintenance          | PV30      |
| SPV3015      | Mise à dispo personnel facturé Tx | PV30      |
| SPV3020      | Autres prestations                | PV30      |
| SPV3025      | Fûts d'occasion                   | PV30      |

 


tables: name: Account
data: Account.csv
name: Activity_Product
data: Activity_Product.csv
name: Category
data: Category.csv
name: Control gap
data: Control gap.csv
name: Country_Fact
data: Country_Fact.csv
name: Date
data: Date.csv
name: Family
data: Family.csv
name: Market
data: Market.csv
name: Pole
data: Pole.csv
name: Process
data: Process.csv
name: Product Grouping
data: Product Grouping.csv
name: Product
data: Product.csv
name: Sales Budget VS Actual
data: Sales Budget VS Actual.csv
name: Sales
data: Sales.csv
name: Submarket
data: Submarket.csv
name: Subpole
data: Subpole.csv
label: Product Grouping
Subpole ID
Subpole
Subpole ID
Subpole
Pole ID
Pole
Pole ID
Product Grouping
Submarket ID
Submarket
Submarket ID
Product
Product Grouping ID
Product Grouping
Product Grouping ID
Product Grouping
Family ID
Family
Family ID
Family
Process ID
Process
Process ID
Product Grouping
Category ID
Category
Category ID
Category
Activity ID
Activity_Product
Activity ID
Submarket
Market ID
Market
Market ID
Sales
Country ID
Country_Fact
Country ID
Sales
Account ID
Account
Account ID
Sales
Product ID
Product
Product ID
Sales
Date
Date
Date
Sales Budget VS Actual
Account ID
Account
Account ID
Sales Budget VS Actual
Date
Date
Date
Sales Budget VS Actual
Product ID
Product
Product ID
output: {
    "joins": [
        {
            "from_table": "Product Grouping",
            "from_column": "Subpole ID",
            "to_table": "Subpole",
            "to_column": "Subpole ID"
        },
        {
            "from_table": "Subpole",
            "from_column": "Pole ID",
            "to_table": "Pole",
            "to_column": "Pole ID"
        },
        {
            "from_table": "Product Grouping",
            "from_column": "Submarket ID",
            "to_table": "Submarket",
            "to_column": "Submarket ID"
        },
        {
            "from_table": "Product",
            "from_column": "Product Grouping ID",
            "to_table": "Product Grouping",
            "to_column": "Product Grouping ID"
        },
        {
            "from_table": "Product Grouping",
            "from_column": "Family ID",
            "to_table": "Family",
            "to_column": "Family ID"
        },
        {
            "from_table": "Family",
            "from_column": "Process ID",
            "to_table": "Process",
            "to_column": "Process ID"
        },
        {
            "from_table": "Product Grouping",
            "from_column": "Category ID",
            "to_table": "Category",
            "to_column": "Category ID"
        },
        {
            "from_table": "Category",
            "from_column": "Activity ID",
            "to_table": "Activity_Product",
            "to_column": "Activity ID"
        },
        {
            "from_table": "Submarket",
            "from_column": "Market ID",
            "to_table": "Market",
            "to_column": "Market ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Country ID",
            "to_table": "Country_Fact",
            "to_column": "Country ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Account ID",
            "to_table": "Account",
            "to_column": "Account ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Product ID",
            "to_table": "Product",
            "to_column": "Product ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Date",
            "to_table": "Date",
            "to_column": "Date"
        },
        {
            "from_table": "Sales Budget VS Actual",
            "from_column": "Account ID",
            "to_table": "Account",
            "to_column": "Account ID"
        },
        {
            "from_table": "Sales Budget VS Actual",
            "from_column": "Date",
            "to_table": "Date",
            "to_column": "Date"
        },
        {
            "from_table": "Sales Budget VS Actual",
            "from_column": "Product ID",
            "to_table": "Product",
            "to_column": "Product ID"
        }
    ]
}