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: Dates
| Date                    | Day Name   |   Day |   Week of Year | Start of Week           | Start of Month          |   Month | Month Name   |   Quarter |   Year | Short Month   |
|:------------------------|:-----------|------:|---------------:|:------------------------|:------------------------|--------:|:-------------|----------:|-------:|:--------------|
| 2020-07-01 00:00:00.000 | Wednesday  |     1 |             27 | 2020-06-28 00:00:00.000 | 2020-07-01 00:00:00.000 |       7 | July         |         3 |   2020 | Jul           |
| 2020-07-02 00:00:00.000 | Thursday   |     2 |             27 | 2020-06-28 00:00:00.000 | 2020-07-01 00:00:00.000 |       7 | July         |         3 |   2020 | Jul           |
| 2020-07-03 00:00:00.000 | Friday     |     3 |             27 | 2020-06-28 00:00:00.000 | 2020-07-01 00:00:00.000 |       7 | July         |         3 |   2020 | Jul           |
| 2020-07-04 00:00:00.000 | Saturday   |     4 |             27 | 2020-06-28 00:00:00.000 | 2020-07-01 00:00:00.000 |       7 | July         |         3 |   2020 | Jul           |
| 2020-07-05 00:00:00.000 | Sunday     |     5 |             28 | 2020-07-05 00:00:00.000 | 2020-07-01 00:00:00.000 |       7 | July         |         3 |   2020 | Jul           |
| 2020-07-06 00:00:00.000 | Monday     |     6 |             28 | 2020-07-05 00:00:00.000 | 2020-07-01 00:00:00.000 |       7 | July         |         3 |   2020 | Jul           |
| 2020-07-07 00:00:00.000 | Tuesday    |     7 |             28 | 2020-07-05 00:00:00.000 | 2020-07-01 00:00:00.000 |       7 | July         |         3 |   2020 | Jul           |
| 2020-07-08 00:00:00.000 | Wednesday  |     8 |             28 | 2020-07-05 00:00:00.000 | 2020-07-01 00:00:00.000 |       7 | July         |         3 |   2020 | Jul           |
| 2020-07-09 00:00:00.000 | Thursday   |     9 |             28 | 2020-07-05 00:00:00.000 | 2020-07-01 00:00:00.000 |       7 | July         |         3 |   2020 | Jul           |
| 2020-07-10 00:00:00.000 | Friday     |    10 |             28 | 2020-07-05 00:00:00.000 | 2020-07-01 00:00:00.000 |       7 | July         |         3 |   2020 | Jul           |


Table: Products
|   Index | Product Name       |
|--------:|:-------------------|
|       1 | Cookware           |
|       2 | Photo Frames       |
|       3 | Table Lamps        |
|       4 | Serveware          |
|       5 | Bathroom Furniture |
|       6 | Computers          |
|       7 | Dinnerware         |
|       8 | Cocktail Glasses   |
|       9 | Baseball           |
|      10 | Blankets           |


Table: Sales Teams Performance Groups
| Groups          |     Min |      Max |
|:----------------|--------:|---------:|
| Low Performers  |       0 |  1650000 |
| Mid Performers  | 1650001 |  1700000 |
| High Performers | 1700001 | 10000000 |


Table: Sales
| Order Number   | Sales Date              | Sales Channel   |   Salesteam Index |   Store Index |   Product Index |   Order Quantity |   Unit Price |   Unit Cost |
|:---------------|:------------------------|:----------------|------------------:|--------------:|----------------:|-----------------:|-------------:|------------:|
| SO19441        | 2020-01-01 00:00:00.000 | Wholesale       |                19 |           187 |              36 |                9 |      362.97  |     259.264 |
| SO13652        | 2020-01-01 00:00:00.000 | Wholesale       |                 3 |            27 |              47 |                9 |      433.587 |     309.705 |
| SO14112        | 2020-01-01 00:00:00.000 | Wholesale       |                11 |           173 |              37 |                9 |      157.586 |     112.562 |
| SO220          | 2020-01-02 00:00:00.000 | Wholesale       |                17 |           298 |              26 |                9 |      363.724 |     259.803 |
| SO2339         | 2020-01-02 00:00:00.000 | Wholesale       |                26 |           195 |              13 |                9 |      315.696 |     225.497 |
| SO1430         | 2020-01-02 00:00:00.000 | Wholesale       |                25 |            24 |              29 |                9 |      448.108 |     320.077 |
| SO94           | 2020-01-02 00:00:00.000 | Wholesale       |                25 |             5 |              26 |                9 |      502.803 |     359.145 |
| SO16945        | 2020-01-03 00:00:00.000 | Wholesale       |                 1 |           138 |              25 |                9 |      448.554 |     320.395 |
| SO15214        | 2020-01-03 00:00:00.000 | Wholesale       |                 7 |           284 |              42 |                9 |      558.289 |     398.778 |
| SO15322        | 2020-01-03 00:00:00.000 | Wholesale       |                13 |           330 |               4 |                9 |      432.854 |     309.181 |


Table: Sales_Teams
|   SalesTeam_Key | Sales Team       | Region    |
|----------------:|:-----------------|:----------|
|               1 | Adam Hernandez   | Northeast |
|               2 | Keith Griffin    | Northeast |
|               3 | Jerry Green      | West      |
|               4 | Chris Armstrong  | Northeast |
|               5 | Stephen Payne    | South     |
|               6 | Joshua Bennett   | Northeast |
|               7 | Shawn Cook       | Midwest   |
|               8 | George Lewis     | West      |
|               9 | Joshua Ryan      | Midwest   |
|              10 | Jonathan Hawkins | West      |


Table: State_Regions
| State Code   | State                | Region    |
|:-------------|:---------------------|:----------|
| AL           | Alabama              | South     |
| AR           | Arkansas             | South     |
| AZ           | Arizona              | West      |
| CA           | California           | West      |
| CO           | Colorado             | West      |
| CT           | Connecticut          | Northeast |
| DC           | District of Columbia | South     |
| DE           | Delaware             | South     |
| FL           | Florida              | South     |
| GA           | Georgia              | South     |


Table: Store_Locations
|   id | City        | County              | State_Code   | State      | Type   |   Latitude |   Longitude |   Area_code |   Population |   Households |   Median_income |
|-----:|:------------|:--------------------|:-------------|:-----------|:-------|-----------:|------------:|------------:|-------------:|-------------:|----------------:|
|   16 | Anaheim     | Orange County       | CA           | California | City   |    33.8353 |    -117.915 |         657 |       350742 |        99670 |           60752 |
|   17 | Antioch     | Contra Costa County | CA           | California | City   |    38.0049 |    -121.806 |         925 |       110542 |        33718 |           64329 |
|   18 | Bakersfield | Kern County         | CA           | California | City   |    35.3733 |    -119.019 |         661 |       373640 |       112439 |           57095 |
|   19 | Berkeley    | Alameda County      | CA           | California | City   |    37.8716 |    -122.273 |         510 |       120972 |        45917 |           66237 |
|   20 | Burbank     | Los Angeles County  | CA           | California | City   |    34.1808 |    -118.309 |         818 |       105319 |        41361 |           66076 |
|   21 | Carlsbad    | San Diego County    | CA           | California | City   |    33.1581 |    -117.351 |         760 |       113453 |        42791 |           90597 |
|   22 | Chula Vista | San Diego County    | CA           | California | City   |    32.64   |    -117.084 |         619 |       265757 |        78066 |           65185 |
|   23 | Clovis      | Fresno County       | CA           | California | City   |    36.8252 |    -119.703 |         559 |       104180 |        34512 |           62666 |
|   24 | Concord     | Contra Costa County | CA           | California | City   |    37.978  |    -122.031 |         925 |       128667 |        45409 |           68318 |
|   25 | Corona      | Riverside County    | CA           | California | City   |    33.8753 |    -117.566 |         951 |       164226 |        48156 |           74149 |


Table: Top 3 Products by Month
| Short Month   | Product Name   |   @Amount |   @Pos |   Month |
|:--------------|:---------------|----------:|-------:|--------:|
| Jan           | Wine Storage   |    236580 |      3 |       1 |
| Jan           | Collectibles   |    241075 |      2 |       1 |
| Jan           | Vanities       |    241405 |      1 |       1 |
| Feb           | Festive        |    227729 |      3 |       2 |
| Feb           | Clocks         |    229060 |      2 |       2 |
| Feb           | Ornaments      |    241819 |      1 |       2 |
| Mar           | Bean Bags      |    230507 |      3 |       3 |
| Mar           | Bar Tools      |    233529 |      2 |       3 |
| Mar           | Vases          |    238025 |      1 |       3 |
| Apr           | Ornaments      |    226354 |      3 |       4 |

 


tables: name: Dates
data: Dates.csv
name: Products
data: Products.csv
name: Sales Teams Performance Groups
data: Sales Teams Performance Groups.csv
name: Sales
data: Sales.csv
name: Sales_Teams
data: Sales_Teams.csv
name: State_Regions
data: State_Regions.csv
name: Store_Locations
data: Store_Locations.csv
name: Top 3 Products by Month
data: Top 3 Products by Month.csv
label: Store_Locations
State_Code
State_Regions
State Code
Sales
Product Index
Products
Index
Sales
Salesteam Index
Sales_Teams
SalesTeam_Key
Sales
Store Index
Store_Locations
id
Sales
Sales Date
Dates
Date
output: {
    "joins": [
        {
            "from_table": "Store_Locations",
            "from_column": "State_Code",
            "to_table": "State_Regions",
            "to_column": "State Code"
        },
        {
            "from_table": "Sales",
            "from_column": "Product Index",
            "to_table": "Products",
            "to_column": "Index"
        },
        {
            "from_table": "Sales",
            "from_column": "Salesteam Index",
            "to_table": "Sales_Teams",
            "to_column": "SalesTeam_Key"
        },
        {
            "from_table": "Sales",
            "from_column": "Store Index",
            "to_table": "Store_Locations",
            "to_column": "id"
        },
        {
            "from_table": "Sales",
            "from_column": "Sales Date",
            "to_table": "Dates",
            "to_column": "Date"
        }
    ]
}