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: AW_Calendar_Lookup
| Date                    | Day Name   | Start of Week           | Start of Month          | Month Name   | Start of Year           |   Year |
|:------------------------|:-----------|:------------------------|:------------------------|:-------------|:------------------------|-------:|
| 2016-01-01 00:00:00.000 | Friday     | 2015-12-27 00:00:00.000 | 2016-01-01 00:00:00.000 | January      | 2016-01-01 00:00:00.000 |   2016 |
| 2016-01-02 00:00:00.000 | Saturday   | 2015-12-27 00:00:00.000 | 2016-01-01 00:00:00.000 | January      | 2016-01-01 00:00:00.000 |   2016 |
| 2016-01-03 00:00:00.000 | Sunday     | 2016-01-03 00:00:00.000 | 2016-01-01 00:00:00.000 | January      | 2016-01-01 00:00:00.000 |   2016 |
| 2016-01-04 00:00:00.000 | Monday     | 2016-01-03 00:00:00.000 | 2016-01-01 00:00:00.000 | January      | 2016-01-01 00:00:00.000 |   2016 |
| 2016-01-05 00:00:00.000 | Tuesday    | 2016-01-03 00:00:00.000 | 2016-01-01 00:00:00.000 | January      | 2016-01-01 00:00:00.000 |   2016 |
| 2016-01-06 00:00:00.000 | Wednesday  | 2016-01-03 00:00:00.000 | 2016-01-01 00:00:00.000 | January      | 2016-01-01 00:00:00.000 |   2016 |
| 2016-01-07 00:00:00.000 | Thursday   | 2016-01-03 00:00:00.000 | 2016-01-01 00:00:00.000 | January      | 2016-01-01 00:00:00.000 |   2016 |
| 2016-01-08 00:00:00.000 | Friday     | 2016-01-03 00:00:00.000 | 2016-01-01 00:00:00.000 | January      | 2016-01-01 00:00:00.000 |   2016 |
| 2016-01-09 00:00:00.000 | Saturday   | 2016-01-03 00:00:00.000 | 2016-01-01 00:00:00.000 | January      | 2016-01-01 00:00:00.000 |   2016 |
| 2016-01-10 00:00:00.000 | Sunday     | 2016-01-10 00:00:00.000 | 2016-01-01 00:00:00.000 | January      | 2016-01-01 00:00:00.000 |   2016 |


Table: AW_Customer_Lookup
|   CustomerKey | Prefix   | FirstName   | LastName   | BirthDate               | MaritalStatus   | Gender   | EmailAddress                   |   AnnualIncome |   TotalChildren | EducationLevel   | Occupation   | HomeOwner   | FullName            | UserName   | Domain          |   BirthYear | IncomeLevel   |
|--------------:|:---------|:------------|:-----------|:------------------------|:----------------|:---------|:-------------------------------|---------------:|----------------:|:-----------------|:-------------|:------------|:--------------------|:-----------|:----------------|------------:|:--------------|
|         11206 | Mr.      | Blake       | Flores     | 1948-09-24 00:00:00.000 | M               | M        | blake60@adventure-works.com    |          60000 |               2 | Partial College  | Professional | Y           | Mr. Blake Flores    | blake60    | Adventure Works |        1948 | Average       |
|         11214 | Mr.      | Charles     | Miller     | 1949-11-07 00:00:00.000 | S               | M        | charles9@adventure-works.com   |          60000 |               2 | Partial College  | Professional | Y           | Mr. Charles Miller  | charles9   | Adventure Works |        1949 | Average       |
|         11227 | Mr.      | Marshall    | Chavez     | 1951-08-12 00:00:00.000 | S               | M        | marshall35@adventure-works.com |          60000 |               2 | Partial College  | Professional | Y           | Mr. Marshall Chavez | marshall35 | Adventure Works |        1951 | Average       |
|         12093 | Mr.      | Levi        | Chandra    | 1948-11-08 00:00:00.000 | M               | M        | levi1@adventure-works.com      |          60000 |               2 | Partial College  | Professional | Y           | Mr. Levi Chandra    | levi1      | Adventure Works |        1948 | Average       |
|         12097 | Mr.      | Sean        | Allen      | 1949-11-13 00:00:00.000 | S               | M        | sean49@adventure-works.com     |          60000 |               2 | Partial College  | Professional | Y           | Mr. Sean Allen      | sean49     | Adventure Works |        1949 | Average       |
|         12108 | Mr.      | James       | Walker     | 1950-02-23 00:00:00.000 | M               | M        | james96@adventure-works.com    |          60000 |               2 | Partial College  | Professional | Y           | Mr. James Walker    | james96    | Adventure Works |        1950 | Average       |
|         12117 | Mr.      | Cameron     | Yang       | 1951-08-03 00:00:00.000 | M               | M        | cameron23@adventure-works.com  |          60000 |               2 | Partial College  | Professional | Y           | Mr. Cameron Yang    | cameron23  | Adventure Works |        1951 | Average       |
|         12119 | Mr.      | Keith       | Raje       | 1951-06-01 00:00:00.000 | M               | M        | keith17@adventure-works.com    |          60000 |               2 | Partial College  | Professional | N           | Mr. Keith Raje      | keith17    | Adventure Works |        1951 | Average       |
|         13233 | Mr.      | Richard     | Coleman    | 1948-12-05 00:00:00.000 | M               | M        | richard61@adventure-works.com  |          60000 |               2 | Partial College  | Professional | Y           | Mr. Richard Coleman | richard61  | Adventure Works |        1948 | Average       |
|         13234 | Mr.      | Robert      | Lewis      | 1948-08-22 00:00:00.000 | S               | M        | robert81@adventure-works.com   |          60000 |               2 | Partial College  | Professional | Y           | Mr. Robert Lewis    | robert81   | Adventure Works |        1948 | Average       |


Table: AW_Product_Category_Lookup
|   ProductCategoryKey | CategoryName   |
|---------------------:|:---------------|
|                    1 | Bikes          |
|                    2 | Components     |
|                    3 | Clothing       |
|                    4 | Accessories    |


Table: AW_Product_Lookup
|   ProductKey |   ProductSubcategoryKey | ProductSKU   | ProductName             | ModelName               | ProductDescription                                          | ProductColor   | ProductStyle   |   ProductCost |   ProductPrice |   DiscountPrice | SKUType   |
|-------------:|------------------------:|:-------------|:------------------------|:------------------------|:------------------------------------------------------------|:---------------|:---------------|--------------:|---------------:|----------------:|:----------|
|          215 |                      31 | HL-U509      | Sport-100 Helmet, Black | Sport-100               | Universal fit, well-vented, lightweight , snap-on visor.    | Black          | NA             |         12.03 |          33.64 |          28.594 | HL-U509   |
|          410 |                      17 | FW-M423      | LL Mountain Front Wheel | LL Mountain Front Wheel | Replacement mountain wheel for entry-level rider.           | Black          | NA             |         26.97 |          60.74 |          51.629 | FW-M423   |
|          411 |                      17 | FW-M762      | ML Mountain Front Wheel | ML Mountain Front Wheel | Replacement mountain wheel for the casual to serious rider. | Black          | NA             |         92.81 |         209.02 |         177.667 | FW-M762   |
|          412 |                      17 | FW-M928      | HL Mountain Front Wheel | HL Mountain Front Wheel | High-performance mountain replacement wheel.                | Black          | NA             |        133.3  |         300.22 |         255.187 | FW-M928   |
|          413 |                      17 | FW-R623      | LL Road Front Wheel     | LL Road Front Wheel     | Replacement road front wheel for entry-level cyclist.       | Black          | NA             |         37.99 |          85.56 |          72.726 | FW-R623   |
|          414 |                      17 | FW-R762      | ML Road Front Wheel     | ML Road Front Wheel     | Sturdy alloy features a quick-release hub.                  | Black          | NA             |        110.28 |         248.38 |         211.123 | FW-R762   |
|          415 |                      17 | FW-R820      | HL Road Front Wheel     | HL Road Front Wheel     | Strong wheel with double-walled rim.                        | Black          | NA             |        146.55 |         330.06 |         280.551 | FW-R820   |
|          416 |                      17 | FW-T905      | Touring Front Wheel     | Touring Front Wheel     | Aerodynamic rims for smooth riding.                         | Black          | NA             |         96.8  |         218.01 |         185.309 | FW-T905   |
|          419 |                      17 | RW-M423      | LL Mountain Rear Wheel  | LL Mountain Rear Wheel  | Replacement mountain wheel for entry-level rider.           | Black          | NA             |         38.96 |          87.74 |          74.579 | RW-M423   |
|          420 |                      17 | RW-M762      | ML Mountain Rear Wheel  | ML Mountain Rear Wheel  | Replacement mountain wheel for the casual to serious rider. | Black          | NA             |        104.8  |         236.02 |         200.617 | RW-M762   |


Table: AW_Product_Subcategory_Lookup
|   ProductSubcategoryKey | SubcategoryName   |   ProductCategoryKey |
|------------------------:|:------------------|---------------------:|
|                       1 | Mountain Bikes    |                    1 |
|                       2 | Road Bikes        |                    1 |
|                       3 | Touring Bikes     |                    1 |
|                       4 | Handlebars        |                    2 |
|                       5 | Bottom Brackets   |                    2 |
|                       6 | Brakes            |                    2 |
|                       7 | Chains            |                    2 |
|                       8 | Cranksets         |                    2 |
|                       9 | Derailleurs       |                    2 |
|                      10 | Forks             |                    2 |


Table: AW_Returns
| ReturnDate              |   TerritoryKey |   ProductKey |   ReturnQuantity |
|:------------------------|---------------:|-------------:|-----------------:|
| 2015-01-18 00:00:00.000 |              9 |          312 |                1 |
| 2015-02-19 00:00:00.000 |              9 |          311 |                1 |
| 2015-03-13 00:00:00.000 |              9 |          350 |                1 |
| 2015-03-15 00:00:00.000 |              9 |          340 |                1 |
| 2015-03-28 00:00:00.000 |              9 |          314 |                1 |
| 2015-03-29 00:00:00.000 |              9 |          311 |                1 |
| 2015-04-07 00:00:00.000 |              9 |          311 |                1 |
| 2015-04-07 00:00:00.000 |              9 |          351 |                1 |
| 2015-04-09 00:00:00.000 |              9 |          311 |                1 |
| 2015-04-10 00:00:00.000 |              9 |          326 |                1 |


Table: AW_Sales
| OrderDate               | StockDate               | OrderNumber   |   ProductKey |   CustomerKey |   TerritoryKey |   OrderLineItem |   OrderQuantity |
|:------------------------|:------------------------|:--------------|-------------:|--------------:|---------------:|----------------:|----------------:|
| 2015-07-05 00:00:00.000 | 2002-06-03 00:00:00.000 | SO46718       |          360 |         12570 |              9 |               1 |               1 |
| 2015-07-07 00:00:00.000 | 2002-04-22 00:00:00.000 | SO46736       |          360 |         12341 |              9 |               1 |               1 |
| 2015-07-12 00:00:00.000 | 2002-05-05 00:00:00.000 | SO46776       |          360 |         12356 |              9 |               1 |               1 |
| 2015-07-16 00:00:00.000 | 2002-06-22 00:00:00.000 | SO46808       |          360 |         12347 |              9 |               1 |               1 |
| 2015-07-18 00:00:00.000 | 2002-05-11 00:00:00.000 | SO46826       |          360 |         12575 |              9 |               1 |               1 |
| 2015-08-01 00:00:00.000 | 2002-04-21 00:00:00.000 | SO47075       |          360 |         12685 |              9 |               1 |               1 |
| 2015-08-04 00:00:00.000 | 2002-05-01 00:00:00.000 | SO47098       |          360 |         12667 |              9 |               1 |               1 |
| 2015-08-10 00:00:00.000 | 2002-04-21 00:00:00.000 | SO47149       |          360 |         12669 |              9 |               1 |               1 |
| 2015-08-17 00:00:00.000 | 2002-06-04 00:00:00.000 | SO47212       |          360 |         12580 |              9 |               1 |               1 |
| 2015-08-26 00:00:00.000 | 2002-06-29 00:00:00.000 | SO47302       |          360 |         12670 |              9 |               1 |               1 |


Table: AW_Territories_Lookup
|   SalesTerritoryKey | Region         | Country        | Continent     |
|--------------------:|:---------------|:---------------|:--------------|
|                   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        |

 


tables: name: AW_Calendar_Lookup
data: AW_Calendar_Lookup.csv
name: AW_Customer_Lookup
data: AW_Customer_Lookup.csv
name: AW_Product_Category_Lookup
data: AW_Product_Category_Lookup.csv
name: AW_Product_Lookup
data: AW_Product_Lookup.csv
name: AW_Product_Subcategory_Lookup
data: AW_Product_Subcategory_Lookup.csv
name: AW_Returns
data: AW_Returns.csv
name: AW_Sales
data: AW_Sales.csv
name: AW_Territories_Lookup
data: AW_Territories_Lookup.csv
label: AW_Sales
ProductKey
AW_Product_Lookup
ProductKey
AW_Sales
OrderDate
AW_Calendar_Lookup
Date
AW_Sales
TerritoryKey
AW_Territories_Lookup
SalesTerritoryKey
AW_Sales
CustomerKey
AW_Customer_Lookup
CustomerKey
AW_Product_Lookup
ProductSubcategoryKey
AW_Product_Subcategory_Lookup
ProductSubcategoryKey
AW_Product_Subcategory_Lookup
ProductSubcategoryKey
AW_Product_Category_Lookup
ProductCategoryKey
AW_Returns
ProductKey
AW_Product_Lookup
ProductKey
AW_Returns
ReturnDate
AW_Calendar_Lookup
Date
AW_Returns
TerritoryKey
AW_Territories_Lookup
SalesTerritoryKey
output: {
    "joins": [
        {
            "from_table": "AW_Sales",
            "from_column": "ProductKey",
            "to_table": "AW_Product_Lookup",
            "to_column": "ProductKey"
        },
        {
            "from_table": "AW_Sales",
            "from_column": "OrderDate",
            "to_table": "AW_Calendar_Lookup",
            "to_column": "Date"
        },
        {
            "from_table": "AW_Sales",
            "from_column": "TerritoryKey",
            "to_table": "AW_Territories_Lookup",
            "to_column": "SalesTerritoryKey"
        },
        {
            "from_table": "AW_Sales",
            "from_column": "CustomerKey",
            "to_table": "AW_Customer_Lookup",
            "to_column": "CustomerKey"
        },
        {
            "from_table": "AW_Product_Lookup",
            "from_column": "ProductSubcategoryKey",
            "to_table": "AW_Product_Subcategory_Lookup",
            "to_column": "ProductSubcategoryKey"
        },
        {
            "from_table": "AW_Product_Subcategory_Lookup",
            "from_column": "ProductSubcategoryKey",
            "to_table": "AW_Product_Category_Lookup",
            "to_column": "ProductCategoryKey"
        },
        {
            "from_table": "AW_Returns",
            "from_column": "ProductKey",
            "to_table": "AW_Product_Lookup",
            "to_column": "ProductKey"
        },
        {
            "from_table": "AW_Returns",
            "from_column": "ReturnDate",
            "to_table": "AW_Calendar_Lookup",
            "to_column": "Date"
        },
        {
            "from_table": "AW_Returns",
            "from_column": "TerritoryKey",
            "to_table": "AW_Territories_Lookup",
            "to_column": "SalesTerritoryKey"
        }
    ]
}