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: Alberta
| ModYearReg   |   UnitSold |
|:-------------|-----------:|
| M1Y1AB       |       5321 |
| M2Y1AB       |       4146 |
| M3Y1AB       |       3546 |
| M4Y1AB       |       2021 |
| M5Y1AB       |       1453 |
| M6Y1AB       |       3121 |
| M7Y1AB       |       3145 |
| M8Y1AB       |       1935 |
| M1Y2AB       |       5463 |
| M2Y2AB       |       4279 |


Table: Append1
| ModYearReg   |   UnitSold | Lowercase   | ModelID   | YearID   | RegID   |
|:-------------|-----------:|:------------|:----------|:---------|:--------|
| M1Y1AB       |       5321 | m1y1ab      | M1        | Y1       | AB      |
| M2Y1AB       |       4146 | m2y1ab      | M2        | Y1       | AB      |
| M3Y1AB       |       3546 | m3y1ab      | M3        | Y1       | AB      |
| M4Y1AB       |       2021 | m4y1ab      | M4        | Y1       | AB      |
| M5Y1AB       |       1453 | m5y1ab      | M5        | Y1       | AB      |
| M6Y1AB       |       3121 | m6y1ab      | M6        | Y1       | AB      |
| M7Y1AB       |       3145 | m7y1ab      | M7        | Y1       | AB      |
| M8Y1AB       |       1935 | m8y1ab      | M8        | Y1       | AB      |
| M1Y1BC       |       4756 | m1y1bc      | M1        | Y1       | BC      |
| M2Y1BC       |       5147 | m2y1bc      | M2        | Y1       | BC      |


Table: British Columbia
| ModYearReg   |   UnitSold |
|:-------------|-----------:|
| M1Y1BC       |       4756 |
| M2Y1BC       |       5147 |
| M3Y1BC       |       6845 |
| M4Y1BC       |       2145 |
| M5Y1BC       |       1247 |
| M6Y1BC       |       4756 |
| M7Y1BC       |       1921 |
| M8Y1BC       |       1352 |
| M1Y2BC       |       4932 |
| M2Y2BC       |       5471 |


Table: Manitoba
| ModYearReg   |   UnitSold |
|:-------------|-----------:|
| M1Y1MB       |       1924 |
| M2Y1MB       |       1541 |
| M3Y1MB       |       1031 |
| M4Y1MB       |        521 |
| M5Y1MB       |        453 |
| M6Y1MB       |        465 |
| M7Y1MB       |        931 |
| M8Y1MB       |        762 |
| M1Y2MB       |       1948 |
| M2Y2MB       |       1593 |


Table: ModelID
| ModelID   | ModelName   |
|:----------|:------------|
| M1        | Corolla     |
| M2        | Camry       |
| M3        | Pirus       |
| M4        | Sienna      |
| M5        | Tacoma      |
| M6        | Yaris       |
| M7        | Rav4        |
| M8        | Others      |


Table: ModYear
| ModelID   | YearID   | PK   |
|:----------|:---------|:-----|
| M1        | Y1       | M1Y1 |
| M1        | Y2       | M1Y2 |
| M1        | Y3       | M1Y3 |
| M1        | Y4       | M1Y4 |
| M1        | Y5       | M1Y5 |
| M2        | Y1       | M2Y1 |
| M2        | Y2       | M2Y2 |
| M2        | Y3       | M2Y3 |
| M2        | Y4       | M2Y4 |
| M2        | Y5       | M2Y5 |


Table: New Brunswick
| ModYearReg   |   UnitSold |
|:-------------|-----------:|
| M1Y1NB       |       1124 |
| M2Y1NB       |        910 |
| M3Y1NB       |        512 |
| M4Y1NB       |        389 |
| M5Y1NB       |        431 |
| M6Y1NB       |        101 |
| M7Y1NB       |        503 |
| M8Y1NB       |        311 |
| M1Y2NB       |       1149 |
| M2Y2NB       |        945 |


Table: NewFoundland and Labrador
| ModYearReg   |   UnitSold |
|:-------------|-----------:|
| M1Y1NL       |        924 |
| M2Y1NL       |        710 |
| M3Y1NL       |        312 |
| M4Y1NL       |        189 |
| M5Y1NL       |        231 |
| M6Y1NL       |         53 |
| M7Y1NL       |        203 |
| M8Y1NL       |        261 |
| M1Y2NL       |        946 |
| M2Y2NL       |        731 |


Table: Northwest Territories
| ModYearReg   |   UnitSold |
|:-------------|-----------:|
| M1Y1NT       |         31 |
| M2Y1NT       |         29 |
| M3Y1NT       |         11 |
| M4Y1NT       |          5 |
| M5Y1NT       |         15 |
| M6Y1NT       |          3 |
| M7Y1NT       |         43 |
| M8Y1NT       |        112 |
| M1Y2NT       |         33 |
| M2Y2NT       |         30 |


Table: Nova Scotia
| ModYearReg   |   UnitSold |
|:-------------|-----------:|
| M1Y1NS       |       1424 |
| M2Y1NS       |       1041 |
| M3Y1NS       |        601 |
| M4Y1NS       |        401 |
| M5Y1NS       |        553 |
| M6Y1NS       |        225 |
| M7Y1NS       |        731 |
| M8Y1NS       |        362 |
| M1Y2NS       |       1439 |
| M2Y2NS       |       1086 |


Table: Nunavut
| ModYearReg   |   UnitSold |
|:-------------|-----------:|
| M1Y1NU       |         29 |
| M2Y1NU       |         26 |
| M3Y1NU       |          9 |
| M4Y1NU       |          3 |
| M5Y1NU       |         15 |
| M6Y1NU       |          1 |
| M7Y1NU       |         36 |
| M8Y1NU       |         99 |
| M1Y2NU       |         30 |
| M2Y2NU       |         27 |


Table: Ontario
| ModYearReg   |   UnitSold |
|:-------------|-----------:|
| M1Y1ON       |      15473 |
| M2Y1ON       |      11158 |
| M3Y1ON       |      10521 |
| M4Y1ON       |       9351 |
| M5Y1ON       |      13231 |
| M6Y1ON       |       9542 |
| M7Y1ON       |       8456 |
| M8Y1ON       |       3284 |
| M1Y2ON       |      16621 |
| M2Y2ON       |      12321 |


Table: Prince Edward Island
| ModYearReg   |   UnitSold |
|:-------------|-----------:|
| M1Y1PE       |        121 |
| M2Y1PE       |        141 |
| M3Y1PE       |         46 |
| M4Y1PE       |         87 |
| M5Y1PE       |         97 |
| M6Y1PE       |         25 |
| M7Y1PE       |        102 |
| M8Y1PE       |        250 |
| M1Y2PE       |        129 |
| M2Y2PE       |        143 |


Table: Quebec
| ModYearReg   |   UnitSold |
|:-------------|-----------:|
| M1Y1QC       |       7571 |
| M2Y1QC       |       7789 |
| M3Y1QC       |       7321 |
| M4Y1QC       |       5531 |
| M5Y1QC       |       4755 |
| M6Y1QC       |       4321 |
| M7Y1QC       |       6474 |
| M8Y1QC       |       3124 |
| M1Y2QC       |       7894 |
| M2Y2QC       |       8134 |


Table: RegID
| RegID   | Province&Territories              |
|:--------|:----------------------------------|
| ON      | Ontario, Canada                   |
| QC      | Quebec, Canada                    |
| BC      | British Columbia, Canada          |
| AB      | Alberta, Canada                   |
| MB      | Manitoba, Canada                  |
| SK      | Saskatchewan, Canada              |
| NS      | Nova Scotia, Canada               |
| NB      | New Brunswick, Canada             |
| NL      | Newfoundland and Labrador, Canada |
| PE      | Prince Edward Island, Canada      |


Table: Repairs
| Column1                             | Column2                | Column3       | Column4   | Column5   | Column6   | Column7    | Column8   | Column9     | Column10   | Column11   | Column12   | Column13    | Column14   | Column15   | Column16   | Column17   | Column18   | Column19   | Column20   | Column21   | Column22   | Column23   | Column24   | Column25   | Column26   | Column27   | Column28   | Column29   | Column30   | Column31   | Column32   | Column33   | Column34   | Column35   | Column36   | Column37   | Column38   | Column39   | Column40   | Column41   | Column42   | Column43   | Column44   | Column45   | Column46   | Column47   | Column48   | Column49   | Column50   | Column51   | Column52   | Column53   | Column54   | Column55   | Column56   | Column57   | Column58   | Column59   | Column60   | Column61   | Column62   | Column63   | Column64   | Column65   | Column66   | Column67   | Column68   | Column69   | Column70   | Column71   | Column72   | Column73   | Column74   | Column75   | Column76   | Column77   | Column78   | Column79   | Column80   | Column81   | Column82   | Column83   | Column84   | Column85   | Column86   | Column87   | Column88   | Column89   | Column90   |
|:------------------------------------|:-----------------------|:--------------|:----------|:----------|:----------|:-----------|:----------|:------------|:-----------|:-----------|:-----------|:------------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|:-----------|
| 2016 to 2020 Repair Sales in Canada |                        |               |           |           |           |            |           |             |            |            |            |             |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |
|                                     |                        |               |           |           |           |            |           |             |            |            |            |             |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |
| Average Costs                       |                        |               |           |           |           |            |           |             |            |            |            |             |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |
| Seats and Restraints                | Lights and Instruments | Visual System | Eletrical | Brakes    | Steering  | Powertrain | Airbag    | Fuel Supply | Suspension | Label      | Structure  | Accessories |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |
| 600                                 | 1200                   | 200           | 80        | 900       | 700       | 1100       | 300       | 800         | 270        | 440        | 200        | 100         |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |
|                                     |                        |               |           |           |           |            |           |             |            |            |            |             |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |
| % of Repairs needed Minor           | 0.6                    |               |           |           |           |            |           |             |            |            |            |             |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |
| % of Repairs needed Major           | 0.5                    |               |           |           |           |            |           |             |            |            |            |             |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |
| % of Repairs needed Extreme         | 0.4                    |               |           |           |           |            |           |             |            |            |            |             |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |
|                                     |                        |               |           |           |           |            |           |             |            |            |            |             |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |            |


Table: Saskatchewan
| ModYearReg   |   UnitSold |
|:-------------|-----------:|
| M1Y1SK       |       1724 |
| M2Y1SK       |       1341 |
| M3Y1SK       |        631 |
| M4Y1SK       |        421 |
| M5Y1SK       |        553 |
| M6Y1SK       |        265 |
| M7Y1SK       |        931 |
| M8Y1SK       |        730 |
| M1Y2SK       |       1736 |
| M2Y2SK       |       1398 |


Table: YearID
| YearID   |   Year |
|:---------|-------:|
| Y1       |   2016 |
| Y2       |   2017 |
| Y3       |   2018 |
| Y4       |   2019 |
| Y5       |   2020 |


Table: Yukon
| ModYearReg   |   UnitSold |
|:-------------|-----------:|
| M1Y1YT       |         31 |
| M2Y1YT       |         29 |
| M3Y1YT       |          9 |
| M4Y1YT       |          5 |
| M5Y1YT       |         15 |
| M6Y1YT       |          1 |
| M7Y1YT       |         39 |
| M8Y1YT       |         99 |
| M1Y2YT       |         30 |
| M2Y2YT       |         31 |

 


tables: name: Alberta
data: Alberta.csv
name: Append1
data: Append1.csv
name: British Columbia
data: British Columbia.csv
name: Manitoba
data: Manitoba.csv
name: ModelID
data: ModelID.csv
name: ModYear
data: ModYear.csv
name: New Brunswick
data: New Brunswick.csv
name: NewFoundland and Labrador
data: NewFoundland and Labrador.csv
name: Northwest Territories
data: Northwest Territories.csv
name: Nova Scotia
data: Nova Scotia.csv
name: Nunavut
data: Nunavut.csv
name: Ontario
data: Ontario.csv
name: Prince Edward Island
data: Prince Edward Island.csv
name: Quebec
data: Quebec.csv
name: RegID
data: RegID.csv
name: Repairs
data: Repairs.csv
name: Saskatchewan
data: Saskatchewan.csv
name: YearID
data: YearID.csv
name: Yukon
data: Yukon.csv
label: Alberta
ModYearReg
Append1
ModYearReg
British Columbia
ModYearReg
Append1
ModYearReg
Manitoba
ModYearReg
Append1
ModYearReg
New Brunswick
ModYearReg
Append1
ModYearReg
NewFoundland and Labrador
ModYearReg
Append1
ModYearReg
Northwest Territories
ModYearReg
Append1
ModYearReg
Nunavut
ModYearReg
Append1
ModYearReg
Nova Scotia
ModYearReg
Append1
ModYearReg
Ontario
ModYearReg
Append1
ModYearReg
Prince Edward Island
ModYearReg
Append1
ModYearReg
Quebec
ModYearReg
Append1
ModYearReg
Saskatchewan
ModYearReg
Append1
ModYearReg
Yukon
ModYearReg
Append1
ModYearReg
Append1
ModelID
ModelID
ModelID
Append1
RegID
RegID
RegID
ModYear
ModelID
ModelID
ModelID
Append1
YearID
YearID
YearID
output: {
    "joins": [
        {
            "from_table": "Alberta",
            "from_column": "ModYearReg",
            "to_table": "Append1",
            "to_column": "ModYearReg"
        },
        {
            "from_table": "British Columbia",
            "from_column": "ModYearReg",
            "to_table": "Append1",
            "to_column": "ModYearReg"
        },
        {
            "from_table": "Manitoba",
            "from_column": "ModYearReg",
            "to_table": "Append1",
            "to_column": "ModYearReg"
        },
        {
            "from_table": "New Brunswick",
            "from_column": "ModYearReg",
            "to_table": "Append1",
            "to_column": "ModYearReg"
        },
        {
            "from_table": "NewFoundland and Labrador",
            "from_column": "ModYearReg",
            "to_table": "Append1",
            "to_column": "ModYearReg"
        },
        {
            "from_table": "Northwest Territories",
            "from_column": "ModYearReg",
            "to_table": "Append1",
            "to_column": "ModYearReg"
        },
        {
            "from_table": "Nunavut",
            "from_column": "ModYearReg",
            "to_table": "Append1",
            "to_column": "ModYearReg"
        },
        {
            "from_table": "Nova Scotia",
            "from_column": "ModYearReg",
            "to_table": "Append1",
            "to_column": "ModYearReg"
        },
        {
            "from_table": "Ontario",
            "from_column": "ModYearReg",
            "to_table": "Append1",
            "to_column": "ModYearReg"
        },
        {
            "from_table": "Prince Edward Island",
            "from_column": "ModYearReg",
            "to_table": "Append1",
            "to_column": "ModYearReg"
        },
        {
            "from_table": "Quebec",
            "from_column": "ModYearReg",
            "to_table": "Append1",
            "to_column": "ModYearReg"
        },
        {
            "from_table": "Saskatchewan",
            "from_column": "ModYearReg",
            "to_table": "Append1",
            "to_column": "ModYearReg"
        },
        {
            "from_table": "Yukon",
            "from_column": "ModYearReg",
            "to_table": "Append1",
            "to_column": "ModYearReg"
        },
        {
            "from_table": "Append1",
            "from_column": "ModelID",
            "to_table": "ModelID",
            "to_column": "ModelID"
        },
        {
            "from_table": "Append1",
            "from_column": "RegID",
            "to_table": "RegID",
            "to_column": "RegID"
        },
        {
            "from_table": "ModYear",
            "from_column": "ModelID",
            "to_table": "ModelID",
            "to_column": "ModelID"
        },
        {
            "from_table": "Append1",
            "from_column": "YearID",
            "to_table": "YearID",
            "to_column": "YearID"
        }
    ]
}