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: A1
| Country   | Partner Code   |   CMMF | Family   | Reference No.   | Brand   |   Year |   Month |   Sell out | Retailer   | Date                    |
|:----------|:---------------|-------:|:---------|:----------------|:--------|-------:|--------:|-----------:|:-----------|:------------------------|
| CZ        | AB12           |   1234 | Clothes  | AA1234          | A       |   2019 |       1 |        448 | A1         | 2019-01-01 00:00:00.000 |
| CZ        | AA11           |   1111 | Shoes    | AB1212          | A       |   2019 |       1 |        282 | A1         | 2019-01-01 00:00:00.000 |
| CZ        | BB22           |   2525 | Belts    | BB1111          | B       |   2019 |       1 |        420 | A1         | 2019-01-01 00:00:00.000 |
| SK        | AB12           |   1234 | Clothes  | AA1234          | A       |   2019 |       1 |        223 | A1         | 2019-01-01 00:00:00.000 |
| SK        | AA11           |   1111 | Shoes    | AB1212          | A       |   2019 |       1 |         58 | A1         | 2019-01-01 00:00:00.000 |
| SK        | BB22           |   2525 | Belts    | BB1111          | B       |   2019 |       1 |        259 | A1         | 2019-01-01 00:00:00.000 |
| PL        | AB12           |   1234 | Clothes  | AA1234          | A       |   2019 |       1 |        122 | A1         | 2019-01-01 00:00:00.000 |
| PL        | AA11           |   1111 | Shoes    | AB1212          | A       |   2019 |       1 |          6 | A1         | 2019-01-01 00:00:00.000 |
| PL        | BB22           |   2525 | Belts    | BB1111          | B       |   2019 |       1 |          3 | A1         | 2019-01-01 00:00:00.000 |
| CZ        | AB12           |   1234 | Clothes  | AA1234          | A       |   2019 |       2 |        258 | A1         | 2019-02-01 00:00:00.000 |


Table: B1
| Country   | Partner Product Code   |   CMMF | Family   | Reference No.   | Brand   |   Year |   Month |   Sell out | Retailer   | Date                    |
|:----------|:-----------------------|-------:|:---------|:----------------|:--------|-------:|--------:|-----------:|:-----------|:------------------------|
| CZ        | AB12                   |   2525 | Belts    | BB1111          | B       |   2019 |       1 |        160 | B1         | 2019-01-01 00:00:00.000 |
| CZ        | AA11                   |   2525 | Belts    | BB1111          | B       |   2019 |       1 |         80 | B1         | 2019-01-01 00:00:00.000 |
| CZ        | BB22                   |   1111 | Shoes    | AB1212          | A       |   2019 |       1 |        307 | B1         | 2019-01-01 00:00:00.000 |
| CZ        | BA12                   |   1111 | Shoes    | AB1212          | A       |   2019 |       1 |        440 | B1         | 2019-01-01 00:00:00.000 |
| CZ        | AC11                   |   1111 | Shoes    | AB1212          | A       |   2019 |       1 |        104 | B1         | 2019-01-01 00:00:00.000 |
| CZ        | AC12                   |   1234 | Clothes  | AA1234          | A       |   2019 |       1 |        441 | B1         | 2019-01-01 00:00:00.000 |
| CZ        | CA22                   |   1111 | Shoes    | AB1212          | A       |   2019 |       2 |        244 | B1         | 2019-02-01 00:00:00.000 |
| CZ        | AC12                   |   1234 | Clothes  | AA1234          | A       |   2019 |       2 |        104 | B1         | 2019-02-01 00:00:00.000 |
| SK        | CC11                   |   2525 | Belts    | BB1111          | B       |   2019 |       2 |         22 | B1         | 2019-02-01 00:00:00.000 |
| SK        | BB22                   |   1111 | Shoes    | AB1212          | A       |   2019 |       2 |        173 | B1         | 2019-02-01 00:00:00.000 |


Table: C1
| Country   |   CMMF | Reference No.   |   Year |   Month |   Sell out | Retailer   | Date                    | Partner Product Code   |
|:----------|-------:|:----------------|-------:|--------:|-----------:|:-----------|:------------------------|:-----------------------|
| PL        |   2525 | BB1111          |   2019 |       2 |        312 | C1         | 2019-02-01 00:00:00.000 | Not Available          |
| PL        |   1234 | AA1234          |   2019 |       2 |        238 | C1         | 2019-02-01 00:00:00.000 | Not Available          |
| PL        |   2525 | BB1111          |   2019 |       4 |          6 | C1         | 2019-04-01 00:00:00.000 | Not Available          |
| PL        |   2525 | BB1111          |   2019 |       5 |         24 | C1         | 2019-05-01 00:00:00.000 | Not Available          |
| PL        |   1234 | AA1234          |   2019 |      11 |        145 | C1         | 2019-11-01 00:00:00.000 | Not Available          |
| PL        |   8000 | BA4321          |   2019 |      12 |          5 | C1         | 2019-12-01 00:00:00.000 | Not Available          |
| PL        |   1111 | AB1212          |   2019 |      12 |        178 | C1         | 2019-12-01 00:00:00.000 | Not Available          |
| PL        |   8000 | BA4321          |   2020 |       1 |        337 | C1         | 2020-01-01 00:00:00.000 | Not Available          |
| PL        |   1111 | AB1212          |   2020 |       1 |         60 | C1         | 2020-01-01 00:00:00.000 | Not Available          |


Table: Conversion table
|   CMMF | Family   | Reference No.   | Brand   |
|-------:|:---------|:----------------|:--------|
|   1234 | Clothes  | AA1234          | A       |
|   1111 | Shoes    | AB1212          | A       |
|   2525 | Belts    | BB1111          | B       |
|   8000 | Watches  | BA4321          | A       |


Table: Date
| Date                    | Month year   |   Year |
|:------------------------|:-------------|-------:|
| 2018-01-01 00:00:00.000 | 2018-01      |   2018 |
| 2018-01-02 00:00:00.000 | 2018-01      |   2018 |
| 2018-01-03 00:00:00.000 | 2018-01      |   2018 |
| 2018-01-04 00:00:00.000 | 2018-01      |   2018 |
| 2018-01-05 00:00:00.000 | 2018-01      |   2018 |
| 2018-01-06 00:00:00.000 | 2018-01      |   2018 |
| 2018-01-07 00:00:00.000 | 2018-01      |   2018 |
| 2018-01-08 00:00:00.000 | 2018-01      |   2018 |
| 2018-01-09 00:00:00.000 | 2018-01      |   2018 |
| 2018-01-10 00:00:00.000 | 2018-01      |   2018 |


Table: Partner code
| Partner Code   |
|:---------------|
| AB12           |
| AA11           |
| BB22           |
| BA12           |
| AC11           |
| AC12           |
| CA22           |
| CC11           |
| AD12           |
| DD22           |


Table: Retailer
| Retailer   |
|:-----------|
| A1         |
| B1         |
| C1         |

 


tables: name: A1
data: A1.csv
name: B1
data: B1.csv
name: C1
data: C1.csv
name: Conversion table
data: Conversion table.csv
name: Date
data: Date.csv
name: Partner code
data: Partner code.csv
name: Retailer
data: Retailer.csv
label: A1
CMMF
Conversion table
CMMF
B1
CMMF
Conversion table
CMMF
C1
CMMF
Conversion table
CMMF
output: {
    "joins": [
        {
            "from_table": "A1",
            "from_column": "CMMF",
            "to_table": "Conversion table",
            "to_column": "CMMF"
        },
        {
            "from_table": "B1",
            "from_column": "CMMF",
            "to_table": "Conversion table",
            "to_column": "CMMF"
        },
        {
            "from_table": "C1",
            "from_column": "CMMF",
            "to_table": "Conversion table",
            "to_column": "CMMF"
        }
    ]
}