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: Address
|   Address ID | Address Line 1              | Address Line 2   | City          | State/Province   | Country/Region   |   Postal Code |   Index |
|-------------:|:----------------------------|:-----------------|:--------------|:-----------------|:-----------------|--------------:|--------:|
|          988 | 482505 Warm Springs Blvd.   |                  | Fremont       | California       | United States    |         94536 |     330 |
|          989 | 39933 Mission Oaks Blvd     |                  | Camarillo     | California       | United States    |         93010 |     331 |
|          991 | 60025 Bollinger Canyon Road |                  | San Ramon     | California       | United States    |         94583 |     333 |
|          992 | 9992 Whipple Rd             |                  | Union City    | California       | United States    |         94587 |     334 |
|          993 | Corporate Office            |                  | El Segundo    | California       | United States    |         90245 |     335 |
|          994 | 25001 Montague Expressway   |                  | Milpitas      | California       | United States    |         95035 |     336 |
|          995 | 4460 Newport Center Drive   |                  | Newport Beach | California       | United States    |         92625 |     337 |
|          997 | 70259 West Sunnyview Ave    |                  | Visalia       | California       | United States    |         93291 |     339 |
|          998 | 60750 San Clemente          |                  | Hayward       | California       | United States    |         94541 |     340 |
|          999 | Receiving                   |                  | Fullerton     | California       | United States    |         92831 |     341 |


Table: Context Transition Table
|   Product ID | Color   |   Price |
|-------------:|:--------|--------:|
|          708 | Black   |  34.99  |
|          815 | Black   |  60.745 |
|          816 | Black   | 209.025 |
|          817 | Black   | 300.215 |
|          821 | Black   | 218.01  |
|          829 | Black   | 245.01  |
|          823 | Black   |  87.745 |
|          824 | Black   | 236.025 |
|          825 | Black   | 327.215 |
|          841 | Black   |  59.99  |


Table: Customer Address Link
|   Customer ID |   Address ID | Address Type   |
|--------------:|-------------:|:---------------|
|         29485 |         1086 | Main Office    |
|         29486 |          621 | Main Office    |
|         29489 |         1069 | Main Office    |
|         29490 |          887 | Main Office    |
|         29492 |          618 | Main Office    |
|         29494 |          537 | Main Office    |
|         29496 |         1072 | Main Office    |
|         29497 |          889 | Main Office    |
|         29499 |          527 | Main Office    |
|         29502 |          893 | Main Office    |


Table: Customer
|   Customer ID | Title   | First Name   | Middle Name   | Last Name   | Suffix   | Company Name                       | Email Address               | Phone        | Sales Rep   |   Index |
|--------------:|:--------|:-------------|:--------------|:------------|:---------|:-----------------------------------|:----------------------------|:-------------|:------------|--------:|
|             2 | Mr.     | Keith        |               | Harris      |          | Progressive Sports                 | keith0@adventure-works.com  | 170-555-0127 | David       |       2 |
|             5 | Mr.     | Lucy         |               | Harrington  |          | Metropolitan Sports Supply         | lucy0@adventure-works.com   | 828-555-0186 | Shu         |       5 |
|            23 | Mr.     | Kerim        |               | Hanif       |          | Bike World                         | kerim0@adventure-works.com  | 216-555-0122 | Shu         |      17 |
|            24 | Mr.     | Kevin        |               | Liu         |          | Eastside Department Store          | kevin5@adventure-works.com  | 926-555-0164 | Linda       |      18 |
|            29 | Mr.     | Bryan        |               | Hamilton    |          | Cross-Country Riding Supplies      | bryan2@adventure-works.com  | 344-555-0144 | José        |      21 |
|            37 | Mr.     | Jim          |               | Geist       |          | Two Bike Shops                     | jim1@adventure-works.com    | 724-555-0161 | Pamela      |      24 |
|            40 | Mr.     | Darren       |               | Gehring     |          | Journey Sporting Goods             | darren0@adventure-works.com | 417-555-0182 | Jillian     |      27 |
|            42 | Mr.     | Jeremy       |               | Los         |          | Healthy Activity Store             | jeremy0@adventure-works.com | 911-555-0165 | Linda       |      29 |
|            55 | Mr.     | Eric         |               | Lang        |          | Kickstands and Accessories Company | eric6@adventure-works.com   | 932-555-0163 | Pamela      |      35 |
|            56 | Mr.     | Brian        |               | Groth       |          | Latest Accessories Sales           | brian5@adventure-works.com  | 461-555-0118 | David       |      36 |


Table: Date
| Date                    |   Year | Month   |   Month Number | Day of Week   |   Day of Week Number |
|:------------------------|-------:|:--------|---------------:|:--------------|---------------------:|
| 2017-01-01 00:00:00.000 |   2017 | Jan     |              1 | Sunday        |                    1 |
| 2017-01-02 00:00:00.000 |   2017 | Jan     |              1 | Monday        |                    2 |
| 2017-01-03 00:00:00.000 |   2017 | Jan     |              1 | Tuesday       |                    3 |
| 2017-01-04 00:00:00.000 |   2017 | Jan     |              1 | Wednesday     |                    4 |
| 2017-01-05 00:00:00.000 |   2017 | Jan     |              1 | Thursday      |                    5 |
| 2017-01-06 00:00:00.000 |   2017 | Jan     |              1 | Friday        |                    6 |
| 2017-01-07 00:00:00.000 |   2017 | Jan     |              1 | Saturday      |                    7 |
| 2017-01-08 00:00:00.000 |   2017 | Jan     |              1 | Sunday        |                    1 |
| 2017-01-09 00:00:00.000 |   2017 | Jan     |              1 | Monday        |                    2 |
| 2017-01-10 00:00:00.000 |   2017 | Jan     |              1 | Tuesday       |                    3 |


Table: Measures Table



Table: Product
|   Product ID | Name                        | Product Number   | Color   |    Cost |   Price | Size   | Weight   |   Category ID |   Model ID | Product Model           | Start Date              | End Date   | Description                                                                                   | Product Category   |   ProductSubCategoryID | Product Subcategory   |   Index |   Sum of Unit Price |   Calculate Sum of Unit Price |
|-------------:|:----------------------------|:-----------------|:--------|--------:|--------:|:-------|:---------|--------------:|-----------:|:------------------------|:------------------------|:-----------|:----------------------------------------------------------------------------------------------|:-------------------|-----------------------:|:----------------------|--------:|--------------------:|------------------------------:|
|          712 | AWC Logo Cap                | CA-1098          | Multi   |  6.9223 |    8.99 |        |          |             3 |          2 | Cycling Cap             | 2016-06-28 00:00:00.000 |            | Traditional style with a flip-up brim; one-size fits all.                                     | Clothing           |                     23 | Caps                  |       8 |              219656 |                          8.99 |
|          707 | Sport-100 Helmet, Red       | HL-U509-R        | Red     | 13.0863 |   34.99 |        |          |             4 |         33 | Sport-100               | 2016-06-28 00:00:00.000 |            | Universal fit, well-vented, lightweight , snap-on visor.                                      | Accessories        |                     35 | Helmets               |       3 |              219656 |                         34.99 |
|          708 | Sport-100 Helmet, Black     | HL-U509          | Black   | 13.0863 |   34.99 |        |          |             4 |         33 | Sport-100               | 2016-06-28 00:00:00.000 |            | Universal fit, well-vented, lightweight , snap-on visor.                                      | Accessories        |                     35 | Helmets               |       4 |              219656 |                         34.99 |
|          711 | Sport-100 Helmet, Blue      | HL-U509-B        | Blue    | 13.0863 |   34.99 |        |          |             4 |         33 | Sport-100               | 2016-06-28 00:00:00.000 |            | Universal fit, well-vented, lightweight , snap-on visor.                                      | Accessories        |                     35 | Helmets               |       7 |              219656 |                         34.99 |
|          709 | Mountain Bike Socks, M      | SO-B909-M        | White   |  3.3963 |    9.5  | M      |          |             3 |         18 | Mountain Bike Socks     | 2016-06-28 00:00:00.000 | 6/27/2017  | Combination of natural and synthetic fibers stays dry and provides just the right cushioning. | Clothing           |                     27 | Socks                 |       5 |              219656 |                          9.5  |
|          710 | Mountain Bike Socks, L      | SO-B909-L        | White   |  3.3963 |    9.5  | L      |          |             3 |         18 | Mountain Bike Socks     | 2016-06-28 00:00:00.000 | 6/27/2017  | Combination of natural and synthetic fibers stays dry and provides just the right cushioning. | Clothing           |                     27 | Socks                 |       6 |              219656 |                          9.5  |
|          713 | Long-Sleeve Logo Jersey, S  | LJ-0192-S        | Multi   | 38.4923 |   49.99 | S      |          |             3 |         11 | Long-Sleeve Logo Jersey | 2016-06-28 00:00:00.000 |            | Unisex long-sleeve AWC logo microfiber cycling jersey                                         | Clothing           |                     25 | Jerseys               |       9 |              219656 |                         49.99 |
|          714 | Long-Sleeve Logo Jersey, M  | LJ-0192-M        | Multi   | 38.4923 |   49.99 | M      |          |             3 |         11 | Long-Sleeve Logo Jersey | 2016-06-28 00:00:00.000 |            | Unisex long-sleeve AWC logo microfiber cycling jersey                                         | Clothing           |                     25 | Jerseys               |      10 |              219656 |                         49.99 |
|          715 | Long-Sleeve Logo Jersey, L  | LJ-0192-L        | Multi   | 38.4923 |   49.99 | L      |          |             3 |         11 | Long-Sleeve Logo Jersey | 2016-06-28 00:00:00.000 |            | Unisex long-sleeve AWC logo microfiber cycling jersey                                         | Clothing           |                     25 | Jerseys               |      11 |              219656 |                         49.99 |
|          716 | Long-Sleeve Logo Jersey, XL | LJ-0192-X        | Multi   | 38.4923 |   49.99 | XL     |          |             3 |         11 | Long-Sleeve Logo Jersey | 2016-06-28 00:00:00.000 |            | Unisex long-sleeve AWC logo microfiber cycling jersey                                         | Clothing           |                     25 | Jerseys               |      12 |              219656 |                         49.99 |


Table: Sales Person
|   Id | Name    | Parent Id   |
|-----:|:--------|:------------|
|    1 | Tom     | 8           |
|    2 | Sally   | 8           |
|    3 | George  | 2           |
|    4 | Jill    | 7           |
|    5 | Brad    | 4           |
|    6 | Joel    | 4           |
|    7 | Mark    |             |
|    8 | Jessica |             |


Table: Sales
|   Order ID |   Quantity |   Product ID |   Unit Price |   Discount |   Line Total | Order Date              | Due Date                | Ship Date               |   Customer ID |   Address ID |   Sales Person |   Index |   Sum of Unit Price |
|-----------:|-----------:|-------------:|-------------:|-----------:|-------------:|:------------------------|:------------------------|:------------------------|--------------:|-------------:|---------------:|--------:|--------------------:|
|      72763 |          1 |          770 |       782.99 |          0 |       782.99 | 2017-07-02 00:00:00.000 | 2017-07-16 00:00:00.000 | 2017-07-04 00:00:00.000 |           493 |         1072 |              5 |     180 |         3.75895e+07 |
|      75384 |          7 |          767 |       782.99 |          0 |      5480.93 | 2018-02-03 00:00:00.000 | 2018-02-08 00:00:00.000 | 2018-02-07 00:00:00.000 |         29764 |          863 |              5 |     303 |         3.75895e+07 |
|      77827 |         11 |          766 |       782.99 |          0 |      8612.89 | 2018-12-26 00:00:00.000 | 2019-01-05 00:00:00.000 | 2018-12-29 00:00:00.000 |            58 |          907 |              5 |    6032 |         3.75895e+07 |
|      74403 |          5 |          764 |       782.99 |          0 |      3914.95 | 2018-09-09 00:00:00.000 | 2018-09-16 00:00:00.000 | 2018-09-15 00:00:00.000 |            70 |          618 |              5 |    2086 |         3.75895e+07 |
|      76831 |          7 |          770 |       782.99 |          0 |      5480.93 | 2019-06-26 00:00:00.000 | 2019-07-16 00:00:00.000 | 2019-07-06 00:00:00.000 |            82 |          836 |              5 |    1758 |         3.75895e+07 |
|      77595 |         12 |          764 |       782.99 |          0 |      9395.88 | 2019-02-27 00:00:00.000 | 2019-03-08 00:00:00.000 | 2019-02-28 00:00:00.000 |            95 |          505 |              5 |    1464 |         3.75895e+07 |
|      75925 |          9 |          760 |       782.99 |          0 |      7046.91 | 2017-09-15 00:00:00.000 | 2017-10-13 00:00:00.000 | 2017-09-21 00:00:00.000 |           330 |          564 |              5 |     523 |         3.75895e+07 |
|      76373 |         10 |          770 |       782.99 |          0 |      7829.9  | 2017-06-08 00:00:00.000 | 2017-06-15 00:00:00.000 | 2017-06-09 00:00:00.000 |           490 |          849 |              5 |     550 |         3.75895e+07 |
|      76573 |         12 |          770 |       782.99 |          0 |      9395.88 | 2017-11-08 00:00:00.000 | 2017-12-07 00:00:00.000 | 2017-11-12 00:00:00.000 |           131 |          515 |              5 |    4175 |         3.75895e+07 |
|      78485 |          7 |          765 |       782.99 |          0 |      5480.93 | 2018-05-26 00:00:00.000 | 2018-06-24 00:00:00.000 | 2018-05-30 00:00:00.000 |           360 |          508 |              5 |     803 |         3.75895e+07 |

 


tables: name: Address
data: Address.csv
name: Context Transition Table
data: Context Transition Table.csv
name: Customer Address Link
data: Customer Address Link.csv
name: Customer
data: Customer.csv
name: Date
data: Date.csv
name: Measures Table
data: Measures Table.csv
name: Product
data: Product.csv
name: Sales Person
data: Sales Person.csv
name: Sales
data: Sales.csv
label: Sales
Product ID
Product
Product ID
Sales
Address ID
Address
Address ID
Customer Address Link
Address ID
Address
Address ID
Sales
Customer ID
Customer
Customer ID
Sales
Sales Person
Sales Person
Id
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "Product ID",
            "to_table": "Product",
            "to_column": "Product ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Address ID",
            "to_table": "Address",
            "to_column": "Address ID"
        },
        {
            "from_table": "Customer Address Link",
            "from_column": "Address ID",
            "to_table": "Address",
            "to_column": "Address ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Customer ID",
            "to_table": "Customer",
            "to_column": "Customer ID"
        },
        {
            "from_table": "Sales",
            "from_column": "Sales Person",
            "to_table": "Sales Person",
            "to_column": "Id"
        }
    ]
}