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: 2019
| Product Category   | Product Code   | Product Name   | Company Supplier Factory Code   | Delivery Date           |   Price /kg (2019) |   Total intake kg |   kg rejected in 19 |   Total weight accepted(2019) |   Revenue loss(2019) |
|:-------------------|:---------------|:---------------|:--------------------------------|:------------------------|-------------------:|------------------:|--------------------:|------------------------------:|---------------------:|
| Meat & Poultry     | B8361          | Product7       | UK71                            | 2019-08-10 00:00:00.000 |             17.255 |          1150.72  |                   0 |                      1150.72  |                    0 |
| Meat & Poultry     | B8361          | Product7       | UK71                            | 2019-08-11 00:00:00.000 |             17.255 |          7834.77  |                   0 |                      7834.77  |                    0 |
| Meat & Poultry     | B8361          | Product7       | UK71                            | 2019-08-12 00:00:00.000 |             17.255 |          2962.23  |                   0 |                      2962.23  |                    0 |
| Meat & Poultry     | B8361          | Product7       | UK71                            | 2019-08-13 00:00:00.000 |             17.255 |          3733.82  |                   0 |                      3733.82  |                    0 |
| Meat & Poultry     | B8361          | Product7       | UK71                            | 2019-08-14 00:00:00.000 |             17.255 |          4097.29  |                   0 |                      4097.29  |                    0 |
| Meat & Poultry     | B8361          | Product7       | UK71                            | 2019-08-15 00:00:00.000 |             17.255 |          3148.6   |                   0 |                      3148.6   |                    0 |
| Meat & Poultry     | B8361          | Product7       | UK71                            | 2019-08-16 00:00:00.000 |             17.255 |           789.076 |                   0 |                       789.076 |                    0 |
| Meat & Poultry     | B8361          | Product7       | UK71                            | 2019-08-19 00:00:00.000 |             17.255 |          1040.18  |                   0 |                      1040.18  |                    0 |
| Meat & Poultry     | B8361          | Product7       | UK71                            | 2019-08-20 00:00:00.000 |             17.255 |           770.151 |                   0 |                       770.151 |                    0 |
| Meat & Poultry     | B8361          | Product7       | UK71                            | 2019-08-21 00:00:00.000 |             17.255 |          8143.3   |                   0 |                      8143.3   |                    0 |


Table: 2020
| Product Category   | Product Code   | Product Name   | Company Supplier Factory Code   | Delivery Date           |   Price/ kg (2020) |   Total intake kg |   kg rejected in 20 |   Total weight accepted(2020) |   Revenue loss(2020) |
|:-------------------|:---------------|:---------------|:--------------------------------|:------------------------|-------------------:|------------------:|--------------------:|------------------------------:|---------------------:|
| Meat & Poultry     | B8250          | Product5       | UK71                            | 2020-01-01 00:00:00.000 |            21.0762 |         23971.5   |                   0 |                     23971.5   |                    0 |
| Meat & Poultry     | B8250          | Product5       | UK71                            | 2020-01-02 00:00:00.000 |            21.058  |         13836.7   |                   0 |                     13836.7   |                    0 |
| Meat & Poultry     | B8250          | Product5       | UK71                            | 2020-01-04 00:00:00.000 |            21.058  |         18196.9   |                   0 |                     18196.9   |                    0 |
| Meat & Poultry     | B8250          | Product5       | UK71                            | 2020-01-05 00:00:00.000 |            21.058  |         14399.1   |                   0 |                     14399.1   |                    0 |
| Meat & Poultry     | B8250          | Product5       | UK71                            | 2020-01-06 00:00:00.000 |            21.058  |          8430.05  |                   0 |                      8430.05  |                    0 |
| Meat & Poultry     | B8250          | Product5       | UK71                            | 2020-01-07 00:00:00.000 |            21.058  |          6718.74  |                   0 |                      6718.74  |                    0 |
| Meat & Poultry     | B8250          | Product5       | UK71                            | 2020-01-08 00:00:00.000 |            21.058  |           952.359 |                   0 |                       952.359 |                    0 |
| Meat & Poultry     | B8250          | Product5       | UK71                            | 2020-01-11 00:00:00.000 |            19.515  |         27798.1   |                   0 |                     27798.1   |                    0 |
| Meat & Poultry     | B8250          | Product5       | UK71                            | 2020-01-12 00:00:00.000 |            19.515  |         33861.7   |                   0 |                     33861.7   |                    0 |
| Meat & Poultry     | B8250          | Product5       | UK71                            | 2020-01-13 00:00:00.000 |            19.515  |         33323.5   |                   0 |                     33323.5   |                    0 |


Table: Branding Information
| Product Code   | Product Brand   | Product Category   |
|:---------------|:----------------|:-------------------|
| B8249          | Standard        | Meat & Poultry     |
| B8250          | Standard        | Meat & Poultry     |
| B8179          | Discount        | Meat & Poultry     |
| B8510          | Discount        | Meat & Poultry     |
| B8346          | Standard        | Meat & Poultry     |
| B8495          | Discount        | Meat & Poultry     |
| B8385          | Standard        | Meat & Poultry     |
| B8390          | Premium         | Meat & Poultry     |
| B8361          | Premium         | Meat & Poultry     |
| B8360          | Standard        | Meat & Poultry     |


Table: Date Dim
| Date                    |   Year | Month   | Qtr   |
|:------------------------|-------:|:--------|:------|
| 2019-01-01 00:00:00.000 |   2019 | January | Qtr 1 |
| 2019-01-02 00:00:00.000 |   2019 | January | Qtr 1 |
| 2019-01-03 00:00:00.000 |   2019 | January | Qtr 1 |
| 2019-01-04 00:00:00.000 |   2019 | January | Qtr 1 |
| 2019-01-05 00:00:00.000 |   2019 | January | Qtr 1 |
| 2019-01-06 00:00:00.000 |   2019 | January | Qtr 1 |
| 2019-01-07 00:00:00.000 |   2019 | January | Qtr 1 |
| 2019-01-08 00:00:00.000 |   2019 | January | Qtr 1 |
| 2019-01-09 00:00:00.000 |   2019 | January | Qtr 1 |
| 2019-01-10 00:00:00.000 |   2019 | January | Qtr 1 |


Table: Supplier Detail
| Supplier Factory Code   | Supplier Country      | Supplier Site Name   |
|:------------------------|:----------------------|:---------------------|
| UK71                    | Eng & Wales (UK)      | Supplier4            |
| IE31                    | Ireland               | Supplier2            |
| IE32                    | Ireland               | Supplier3            |
| UK90                    | Northern Ireland (UK) | Supplier1            |

 


tables: name: 2019
data: 2019.csv
name: 2020
data: 2020.csv
name: Branding Information
data: Branding Information.csv
name: Date Dim
data: Date Dim.csv
name: Supplier Detail
data: Supplier Detail.csv
label: 2019
Product Code
Branding Information
Product Code
2020
Product Code
Branding Information
Product Code
2019
Company Supplier Factory Code
Supplier Detail
Supplier Factory Code
2020
Company Supplier Factory Code
Supplier Detail
Supplier Factory Code
output: {
    "joins": [
        {
            "from_table": "2019",
            "from_column": "Product Code",
            "to_table": "Branding Information",
            "to_column": "Product Code"
        },
        {
            "from_table": "2020",
            "from_column": "Product Code",
            "to_table": "Branding Information",
            "to_column": "Product Code"
        },
        {
            "from_table": "2019",
            "from_column": "Company Supplier Factory Code",
            "to_table": "Supplier Detail",
            "to_column": "Supplier Factory Code"
        },
        {
            "from_table": "2020",
            "from_column": "Company Supplier Factory Code",
            "to_table": "Supplier Detail",
            "to_column": "Supplier Factory Code"
        }
    ]
}