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: Categories
| Category        |
|:----------------|
| Footwear Boots  |
| Backpacks       |
| Hiking          |
| Climbing Gear   |
| Footwear Casual |
| Jackets         |


Table: Dates
| Date                    |
|:------------------------|
| 2020-01-01 00:00:00.000 |
| 2020-01-02 00:00:00.000 |
| 2020-01-03 00:00:00.000 |
| 2020-01-04 00:00:00.000 |
| 2020-01-05 00:00:00.000 |
| 2020-01-06 00:00:00.000 |
| 2020-01-07 00:00:00.000 |
| 2020-01-08 00:00:00.000 |
| 2020-01-09 00:00:00.000 |
| 2020-01-10 00:00:00.000 |


Table: Locations
|   LocationId | Location       | Online Store   |   Sales Target |
|-------------:|:---------------|:---------------|---------------:|
|            1 | Denver         | False          |         200000 |
|            2 | Salt Lake City | False          |         200000 |
|            3 | San Jose       | False          |         200000 |
|            4 | Seatle         | False          |         100000 |
|            5 | Minneapolis    | False          |         200000 |
|            0 | CarvedRock.com | True           |         350000 |


Table: Products
| ProductCode   |
|:--------------|
| Hike-Lite     |
| HS-50L        |
| Walk-AT1x     |
| Walk-AT1      |
| HSX-75L       |
| GLV-01-SML    |
| Hike-Pro-x3   |
| CAM-22-S02    |
| GPS-X2        |
| TRN-NB-32S    |


Table: Sales
|   LocationId | SalesDate               | Category       | ProductCode   |   SalesAmount |
|-------------:|:------------------------|:---------------|:--------------|--------------:|
|            0 | 2020-08-31 00:00:00.000 | Footwear Boots | Hike-Pro-x3   |         240.5 |
|            0 | 2020-08-31 00:00:00.000 | Footwear Boots | Hike-Pro-x3   |         240.5 |
|            0 | 2020-08-31 00:00:00.000 | Footwear Boots | Hike-Pro-x3   |         240.5 |
|            0 | 2020-08-31 00:00:00.000 | Footwear Boots | Hike-Pro-x3   |         240.5 |
|            0 | 2020-08-30 00:00:00.000 | Footwear Boots | Hike-Pro-x3   |         240.5 |
|            0 | 2020-08-30 00:00:00.000 | Footwear Boots | Hike-Pro-x3   |         240.5 |
|            0 | 2020-08-30 00:00:00.000 | Footwear Boots | Hike-Pro-x3   |         240.5 |
|            0 | 2020-08-30 00:00:00.000 | Footwear Boots | Hike-Pro-x3   |         240.5 |
|            0 | 2020-08-30 00:00:00.000 | Footwear Boots | Hike-Pro-x3   |         240.5 |
|            0 | 2020-08-29 00:00:00.000 | Footwear Boots | Hike-Pro-x3   |         240.5 |

 


tables: name: Categories
data: Categories.csv
name: Dates
data: Dates.csv
name: Locations
data: Locations.csv
name: Products
data: Products.csv
name: Sales
data: Sales.csv
label: Sales
LocationId
Locations
LocationId
Sales
Category
Categories
Category
Sales
ProductCode
Products
ProductCode
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "LocationId",
            "to_table": "Locations",
            "to_column": "LocationId"
        },
        {
            "from_table": "Sales",
            "from_column": "Category",
            "to_table": "Categories",
            "to_column": "Category"
        },
        {
            "from_table": "Sales",
            "from_column": "ProductCode",
            "to_table": "Products",
            "to_column": "ProductCode"
        }
    ]
}