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 | contact    | store_no   | account               |
|-------------:|:-----------|:-----------|:----------------------|
|            0 | Quinn K.   | DSG 1      | Dick's Sporting Goods |
|            1 | Pierre M.  | DSG 101    | Dick's Sporting Goods |
|            2 | Limon L.   | Sears 201  | Sears                 |
|            3 | Larry I.   | T 490      | Target                |
|            4 | Sim S.     | T 95       | Target                |
|            5 | Terry B.   | T 837      | Target                |
|            6 | Yung L.    | B5 9       | Big 5                 |
|            7 | Koto M.    | B5 235     | Big 5                 |
|            8 | Preston R. | DSG 65     | Dick's Sporting Goods |
|            9 | Kolby G.   | K 2100     | Kroger                |


Table: Calendar
| Date                    |   Year |   Week of Year | Start of Year           | End of Year             |   Month | Start of Month          | End of Month            |   Days in Month |   Day | Day Name   |   Day of Week |   Day of Year | Month Name   |   Quarter | Start of Quarter        | End of Quarter          |   Week of Month | Start of Week           | End of Week             |   Fiscal Year |   Fiscal Quarter |   Fiscal Month | Is Past   | Quarter Name   | Day Name Shortened   | Month Name Shortened   | Month Year   | Quarter Year   |   Month Year Index |   Quarter Year Index |   Year Week Index |
|:------------------------|-------:|---------------:|:------------------------|:------------------------|--------:|:------------------------|:------------------------|----------------:|------:|:-----------|--------------:|--------------:|:-------------|----------:|:------------------------|:------------------------|----------------:|:------------------------|:------------------------|--------------:|-----------------:|---------------:|:----------|:---------------|:---------------------|:-----------------------|:-------------|:---------------|-------------------:|---------------------:|------------------:|
| 2017-07-01 00:00:00.000 |   2017 |             27 | 2017-01-01 00:00:00.000 | 2017-12-31 00:00:00.000 |       7 | 2017-07-01 00:00:00.000 | 2017-07-31 00:00:00.000 |              31 |     1 | Saturday   |             6 |           182 | July         |         3 | 2017-07-01 00:00:00.000 | 2017-09-30 00:00:00.000 |               1 | 2017-06-26 00:00:00.000 | 2017-07-02 00:00:00.000 |          2018 |                1 |              1 | True      | Q3             | Sat                  | Jul                    | Jul 2017     | Q3 2017        |                  7 |                    3 |                27 |
| 2017-07-02 00:00:00.000 |   2017 |             27 | 2017-01-01 00:00:00.000 | 2017-12-31 00:00:00.000 |       7 | 2017-07-01 00:00:00.000 | 2017-07-31 00:00:00.000 |              31 |     2 | Sunday     |             0 |           183 | July         |         3 | 2017-07-01 00:00:00.000 | 2017-09-30 00:00:00.000 |               1 | 2017-06-26 00:00:00.000 | 2017-07-02 00:00:00.000 |          2018 |                1 |              1 | True      | Q3             | Sun                  | Jul                    | Jul 2017     | Q3 2017        |                  7 |                    3 |                27 |
| 2017-07-03 00:00:00.000 |   2017 |             28 | 2017-01-01 00:00:00.000 | 2017-12-31 00:00:00.000 |       7 | 2017-07-01 00:00:00.000 | 2017-07-31 00:00:00.000 |              31 |     3 | Monday     |             1 |           184 | July         |         3 | 2017-07-01 00:00:00.000 | 2017-09-30 00:00:00.000 |               2 | 2017-07-03 00:00:00.000 | 2017-07-09 00:00:00.000 |          2018 |                1 |              1 | True      | Q3             | Mon                  | Jul                    | Jul 2017     | Q3 2017        |                  7 |                    3 |                28 |
| 2017-07-04 00:00:00.000 |   2017 |             28 | 2017-01-01 00:00:00.000 | 2017-12-31 00:00:00.000 |       7 | 2017-07-01 00:00:00.000 | 2017-07-31 00:00:00.000 |              31 |     4 | Tuesday    |             2 |           185 | July         |         3 | 2017-07-01 00:00:00.000 | 2017-09-30 00:00:00.000 |               2 | 2017-07-03 00:00:00.000 | 2017-07-09 00:00:00.000 |          2018 |                1 |              1 | True      | Q3             | Tue                  | Jul                    | Jul 2017     | Q3 2017        |                  7 |                    3 |                28 |
| 2017-07-05 00:00:00.000 |   2017 |             28 | 2017-01-01 00:00:00.000 | 2017-12-31 00:00:00.000 |       7 | 2017-07-01 00:00:00.000 | 2017-07-31 00:00:00.000 |              31 |     5 | Wednesday  |             3 |           186 | July         |         3 | 2017-07-01 00:00:00.000 | 2017-09-30 00:00:00.000 |               2 | 2017-07-03 00:00:00.000 | 2017-07-09 00:00:00.000 |          2018 |                1 |              1 | True      | Q3             | Wed                  | Jul                    | Jul 2017     | Q3 2017        |                  7 |                    3 |                28 |
| 2017-07-06 00:00:00.000 |   2017 |             28 | 2017-01-01 00:00:00.000 | 2017-12-31 00:00:00.000 |       7 | 2017-07-01 00:00:00.000 | 2017-07-31 00:00:00.000 |              31 |     6 | Thursday   |             4 |           187 | July         |         3 | 2017-07-01 00:00:00.000 | 2017-09-30 00:00:00.000 |               2 | 2017-07-03 00:00:00.000 | 2017-07-09 00:00:00.000 |          2018 |                1 |              1 | True      | Q3             | Thu                  | Jul                    | Jul 2017     | Q3 2017        |                  7 |                    3 |                28 |
| 2017-07-07 00:00:00.000 |   2017 |             28 | 2017-01-01 00:00:00.000 | 2017-12-31 00:00:00.000 |       7 | 2017-07-01 00:00:00.000 | 2017-07-31 00:00:00.000 |              31 |     7 | Friday     |             5 |           188 | July         |         3 | 2017-07-01 00:00:00.000 | 2017-09-30 00:00:00.000 |               2 | 2017-07-03 00:00:00.000 | 2017-07-09 00:00:00.000 |          2018 |                1 |              1 | True      | Q3             | Fri                  | Jul                    | Jul 2017     | Q3 2017        |                  7 |                    3 |                28 |
| 2017-07-08 00:00:00.000 |   2017 |             28 | 2017-01-01 00:00:00.000 | 2017-12-31 00:00:00.000 |       7 | 2017-07-01 00:00:00.000 | 2017-07-31 00:00:00.000 |              31 |     8 | Saturday   |             6 |           189 | July         |         3 | 2017-07-01 00:00:00.000 | 2017-09-30 00:00:00.000 |               2 | 2017-07-03 00:00:00.000 | 2017-07-09 00:00:00.000 |          2018 |                1 |              1 | True      | Q3             | Sat                  | Jul                    | Jul 2017     | Q3 2017        |                  7 |                    3 |                28 |
| 2017-07-09 00:00:00.000 |   2017 |             28 | 2017-01-01 00:00:00.000 | 2017-12-31 00:00:00.000 |       7 | 2017-07-01 00:00:00.000 | 2017-07-31 00:00:00.000 |              31 |     9 | Sunday     |             0 |           190 | July         |         3 | 2017-07-01 00:00:00.000 | 2017-09-30 00:00:00.000 |               2 | 2017-07-03 00:00:00.000 | 2017-07-09 00:00:00.000 |          2018 |                1 |              1 | True      | Q3             | Sun                  | Jul                    | Jul 2017     | Q3 2017        |                  7 |                    3 |                28 |
| 2017-07-10 00:00:00.000 |   2017 |             29 | 2017-01-01 00:00:00.000 | 2017-12-31 00:00:00.000 |       7 | 2017-07-01 00:00:00.000 | 2017-07-31 00:00:00.000 |              31 |    10 | Monday     |             1 |           191 | July         |         3 | 2017-07-01 00:00:00.000 | 2017-09-30 00:00:00.000 |               3 | 2017-07-10 00:00:00.000 | 2017-07-16 00:00:00.000 |          2018 |                1 |              1 | True      | Q3             | Mon                  | Jul                    | Jul 2017     | Q3 2017        |                  7 |                    3 |                29 |


Table: Flat Table
| product           | product_type   | supplier     | country   | sales_person   | contact    | store_no   | account               | order_date              | ship_date               |    value |
|:------------------|:---------------|:-------------|:----------|:---------------|:-----------|:-----------|:----------------------|:------------------------|:------------------------|---------:|
| Basketball Jersey | Clothing       | Adidas       | China     | Jessica J.     | Quinn K.   | DSG 1      | Dick's Sporting Goods | 2019-01-03 00:00:00.000 | 2019-01-05 00:00:00.000 |  9.50021 |
| Basketball Jersey | Clothing       | Nike         | USA       | Jon H.         | Pierre M.  | DSG 101    | Dick's Sporting Goods | 2019-01-05 00:00:00.000 | 2019-01-07 00:00:00.000 | 10       |
| Basketball Jersey | Clothing       | Under Armour | Tiawan    | Jose K.        | Limon L.   | Sears 201  | Sears                 | 2019-01-07 00:00:00.000 | 2019-01-09 00:00:00.000 |  9.677   |
| Soccer Ball       | Ball           | Adidas       | China     | Jaina Q.       | Larry I.   | T 490      | Target                | 2019-01-09 00:00:00.000 | 2019-01-11 00:00:00.000 |  9.7778  |
| Soccer Ball       | Ball           | Nike         | USA       | Jessica J.     | Sim S.     | T 95       | Target                | 2019-01-11 00:00:00.000 | 2019-01-13 00:00:00.000 |  9.99987 |
| Soccer Ball       | Ball           | Under Armour | Tiawan    | Jon H.         | Terry B.   | T 837      | Target                | 2019-01-13 00:00:00.000 | 2019-01-15 00:00:00.000 |  9.99987 |
| Football Helmet   | Equipment      | Adidas       | China     | Jose K.        | Yung L.    | B5 9       | Big 5                 | 2019-01-15 00:00:00.000 | 2019-01-17 00:00:00.000 |  9.99987 |
| Football Helmet   | Equipment      | Nike         | USA       | Jaina Q.       | Koto M.    | B5 235     | Big 5                 | 2019-01-17 00:00:00.000 | 2019-01-19 00:00:00.000 |  9.50021 |
| Football Helmet   | Equipment      | Under Armour | Tiawan    | Jessica J.     | Preston R. | DSG 65     | Dick's Sporting Goods | 2019-01-19 00:00:00.000 | 2019-01-21 00:00:00.000 | 10       |
| Basketball Ball   | Ball           | Adidas       | China     | Jon H.         | Kolby G.   | K 2100     | Kroger                | 2019-01-21 00:00:00.000 | 2019-01-23 00:00:00.000 |  9.677   |


Table: MeasureTable



Table: Product
|   Product ID | product           | product_type   |
|-------------:|:------------------|:---------------|
|            0 | Basketball Jersey | Clothing       |
|            1 | Soccer Ball       | Ball           |
|            2 | Football Helmet   | Equipment      |
|            3 | Basketball Ball   | Ball           |


Table: Sales
|   value |   Supplier ID |   Sales Person ID |   Account ID |   Product ID | Order Start of Month    |
|--------:|--------------:|------------------:|-------------:|-------------:|:------------------------|
| 19.0004 |             0 |                 0 |            0 |            0 | 2019-01-01 00:00:00.000 |
| 20      |             1 |                 1 |            1 |            0 | 2019-01-01 00:00:00.000 |
| 19.354  |             2 |                 2 |            2 |            0 | 2019-01-01 00:00:00.000 |
| 19.0004 |             3 |                 3 |           11 |            0 | 2019-01-01 00:00:00.000 |
| 19.9998 |             1 |                 0 |            4 |            1 | 2019-01-01 00:00:00.000 |
| 19.6316 |             1 |                 0 |           31 |            1 | 2019-01-01 00:00:00.000 |
| 19.6394 |             1 |                 0 |           38 |            1 | 2019-01-01 00:00:00.000 |
| 19.9998 |             2 |                 1 |            5 |            1 | 2019-01-01 00:00:00.000 |
| 19.6094 |             3 |                 1 |           12 |            1 | 2019-01-01 00:00:00.000 |
| 19.5556 |             0 |                 3 |            3 |            1 | 2019-01-01 00:00:00.000 |


Table: SalesPerson
|   Sales Person ID | Sales Team   | Sales Region   | sales_person   |
|------------------:|:-------------|:---------------|:---------------|
|                 0 | Jessica      | North          | Jessica J.     |
|                 1 | Jessica      | North          | Jon H.         |
|                 2 | Jaina        | South          | Jose K.        |
|                 3 | Jaina        | South          | Jaina Q.       |
|                 4 | Jaina        | South          | Joe K.         |


Table: Supplier
|   Supplier ID | supplier     | country   |
|--------------:|:-------------|:----------|
|             0 | Adidas       | China     |
|             1 | Nike         | USA       |
|             2 | Under Armour | Tiawan    |
|             3 | Under Armour | USA       |
|             4 | Adidas       | Mexico    |
|             5 | Under Armour | Canada    |
|             6 | Nike         | Mexico    |
|             7 | Under Armour | England   |

 


tables: name: Account
data: Account.csv
name: Calendar
data: Calendar.csv
name: Flat Table
data: Flat Table.csv
name: MeasureTable
data: MeasureTable.csv
name: Product
data: Product.csv
name: Sales
data: Sales.csv
name: SalesPerson
data: SalesPerson.csv
name: Supplier
data: Supplier.csv
label: Sales
Account ID
Account
Account ID
Sales
Sales Person ID
SalesPerson
Sales Person ID
Sales
Supplier ID
Supplier
Supplier ID
Sales
Product ID
Product
Product ID
Sales
Order Start of Month
Calendar
Date
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "Account ID",
            "to_table": "Account",
            "to_column": "Account ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Sales Person ID",
            "to_table": "SalesPerson",
            "to_column": "Sales Person ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Supplier ID",
            "to_table": "Supplier",
            "to_column": "Supplier ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Product ID",
            "to_table": "Product",
            "to_column": "Product ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Order Start of Month",
            "to_table": "Calendar",
            "to_column": "Date"
        }
    ]
}