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: % Ajuste PU
|   % Ajuste PU |
|--------------:|
|          -1   |
|          -0.9 |
|          -0.8 |
|          -0.7 |
|          -0.6 |
|          -0.5 |
|          -0.4 |
|          -0.3 |
|          -0.2 |
|          -0.1 |


Table: DimCalendar
| DateKey                 |   CalendarYear | CalendarHalfYearLabel   | CalendarQuarterLabel   |   CalendarMonth | CalendarMonthLabel   | CalendarWeekLabel   | CalendarDayOfWeekLabel   | IsWorkDay   |   Año | Trimestre    |   Mes |   Día |   SemanaAño |   Dia Semana | Fin Semana   | Mes Corto   |   Mes Txt | Día Txt   | Start of Week           | End of Week             |
|:------------------------|---------------:|:------------------------|:-----------------------|----------------:|:---------------------|:--------------------|:-------------------------|:------------|------:|:-------------|------:|------:|------------:|-------------:|:-------------|:------------|----------:|:----------|:------------------------|:------------------------|
| 2008-01-01 00:00:00.000 |           2008 | H1                      | Q1                     |          200801 | January              | Week 1              | Tuesday                  | WorkDay     |  2008 | Trimestre #1 |     1 |     1 |           1 |            2 | Día Laboral  | Jan         |         1 | Tue       | 2007-12-30 00:00:00.000 | 2008-01-06 00:00:00.000 |
| 2008-01-02 00:00:00.000 |           2008 | H1                      | Q1                     |          200801 | January              | Week 1              | Wednesday                | WorkDay     |  2008 | Trimestre #1 |     1 |     2 |           1 |            3 | Día Laboral  | Jan         |         1 | Wed       | 2007-12-30 00:00:00.000 | 2008-01-06 00:00:00.000 |
| 2008-01-03 00:00:00.000 |           2008 | H1                      | Q1                     |          200801 | January              | Week 1              | Thursday                 | WorkDay     |  2008 | Trimestre #1 |     1 |     3 |           1 |            4 | Día Laboral  | Jan         |         1 | Thu       | 2007-12-30 00:00:00.000 | 2008-01-06 00:00:00.000 |
| 2008-01-04 00:00:00.000 |           2008 | H1                      | Q1                     |          200801 | January              | Week 1              | Friday                   | WorkDay     |  2008 | Trimestre #1 |     1 |     4 |           1 |            5 | Día Laboral  | Jan         |         1 | Fri       | 2007-12-30 00:00:00.000 | 2008-01-06 00:00:00.000 |
| 2008-01-07 00:00:00.000 |           2008 | H1                      | Q1                     |          200801 | January              | Week 2              | Monday                   | WorkDay     |  2008 | Trimestre #1 |     1 |     7 |           2 |            1 | Día Laboral  | Jan         |         1 | Mon       | 2008-01-06 00:00:00.000 | 2008-01-13 00:00:00.000 |
| 2008-01-08 00:00:00.000 |           2008 | H1                      | Q1                     |          200801 | January              | Week 2              | Tuesday                  | WorkDay     |  2008 | Trimestre #1 |     1 |     8 |           2 |            2 | Día Laboral  | Jan         |         1 | Tue       | 2008-01-06 00:00:00.000 | 2008-01-13 00:00:00.000 |
| 2008-01-09 00:00:00.000 |           2008 | H1                      | Q1                     |          200801 | January              | Week 2              | Wednesday                | WorkDay     |  2008 | Trimestre #1 |     1 |     9 |           2 |            3 | Día Laboral  | Jan         |         1 | Wed       | 2008-01-06 00:00:00.000 | 2008-01-13 00:00:00.000 |
| 2008-01-10 00:00:00.000 |           2008 | H1                      | Q1                     |          200801 | January              | Week 2              | Thursday                 | WorkDay     |  2008 | Trimestre #1 |     1 |    10 |           2 |            4 | Día Laboral  | Jan         |         1 | Thu       | 2008-01-06 00:00:00.000 | 2008-01-13 00:00:00.000 |
| 2008-01-11 00:00:00.000 |           2008 | H1                      | Q1                     |          200801 | January              | Week 2              | Friday                   | WorkDay     |  2008 | Trimestre #1 |     1 |    11 |           2 |            5 | Día Laboral  | Jan         |         1 | Fri       | 2008-01-06 00:00:00.000 | 2008-01-13 00:00:00.000 |
| 2008-01-14 00:00:00.000 |           2008 | H1                      | Q1                     |          200801 | January              | Week 3              | Monday                   | WorkDay     |  2008 | Trimestre #1 |     1 |    14 |           3 |            1 | Día Laboral  | Jan         |         1 | Mon       | 2008-01-13 00:00:00.000 | 2008-01-20 00:00:00.000 |


Table: DimChannel
|   ChannelKey | ChannelName   |
|-------------:|:--------------|
|            1 | Store         |
|            2 | Online        |
|            3 | Catalog       |
|            4 | Reseller      |


Table: DimGeography
|   GeographyKey | ContinentName   | RegionCountryName   | Ubicación Completa           |
|---------------:|:----------------|:--------------------|:-----------------------------|
|            302 | North America   | United States       | United States, North America |
|            366 | North America   | United States       | United States, North America |
|            369 | North America   | United States       | United States, North America |
|            370 | North America   | United States       | United States, North America |
|            371 | North America   | United States       | United States, North America |
|            372 | North America   | United States       | United States, North America |
|            373 | North America   | United States       | United States, North America |
|            374 | North America   | United States       | United States, North America |
|            375 | North America   | United States       | United States, North America |
|            376 | North America   | United States       | United States, North America |


Table: DimProduct
|   ProductKey | ProductName                                         | ProductDescription                                                                                                           |   ProductSubcategoryKey | Manufacturer   | BrandName   |   ClassID | ClassName   |   ColorID | ColorName   | Size   | Weight   |   UnitCost |   UnitPrice |
|-------------:|:----------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------|------------------------:|:---------------|:------------|----------:|:------------|----------:|:------------|:-------|:---------|-----------:|------------:|
|          873 | Contoso Wireless Laser Mouse E50 Grey               | Advanced 2.4 GHz cordless technology makes freedom, hyper-fast scrolling, laser, and cursor control on virtually any surface |                      22 | Contoso, Ltd   | Contoso     |         1 | Economy     |        11 | Grey        |        |          |      10.69 |       20.96 |
|          874 | Contoso Wireless Notebook Optical Mouse X205 Black  | Wireless notebook mouse, long battery life, convenient snap-in receiver                                                      |                      22 | Contoso, Ltd   | Contoso     |         3 | Deluxe      |         2 | Black       |        |          |      43.06 |      129.95 |
|          875 | Contoso Wireless Notebook Optical Mouse X205 White  | Wireless notebook mouse, long battery life, convenient snap-in receiver                                                      |                      22 | Contoso, Ltd   | Contoso     |         3 | Deluxe      |         8 | White       |        |          |      43.06 |      129.95 |
|          876 | Contoso Wireless Notebook Optical Mouse X205 Blue   | Wireless notebook mouse, long battery life, convenient snap-in receiver                                                      |                      22 | Contoso, Ltd   | Contoso     |         3 | Deluxe      |         3 | Blue        |        |          |      43.06 |      129.95 |
|          877 | Contoso Wireless Notebook Optical Mouse X205 Silver | Wireless notebook mouse, long battery life, convenient snap-in receiver                                                      |                      22 | Contoso, Ltd   | Contoso     |         3 | Deluxe      |         7 | Silver      |        |          |      43.06 |      129.95 |
|          878 | Contoso Wireless Notebook Optical Mouse X205 Orange | Wireless notebook mouse, long battery life, convenient snap-in receiver                                                      |                      22 | Contoso, Ltd   | Contoso     |         3 | Deluxe      |         9 | Orange      |        |          |      43.06 |      129.95 |
|          879 | Contoso Optical Wheel OEM PS/2 Mouse E60 Grey       | PS/2 mouse, 6 feet mouse cable                                                                                               |                      22 | Contoso, Ltd   | Contoso     |         1 | Economy     |        11 | Grey        |        |          |       6.63 |       13    |
|          880 | Contoso Optical Wheel OEM PS/2 Mouse E60 Black      | PS/2 mouse, 6 feet mouse cable                                                                                               |                      22 | Contoso, Ltd   | Contoso     |         1 | Economy     |         2 | Black       |        |          |       6.63 |       13    |
|          881 | Contoso Optical Wheel OEM PS/2 Mouse E60 White      | PS/2 mouse, 6 feet mouse cable                                                                                               |                      22 | Contoso, Ltd   | Contoso     |         1 | Economy     |         8 | White       |        |          |       6.63 |       13    |
|          882 | Contoso Optical Wheel OEM PS/2 Mouse E60 Silver     | PS/2 mouse, 6 feet mouse cable                                                                                               |                      22 | Contoso, Ltd   | Contoso     |         1 | Economy     |         7 | Silver      |        |          |       6.63 |       13    |


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


Table: DimProductSubcategory
|   ProductSubcategoryKey | ProductSubcategoryName   |   ProductCategoryKey |
|------------------------:|:-------------------------|---------------------:|
|                       1 | MP4&MP3                  |                    1 |
|                       2 | Recorder                 |                    1 |
|                       3 | Radio                    |                    1 |
|                       4 | Recording Pen            |                    1 |
|                       5 | Headphones               |                    1 |
|                       6 | Bluetooth Headphones     |                    1 |
|                       7 | Speakers                 |                    1 |
|                       8 | Audio Accessories        |                    1 |
|                       9 | Televisions              |                    2 |
|                      10 | VCD & DVD                |                    2 |


Table: DimPromotion
|   PromotionKey |   PromotionLabel | PromotionName                          |   DiscountPercent | StartDate               | EndDate                 |   Dias Promo |
|---------------:|-----------------:|:---------------------------------------|------------------:|:------------------------|:------------------------|-------------:|
|              1 |                1 | No Discount                            |              0    | 2003-01-01 00:00:00.000 | 2010-12-31 00:00:00.000 |         2921 |
|              2 |                2 | North America Spring Promotion         |              0.05 | 2007-01-01 00:00:00.000 | 2007-03-31 00:00:00.000 |           89 |
|              3 |                3 | North America Back-to-School Promotion |              0.1  | 2007-07-01 00:00:00.000 | 2007-09-30 00:00:00.000 |           91 |
|              4 |                4 | North America Holiday Promotion        |              0.2  | 2007-11-01 00:00:00.000 | 2007-12-31 00:00:00.000 |           60 |
|              5 |                5 | Asian Holiday Promotion                |              0.15 | 2007-11-01 00:00:00.000 | 2008-01-31 00:00:00.000 |           91 |
|              6 |                6 | Asian Spring Promotion                 |              0.2  | 2007-02-01 00:00:00.000 | 2007-04-30 00:00:00.000 |           88 |
|              7 |                7 | Asian Summer Promotion                 |              0.1  | 2007-05-01 00:00:00.000 | 2007-06-30 00:00:00.000 |           60 |
|              8 |                8 | European Spring Promotion              |              0.07 | 2007-02-01 00:00:00.000 | 2007-04-30 00:00:00.000 |           88 |
|              9 |                9 | European Back-to-Scholl Promotion      |              0.1  | 2007-08-01 00:00:00.000 | 2007-09-30 00:00:00.000 |           60 |
|             10 |               10 | European Holiday Promotion             |              0.2  | 2007-10-01 00:00:00.000 | 2008-01-31 00:00:00.000 |          122 |


Table: DimStores
|   StoreKey |   GeographyKey | StoreType   | StoreName                  |   EmployeeCount |   SellingAreaSize | Tienda               | Ciudad    | Ubicación Física                        | Categoría Tamaño Tienda   |
|-----------:|---------------:|:------------|:---------------------------|----------------:|------------------:|:---------------------|:----------|:----------------------------------------|:--------------------------|
|          1 |            693 | Store       | Contoso Seattle No.1 Store |              17 |               462 | Contoso Seattle No.1 | Seattle   | Seattle, United States, North America   | Pequeña                   |
|          2 |            693 | Store       | Contoso Seattle No.2 Store |              25 |               700 | Contoso Seattle No.2 | Seattle   | Seattle, United States, North America   | Mediana                   |
|          3 |            856 | Store       | Contoso Kennewick Store    |              26 |               680 | Contoso Kennewick    | Kennewick | Kennewick, United States, North America | Mediana                   |
|          4 |            424 | Store       | Contoso Bellevue Store     |              19 |               455 | Contoso Bellevue     | Bellevue  | Bellevue, United States, North America  | Pequeña                   |
|          5 |            677 | Store       | Contoso Redmond Store      |              33 |               560 | Contoso Redmond      | Redmond   | Redmond, United States, North America   | Mediana                   |
|          6 |            575 | Store       | Contoso Yakima Store       |              47 |              1125 | Contoso Yakima       | Yakima    | Yakima, United States, North America    | Grande                    |
|          7 |            838 | Store       | Contoso Granger Store      |              22 |               500 | Contoso Granger      | Granger   | Granger, United States, North America   | Pequeña                   |
|          8 |            935 | Store       | Contoso Sunnyside Store    |              17 |               460 | Contoso Sunnyside    | Sunnyside | Sunnyside, United States, North America | Pequeña                   |
|          9 |            941 | Store       | Contoso Toppenish Store    |              25 |               700 | Contoso Toppenish    | Toppenish | Toppenish, United States, North America | Mediana                   |
|         10 |            947 | Store       | Contoso Wapato Store       |              25 |               700 | Contoso Wapato       | Wapato    | Wapato, United States, North America    | Mediana                   |


Table: FactSales
|   OrderID | DateKey                 |   channelKey |   StoreKey |   ProductKey |   PromotionKey |   SalesQuantity |   ReturnQuantity |   Cantidad Total | Devolucion   | Tipo Venta   | Tipo Devolucion   |   Dto Mayorista |   Descuento |
|----------:|:------------------------|-------------:|-----------:|-------------:|---------------:|----------------:|-----------------:|-----------------:|:-------------|:-------------|:------------------|----------------:|------------:|
|      6043 | 2007-06-24 00:00:00.000 |            1 |        148 |         1012 |              1 |              10 |                0 |               10 | No           | Minorista    |                   |               0 |           0 |
|     15756 | 2007-06-24 00:00:00.000 |            1 |         28 |          968 |              1 |              10 |                0 |               10 | No           | Minorista    |                   |               0 |           0 |
|     18562 | 2007-06-24 00:00:00.000 |            1 |        233 |         1456 |              1 |              10 |                0 |               10 | No           | Minorista    |                   |               0 |           0 |
|     20245 | 2007-06-24 00:00:00.000 |            1 |        231 |         1177 |              1 |              10 |                0 |               10 | No           | Minorista    |                   |               0 |           0 |
|     20691 | 2007-06-24 00:00:00.000 |            1 |        287 |          978 |              1 |              10 |                0 |               10 | No           | Minorista    |                   |               0 |           0 |
|     22955 | 2007-06-24 00:00:00.000 |            1 |        211 |         1121 |              1 |              10 |                0 |               10 | No           | Minorista    |                   |               0 |           0 |
|     24131 | 2007-06-24 00:00:00.000 |            1 |         30 |         1320 |              1 |              10 |                0 |               10 | No           | Minorista    |                   |               0 |           0 |
|     26871 | 2007-06-24 00:00:00.000 |            1 |        152 |          517 |              1 |              10 |                0 |               10 | No           | Minorista    |                   |               0 |           0 |
|     33964 | 2007-06-24 00:00:00.000 |            1 |        116 |         1541 |              1 |              10 |                0 |               10 | No           | Minorista    |                   |               0 |           0 |
|     37340 | 2007-06-24 00:00:00.000 |            1 |         21 |         1628 |              1 |              10 |                0 |               10 | No           | Minorista    |                   |               0 |           0 |

 


tables: name: % Ajuste PU
data: % Ajuste PU.csv
name: DimCalendar
data: DimCalendar.csv
name: DimChannel
data: DimChannel.csv
name: DimGeography
data: DimGeography.csv
name: DimProduct
data: DimProduct.csv
name: DimProductCategory
data: DimProductCategory.csv
name: DimProductSubcategory
data: DimProductSubcategory.csv
name: DimPromotion
data: DimPromotion.csv
name: DimStores
data: DimStores.csv
name: FactSales
data: FactSales.csv
label: FactSales
channelKey
DimChannel
ChannelKey
FactSales
DateKey
DimCalendar
DateKey
FactSales
ProductKey
DimProduct
ProductKey
FactSales
PromotionKey
DimPromotion
PromotionKey
FactSales
StoreKey
DimStores
StoreKey
DimStores
GeographyKey
DimGeography
GeographyKey
DimProductSubcategory
ProductCategoryKey
DimProductCategory
ProductCategoryKey
DimProduct
ProductSubcategoryKey
DimProductSubcategory
ProductSubcategoryKey
output: {
    "joins": [
        {
            "from_table": "FactSales",
            "from_column": "channelKey",
            "to_table": "DimChannel",
            "to_column": "ChannelKey"
        },
        {
            "from_table": "FactSales",
            "from_column": "DateKey",
            "to_table": "DimCalendar",
            "to_column": "DateKey"
        },
        {
            "from_table": "FactSales",
            "from_column": "ProductKey",
            "to_table": "DimProduct",
            "to_column": "ProductKey"
        },
        {
            "from_table": "FactSales",
            "from_column": "PromotionKey",
            "to_table": "DimPromotion",
            "to_column": "PromotionKey"
        },
        {
            "from_table": "FactSales",
            "from_column": "StoreKey",
            "to_table": "DimStores",
            "to_column": "StoreKey"
        },
        {
            "from_table": "DimStores",
            "from_column": "GeographyKey",
            "to_table": "DimGeography",
            "to_column": "GeographyKey"
        },
        {
            "from_table": "DimProductSubcategory",
            "from_column": "ProductCategoryKey",
            "to_table": "DimProductCategory",
            "to_column": "ProductCategoryKey"
        },
        {
            "from_table": "DimProduct",
            "from_column": "ProductSubcategoryKey",
            "to_table": "DimProductSubcategory",
            "to_column": "ProductSubcategoryKey"
        }
    ]
}