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: Geography
|   GeographyKey | City          | StateProvinceName   | EnglishCountryRegionName   |   SalesTerritoryKey |
|---------------:|:--------------|:--------------------|:---------------------------|--------------------:|
|            292 | Alhambra      | California          | United States              |                   4 |
|            293 | Alpine        | California          | United States              |                   4 |
|            294 | Auburn        | California          | United States              |                   4 |
|            295 | Baldwin Park  | California          | United States              |                   4 |
|            296 | Barstow       | California          | United States              |                   4 |
|            297 | Bell Gardens  | California          | United States              |                   4 |
|            298 | Bellflower    | California          | United States              |                   4 |
|            299 | Berkeley      | California          | United States              |                   4 |
|            300 | Beverly Hills | California          | United States              |                   4 |
|            301 | Burbank       | California          | United States              |                   4 |


Table: Product
|   ProductKey |   ProductSubcategoryKey | EnglishProductName        |   Standard Cost | Color   |   ProductSubCategory.ProductSubCategoryKey | ProductSubCategory.EnglishProductSubcategoryName   |   ProductSubCategory.ProductCategoryKey |   ProductSubCategory.ProductCategory.ProductCategoryKey | ProductSubCategory.ProductCategory.EnglishProductCategoryName   |
|-------------:|------------------------:|:--------------------------|----------------:|:--------|-------------------------------------------:|:---------------------------------------------------|----------------------------------------:|--------------------------------------------------------:|:----------------------------------------------------------------|
|          210 |                      14 | HL Road Frame - Black, 58 |         -1      | Black   |                                         14 | Road Frames                                        |                                       2 |                                                       2 | Components                                                      |
|          215 |                      31 | Sport-100 Helmet, Black   |         12.0278 | Black   |                                         31 | Helmets                                            |                                       4 |                                                       4 | Accessories                                                     |
|          216 |                      31 | Sport-100 Helmet, Black   |         13.8782 | Black   |                                         31 | Helmets                                            |                                       4 |                                                       4 | Accessories                                                     |
|          217 |                      31 | Sport-100 Helmet, Black   |         13.0863 | Black   |                                         31 | Helmets                                            |                                       4 |                                                       4 | Accessories                                                     |
|          253 |                      14 | LL Road Frame - Black, 58 |        176.2    | Black   |                                         14 | Road Frames                                        |                                       2 |                                                       2 | Components                                                      |
|          254 |                      14 | LL Road Frame - Black, 58 |        170.143  | Black   |                                         14 | Road Frames                                        |                                       2 |                                                       2 | Components                                                      |
|          255 |                      14 | LL Road Frame - Black, 58 |        204.625  | Black   |                                         14 | Road Frames                                        |                                       2 |                                                       2 | Components                                                      |
|          256 |                      14 | LL Road Frame - Black, 60 |        176.2    | Black   |                                         14 | Road Frames                                        |                                       2 |                                                       2 | Components                                                      |
|          257 |                      14 | LL Road Frame - Black, 60 |        170.143  | Black   |                                         14 | Road Frames                                        |                                       2 |                                                       2 | Components                                                      |
|          258 |                      14 | LL Road Frame - Black, 60 |        204.625  | Black   |                                         14 | Road Frames                                        |                                       2 |                                                       2 | Components                                                      |


Table: ProductCategory
|   ProductCategoryKey | EnglishProductCategoryName   |
|---------------------:|:-----------------------------|
|                    1 | Bikes                        |
|                    2 | Components                   |
|                    3 | Clothing                     |
|                    4 | Accessories                  |


Table: ProductSubCategory
|   ProductSubCategoryKey | EnglishProductSubcategoryName   |   ProductCategoryKey |   ProductCategory.ProductCategoryKey | ProductCategory.EnglishProductCategoryName   |
|------------------------:|:--------------------------------|---------------------:|-------------------------------------:|:---------------------------------------------|
|                       1 | Mountain Bikes                  |                    1 |                                    1 | Bikes                                        |
|                       2 | Road Bikes                      |                    1 |                                    1 | Bikes                                        |
|                       3 | Touring Bikes                   |                    1 |                                    1 | Bikes                                        |
|                       4 | Handlebars                      |                    2 |                                    2 | Components                                   |
|                       5 | Bottom Brackets                 |                    2 |                                    2 | Components                                   |
|                       6 | Brakes                          |                    2 |                                    2 | Components                                   |
|                       7 | Chains                          |                    2 |                                    2 | Components                                   |
|                       8 | Cranksets                       |                    2 |                                    2 | Components                                   |
|                       9 | Derailleurs                     |                    2 |                                    2 | Components                                   |
|                      10 | Forks                           |                    2 |                                    2 | Components                                   |


Table: Region
|   SalesTerritoryKey | Region         | Country        | Group         |
|--------------------:|:---------------|:---------------|:--------------|
|                   1 | Northwest      | United States  | North America |
|                   2 | Northeast      | United States  | North America |
|                   3 | Central        | United States  | North America |
|                   4 | Southwest      | United States  | North America |
|                   5 | Southeast      | United States  | North America |
|                   6 | Canada         | Canada         | North America |
|                   7 | France         | France         | Europe        |
|                   8 | Germany        | Germany        | Europe        |
|                   9 | Australia      | Australia      | Pacific       |
|                  10 | United Kingdom | United Kingdom | Europe        |


Table: Reseller
|   ResellerKey |   GeographyKey | Business Type        | Reseller Name          |
|--------------:|---------------:|:---------------------|:-----------------------|
|             1 |            637 | Value Added Reseller | A Bike Store           |
|             4 |            572 | Value Added Reseller | Modular Cycle Systems  |
|             7 |            599 | Value Added Reseller | Associated Bikes       |
|            10 |             44 | Value Added Reseller | Rural Cycle Emporium   |
|            13 |            211 | Value Added Reseller | Country Parts Shop     |
|            16 |            247 | Value Added Reseller | Bulk Discount Store    |
|            19 |            610 | Value Added Reseller | Center Cycle Shop      |
|            22 |            561 | Value Added Reseller | Travel Systems         |
|            25 |            317 | Value Added Reseller | Coalition Bike Company |
|            28 |             95 | Value Added Reseller | Commuter Bicycle Store |


Table: Sales
|   ResellerKey |   ProductKey |   OrderDateKey |   EmployeeKey |   SalesTerritoryKey |   Quantity |   Unit Price |    Cost |   Sales |
|--------------:|-------------:|---------------:|--------------:|--------------------:|-----------:|-------------:|--------:|--------:|
|           259 |          343 |    2.01201e+07 |           282 |                   4 |          1 |      469.794 | 486.707 | 469.794 |
|           258 |          325 |    2.01201e+07 |           282 |                   4 |          1 |      469.794 | 486.707 | 469.794 |
|           258 |          341 |    2.01201e+07 |           282 |                   4 |          1 |      469.794 | 486.707 | 469.794 |
|           258 |          331 |    2.01201e+07 |           282 |                   4 |          1 |      469.794 | 486.707 | 469.794 |
|            78 |          335 |    2.01201e+07 |           282 |                   4 |          1 |      469.794 | 486.707 | 469.794 |
|            97 |          323 |    2.01201e+07 |           282 |                   4 |          1 |      469.794 | 486.707 | 469.794 |
|            97 |          333 |    2.01201e+07 |           282 |                   4 |          1 |      469.794 | 486.707 | 469.794 |
|            97 |          325 |    2.01201e+07 |           282 |                   4 |          1 |      469.794 | 486.707 | 469.794 |
|           313 |          323 |    2.01201e+07 |           282 |                   4 |          1 |      469.794 | 486.707 | 469.794 |
|           528 |          333 |    2.01201e+07 |           282 |                   4 |          1 |      469.794 | 486.707 | 469.794 |


Table: SalesPerson
|   EmployeeKey |   SalesTerritoryKey | SalesPerson         | Title                        | Gender   |   BaseRate |
|--------------:|--------------------:|:--------------------|:-----------------------------|:---------|-----------:|
|           272 |                  11 | Stephen Jiang       | North American Sales Manager | M        |    48.101  |
|           281 |                   2 | Michael Blythe      | Sales Representative         | M        |    23.0769 |
|           282 |                   4 | Linda Mitchell      | Sales Representative         | F        |    23.0769 |
|           283 |                   3 | Jillian Carson      | Sales Representative         | F        |    23.0769 |
|           284 |                   6 | Garrett Vargas      | Sales Representative         | M        |    23.0769 |
|           285 |                   5 | Tsvi Reiter         | Sales Representative         | M        |    23.0769 |
|           286 |                   1 | Pamela Ansman-Wolfe | Sales Representative         | F        |    23.0769 |
|           287 |                   4 | Shu Ito             | Sales Representative         | M        |    23.0769 |
|           288 |                   6 | José Saraiva        | Sales Representative         | M        |    23.0769 |
|           289 |                   1 | David Campbell      | Sales Representative         | M        |    23.0769 |

 


tables: name: Geography
data: Geography.csv
name: Product
data: Product.csv
name: ProductCategory
data: ProductCategory.csv
name: ProductSubCategory
data: ProductSubCategory.csv
name: Region
data: Region.csv
name: Reseller
data: Reseller.csv
name: Sales
data: Sales.csv
name: SalesPerson
data: SalesPerson.csv
label: Sales
EmployeeKey
SalesPerson
EmployeeKey
SalesPerson
SalesTerritoryKey
Region
SalesTerritoryKey
Geography
SalesTerritoryKey
Region
SalesTerritoryKey
Sales
ProductKey
Product
ProductKey
ProductSubCategory
ProductCategoryKey
ProductCategory
ProductCategoryKey
Sales
ResellerKey
Reseller
ResellerKey
Product
ProductSubCategory.ProductSubCategoryKey
ProductSubCategory
ProductSubCategoryKey
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "EmployeeKey",
            "to_table": "SalesPerson",
            "to_column": "EmployeeKey"
        },
        {
            "from_table": "SalesPerson",
            "from_column": "SalesTerritoryKey",
            "to_table": "Region",
            "to_column": "SalesTerritoryKey"
        },
        {
            "from_table": "Geography",
            "from_column": "SalesTerritoryKey",
            "to_table": "Region",
            "to_column": "SalesTerritoryKey"
        },
        {
            "from_table": "Sales",
            "from_column": "ProductKey",
            "to_table": "Product",
            "to_column": "ProductKey"
        },
        {
            "from_table": "ProductSubCategory",
            "from_column": "ProductCategoryKey",
            "to_table": "ProductCategory",
            "to_column": "ProductCategoryKey"
        },
        {
            "from_table": "Sales",
            "from_column": "ResellerKey",
            "to_table": "Reseller",
            "to_column": "ResellerKey"
        },
        {
            "from_table": "Product",
            "from_column": "ProductSubCategory.ProductSubCategoryKey",
            "to_table": "ProductSubCategory",
            "to_column": "ProductSubCategoryKey"
        }
    ]
}