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: DimChannel
|   ChannelKey | ChannelName   |
|-------------:|:--------------|
|            1 | Store         |
|            2 | Online        |
|            3 | Catalog       |
|            4 | Reseller      |


Table: DimDate
| Datekey                 | CalendarYear            | CalendarQuarterLabel   | CalendarMonthLabel   |   Year |
|:------------------------|:------------------------|:-----------------------|:---------------------|-------:|
| 2005-07-01 00:00:00.000 | 1905-06-27 00:00:00.000 | Q3                     | July                 |   2005 |
| 2005-07-02 00:00:00.000 | 1905-06-27 00:00:00.000 | Q3                     | July                 |   2005 |
| 2005-07-03 00:00:00.000 | 1905-06-27 00:00:00.000 | Q3                     | July                 |   2005 |
| 2005-07-04 00:00:00.000 | 1905-06-27 00:00:00.000 | Q3                     | July                 |   2005 |
| 2005-07-05 00:00:00.000 | 1905-06-27 00:00:00.000 | Q3                     | July                 |   2005 |
| 2005-07-06 00:00:00.000 | 1905-06-27 00:00:00.000 | Q3                     | July                 |   2005 |
| 2005-07-07 00:00:00.000 | 1905-06-27 00:00:00.000 | Q3                     | July                 |   2005 |
| 2005-07-08 00:00:00.000 | 1905-06-27 00:00:00.000 | Q3                     | July                 |   2005 |
| 2005-07-09 00:00:00.000 | 1905-06-27 00:00:00.000 | Q3                     | July                 |   2005 |
| 2005-07-10 00:00:00.000 | 1905-06-27 00:00:00.000 | Q3                     | July                 |   2005 |


Table: DimGeography
|   GeographyKey | GeographyType   | Continent     | CityName      | StateProvinceName   | Country       |
|---------------:|:----------------|:--------------|:--------------|:--------------------|:--------------|
|            424 | City            | North America | Bellevue      | Washington          | United States |
|            430 | City            | North America | Beverly Hills | California          | United States |
|            431 | City            | North America | Billings      | Montana             | United States |
|            432 | City            | North America | Biloxi        | Mississippi         | United States |
|            433 | City            | North America | Birmingham    | Alabama             | United States |
|            434 | City            | North America | Bluffton      | South Carolina      | United States |
|            436 | City            | North America | Bothell       | Washington          | United States |
|            438 | City            | North America | Bountiful     | Utah                | United States |
|            440 | City            | North America | Braintree     | Massachusetts       | United States |
|            441 | City            | North America | Branson       | Missouri            | United States |


Table: DimProduct
|   ProductKey | ProductName                                          |   ProductSubcategoryKey | BrandName   | ClassName   |   UnitCost |   UnitPrice |
|-------------:|:-----------------------------------------------------|------------------------:|:------------|:------------|-----------:|------------:|
|            1 | Contoso 512MB MP3 Player E51 Silver                  |                       1 | Contoso     | Economy     |       6.62 |       12.99 |
|          240 | Contoso Home Theater System 2.1 Channel E1200 Black  |                      11 | Contoso     | Economy     |     152.44 |      299    |
|          242 | Contoso Home Theater System 7.1 Channel M1700 Black  |                      11 | Contoso     | Regular     |     294.54 |      889    |
|          243 | Contoso Home Theater System 4.1 Channel M1400 Black  |                      11 | Contoso     | Regular     |     208.52 |      409    |
|          244 | Contoso Home Theater System 5.1 Channel M1500 Black  |                      11 | Contoso     | Regular     |     197.28 |      429    |
|          250 | Contoso Home Theater System 5.1 Channel M1540 Black  |                      11 | Contoso     | Regular     |     243.27 |      529    |
|          253 | Contoso Home Theater System 2.1 Channel E1200 Silver |                      11 | Contoso     | Economy     |     152.44 |      299    |
|          255 | Contoso Home Theater System 7.1 Channel M1700 Silver |                      11 | Contoso     | Regular     |     294.54 |      889    |
|          256 | Contoso Home Theater System 4.1 Channel M1400 Silver |                      11 | Contoso     | Regular     |     208.52 |      409    |
|          257 | Contoso Home Theater System 5.1 Channel M1500 Silver |                      11 | Contoso     | Regular     |     197.28 |      429    |


Table: DimProductCategory
|   ProductCategoryKey |   ProductCategoryLabel | ProductCategoryName           | ProductCategoryDescription    |
|---------------------:|-----------------------:|:------------------------------|:------------------------------|
|                    1 |                      1 | Audio                         | Audio                         |
|                    2 |                      2 | TV and Video                  | TV and Video                  |
|                    3 |                      3 | Computers                     | Computers                     |
|                    4 |                      4 | Cameras and camcorders        | Cameras and camcorders        |
|                    5 |                      5 | Cell phones                   | Cell phones                   |
|                    6 |                      6 | Music, Movies and Audio Books | Music, Movies and Audio Books |
|                    7 |                      7 | Games and Toys                | Games and Toys                |
|                    8 |                      8 | Home Appliances               | Home Appliances               |


Table: DimProductSubcategory
|   ProductSubcategoryKey |   ProductSubcategoryLabel | ProductSubcategoryName   | ProductSubcategoryDescription   |   ProductCategoryKey |
|------------------------:|--------------------------:|:-------------------------|:--------------------------------|---------------------:|
|                       1 |                       101 | MP4&MP3                  | MP4&MP3                         |                    1 |
|                       2 |                       102 | Recorder                 | Recorder                        |                    1 |
|                       3 |                       103 | Radio                    | Radio                           |                    1 |
|                       4 |                       104 | Recording Pen            | Recording Pen                   |                    1 |
|                       5 |                       105 | Headphones               | Headphones                      |                    1 |
|                       6 |                       106 | Bluetooth Headphones     | Bluetooth Headphones            |                    1 |
|                       7 |                       107 | Speakers                 | Speakers                        |                    1 |
|                       8 |                       108 | Audio Accessories        | Audio Accessories               |                    1 |
|                       9 |                       201 | Televisions              | Televisions                     |                    2 |
|                      10 |                       202 | VCD & DVD                | VCD & DVD                       |                    2 |


Table: DimSalesTerritory
|   SalesTerritoryKey |   GeographyKey | SalesTerritoryName   | SalesTerritoryRegion   | SalesTerritoryCountry   | SalesTerritoryGroup   |
|--------------------:|---------------:|:---------------------|:-----------------------|:------------------------|:----------------------|
|                   1 |            693 | Seattle              | Washington             | United States           | North America         |
|                   2 |            856 | Kennewick            | Washington             | United States           | North America         |
|                   3 |            424 | Bellevue             | Washington             | United States           | North America         |
|                   4 |            677 | Redmond              | Washington             | United States           | North America         |
|                   5 |            575 | Yakima               | Washington             | United States           | North America         |
|                   6 |            838 | Granger              | Washington             | United States           | North America         |
|                   7 |            935 | Sunnyside            | Washington             | United States           | North America         |
|                   8 |            941 | Toppenish            | Washington             | United States           | North America         |
|                   9 |            947 | Wapato               | Washington             | United States           | North America         |
|                  10 |            813 | Cle Elum             | Washington             | United States           | North America         |


Table: DimStore
|   StoreKey |   GeographyKey |   StoreManager | StoreType   | StoreName                   | Status   | OpenDate                | CloseDate   |   EntityKey |   ZipCode | StorePhone   | StoreFax     | AddressLine1                       |   EmployeeCount |   SellingAreaSize | LastRemodelDate         | Geometry                  |   Longitude |   Latitude |
|-----------:|---------------:|---------------:|:------------|:----------------------------|:---------|:------------------------|:------------|------------:|----------:|:-------------|:-------------|:-----------------------------------|----------------:|------------------:|:------------------------|:--------------------------|------------:|-----------:|
|          2 |            693 |             35 | Store       | Contoso Seattle No.2 Store  | On       | 2004-02-14 00:00:00.000 |             |         636 |     97001 | 150-555-0189 | 150-555-0189 | Mino shopping mall                 |              25 |               700 | 2009-06-17 00:00:00.000 | POINT (-122.375 47.6474)  | -122.375    |    47.6474 |
|          5 |            677 |             38 | Store       | Contoso Redmond Store       | On       | 2004-04-02 00:00:00.000 |             |         639 |     97001 | 612-555-0100 | 612-555-0100 | Downtown shopping mall             |              33 |               560 | 2009-06-17 00:00:00.000 | POINT (-122.1196 47.6699) | -122.116    |    47.6732 |
|          7 |            838 |             40 | Store       | Contoso Granger Store       | On       | 2004-06-16 00:00:00.000 |             |         641 |     97001 | 913-555-0172 | 913-555-0172 | Granger, WA Downtown shopping mall |              22 |               500 | 2009-06-17 00:00:00.000 | POINT (-120.186 46.3435)  | -120.186    |    46.3435 |
|         10 |            947 |             43 | Store       | Contoso Wapato Store        | On       | 2004-09-19 00:00:00.000 |             |         644 |     97001 | 145-555-0130 | 145-555-0130 | Wapato, Citycenter                 |              25 |               700 | 2009-06-17 00:00:00.000 | POINT (-120.42 46.4481)   | -120.42     |    46.4481 |
|         15 |            678 |             48 | Store       | Contoso Renton Store        | On       | 2004-02-24 00:00:00.000 |             |         649 |     97001 | 424-555-0189 | 424-555-0189 | Renton,Citycenter                  |              22 |               500 | 2009-06-17 00:00:00.000 | POINT (-122.189 47.4894)  | -122.189    |    47.4894 |
|         17 |            551 |            135 | Store       | Contoso Spokane Store       | On       | 2004-03-26 00:00:00.000 |             |         651 |     97001 | 984-555-0185 | 984-555-0185 | Logan Ave  Shopping mall           |              25 |               700 | 2009-06-17 00:00:00.000 | POINT (-117.414 47.6566)  | -117.414    |    47.6566 |
|         20 |            824 |             52 | Store       | Contoso Englewood Store     | On       | 2004-09-29 00:00:00.000 |             |         654 |     87001 | 435-555-0113 | 435-555-0113 | Cherry Hills Village Shopping mall |              33 |               560 | 2009-06-17 00:00:00.000 | POINT (-104.961 39.6541)  | -104.961    |    39.6541 |
|         22 |            571 |             54 | Store       | Contoso Westminster Store   | On       | 2004-12-03 00:00:00.000 |             |         656 |     87001 | 925-555-0114 | 925-555-0114 | South Central Shopping mall        |              22 |               500 | 2009-06-17 00:00:00.000 | POINT (-0.159302 51.5105) |   -0.159302 |    51.5105 |
|         25 |            839 |             57 | Store       | Contoso Greeley  No.1 Store | On       | 2004-03-16 00:00:00.000 |             |         659 |     80631 | 332-555-0150 | 332-555-0150 | W 29th Street, Greeley CityCenter  |              25 |               700 | 2009-06-17 00:00:00.000 | POINT (-104.696 40.4083)  | -104.696    |    40.4083 |
|         27 |            859 |             59 | Store       | Contoso Lafayette Store     | On       | 2004-05-18 00:00:00.000 |             |         661 |     87001 | 113-555-0173 | 113-555-0173 | Lafayette Downtown                 |              19 |               455 | 2009-06-17 00:00:00.000 | POINT (-86.8644 40.4067)  |  -86.8644   |    40.4067 |


Table: Mesures
| Column   |
|----------|


Table: Sales
|   SalesKey | DateKey                 |   channelKey |   StoreKey |   ProductKey |   UnitCost |   UnitPrice |   SalesQuantity |   TotalCost |   SalesAmount |   Sales |   %Total Sales |
|-----------:|:------------------------|-------------:|-----------:|-------------:|-----------:|------------:|----------------:|------------:|--------------:|--------:|---------------:|
|      17224 | 2008-04-26 00:00:00.000 |            1 |        165 |          369 |     321.44 |         699 |              10 |      3214.4 |          6990 |    6990 |    1.89011e-06 |
|      21143 | 2007-04-07 00:00:00.000 |            1 |         53 |          369 |     321.44 |         699 |              10 |      3214.4 |          6990 |    6990 |    1.89011e-06 |
|      27549 | 2009-10-19 00:00:00.000 |            1 |         80 |          369 |     321.44 |         699 |              10 |      3214.4 |          6990 |    6990 |    1.89011e-06 |
|      33419 | 2009-05-25 00:00:00.000 |            1 |        285 |          369 |     321.44 |         699 |              10 |      3214.4 |          6990 |    6990 |    1.89011e-06 |
|      42097 | 2008-05-25 00:00:00.000 |            1 |        177 |          369 |     321.44 |         699 |              10 |      3214.4 |          6990 |    6990 |    1.89011e-06 |
|      61058 | 2008-05-30 00:00:00.000 |            1 |         40 |          369 |     321.44 |         699 |              10 |      3214.4 |          6990 |    6990 |    1.89011e-06 |
|      68323 | 2009-06-18 00:00:00.000 |            1 |         24 |          369 |     321.44 |         699 |              10 |      3214.4 |          6990 |    6990 |    1.89011e-06 |
|      74773 | 2009-04-28 00:00:00.000 |            1 |         85 |          369 |     321.44 |         699 |              10 |      3214.4 |          6990 |    6990 |    1.89011e-06 |
|      75173 | 2009-05-25 00:00:00.000 |            1 |        168 |          369 |     321.44 |         699 |              10 |      3214.4 |          6990 |    6990 |    1.89011e-06 |
|      83841 | 2008-09-05 00:00:00.000 |            1 |        259 |          369 |     321.44 |         699 |              10 |      3214.4 |          6990 |    6990 |    1.89011e-06 |

 


tables: name: DimChannel
data: DimChannel.csv
name: DimDate
data: DimDate.csv
name: DimGeography
data: DimGeography.csv
name: DimProduct
data: DimProduct.csv
name: DimProductCategory
data: DimProductCategory.csv
name: DimProductSubcategory
data: DimProductSubcategory.csv
name: DimSalesTerritory
data: DimSalesTerritory.csv
name: DimStore
data: DimStore.csv
name: Mesures
data: Mesures.csv
name: Sales
data: Sales.csv
label: DimSalesTerritory
GeographyKey
DimGeography
GeographyKey
DimProductSubcategory
ProductCategoryKey
DimProductCategory
ProductCategoryKey
DimStore
GeographyKey
DimGeography
GeographyKey
DimProduct
ProductSubcategoryKey
DimProductSubcategory
ProductSubcategoryKey
Sales
DateKey
DimDate
Datekey
Sales
ProductKey
DimProduct
ProductKey
Sales
StoreKey
DimStore
StoreKey
Sales
channelKey
DimChannel
ChannelKey
output: {
    "joins": [
        {
            "from_table": "DimSalesTerritory",
            "from_column": "GeographyKey",
            "to_table": "DimGeography",
            "to_column": "GeographyKey"
        },
        {
            "from_table": "DimProductSubcategory",
            "from_column": "ProductCategoryKey",
            "to_table": "DimProductCategory",
            "to_column": "ProductCategoryKey"
        },
        {
            "from_table": "DimStore",
            "from_column": "GeographyKey",
            "to_table": "DimGeography",
            "to_column": "GeographyKey"
        },
        {
            "from_table": "DimProduct",
            "from_column": "ProductSubcategoryKey",
            "to_table": "DimProductSubcategory",
            "to_column": "ProductSubcategoryKey"
        },
        {
            "from_table": "Sales",
            "from_column": "DateKey",
            "to_table": "DimDate",
            "to_column": "Datekey"
        },
        {
            "from_table": "Sales",
            "from_column": "ProductKey",
            "to_table": "DimProduct",
            "to_column": "ProductKey"
        },
        {
            "from_table": "Sales",
            "from_column": "StoreKey",
            "to_table": "DimStore",
            "to_column": "StoreKey"
        },
        {
            "from_table": "Sales",
            "from_column": "channelKey",
            "to_table": "DimChannel",
            "to_column": "ChannelKey"
        }
    ]
}