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: Calendar
| Date Time               | Date                    | Time                    |
|:------------------------|:------------------------|:------------------------|
| 2015-01-01 00:00:00.000 | 2015-01-01 00:00:00.000 | 1899-12-30 00:00:00.000 |
| 2015-01-02 00:00:00.000 | 2015-01-02 00:00:00.000 | 1899-12-30 00:00:00.000 |
| 2015-01-03 00:00:00.000 | 2015-01-03 00:00:00.000 | 1899-12-30 00:00:00.000 |
| 2015-01-04 00:00:00.000 | 2015-01-04 00:00:00.000 | 1899-12-30 00:00:00.000 |
| 2015-01-05 00:00:00.000 | 2015-01-05 00:00:00.000 | 1899-12-30 00:00:00.000 |
| 2015-01-06 00:00:00.000 | 2015-01-06 00:00:00.000 | 1899-12-30 00:00:00.000 |
| 2015-01-07 00:00:00.000 | 2015-01-07 00:00:00.000 | 1899-12-30 00:00:00.000 |
| 2015-01-08 00:00:00.000 | 2015-01-08 00:00:00.000 | 1899-12-30 00:00:00.000 |
| 2015-01-09 00:00:00.000 | 2015-01-09 00:00:00.000 | 1899-12-30 00:00:00.000 |
| 2015-01-10 00:00:00.000 | 2015-01-10 00:00:00.000 | 1899-12-30 00:00:00.000 |


Table: POS
|   CentreId | CentreName                      | PostCode   |   SquareMetres |   NumberUnits | Town.TownName   | Town.Region.RegionName   | POS Type.CentreTypeName   |
|-----------:|:--------------------------------|:-----------|---------------:|--------------:|:----------------|:-------------------------|:--------------------------|
|          1 | Pavilion Shopping Centre        | EN8 7BZ    |          15143 |            62 | Waltham Cross   | South East               | Shopping Centre           |
|         39 | Wellington Shopping Centre      | GU11 1DB   |          16493 |            44 | Aldershot       | South East               | Shopping Centre           |
|         13 | Market Quay                     | PO16       |          15515 |             0 | Fareham         | South East               | Shopping Centre           |
|        164 | County Square Shopping Centre   | TN23 1YD   |          22111 |            47 | Ashford         | South East               | Shopping Centre           |
|        194 | Friars Square Shopping Centre   | HP20 2SP   |          23597 |            83 | Aylesbury       | South East               | Shopping Centre           |
|        171 | The Boardwalk                   | PO6 4TP    |          22632 |            46 | Portsmouth      | South East               | Shopping Centre           |
|         12 | Kingsmead Shopping Centre       | GU14 7SJ   |          15515 |            69 | Farnborough     | South East               | Shopping Centre           |
|        108 | Harpur Centre                   | MK40 1TJ   |          18581 |            32 | Bedford         | South East               | Shopping Centre           |
|         20 | The Nicholson's Centre          | SL6 1LB    |          15794 |            64 | Maidenhead      | South East               | Shopping Centre           |
|        107 | Princess Square Shopping Centre | RG12 1LS   |          18581 |            50 | Bracknell       | South East               | Shopping Centre           |


Table: Product
|   ProductId | ProductName   | Animal    |   Legs |   WeightGrams |   ProductionCost | Habitat.HabitatName   | Habitat.BackColour   | Habitat.ForeColour   | Habitat.Mode.EnvironmentName   | Species.FamilyName   |
|------------:|:--------------|:----------|-------:|--------------:|-----------------:|:----------------------|:---------------------|:---------------------|:-------------------------------|:---------------------|
|           1 | Sammy         | Snake     |      0 |           950 |             7.19 | Grasslands            | Light green          | Black                | Land                           | Reptile              |
|           5 | Dave          | Dachsund  |      4 |           775 |             5.85 | Grasslands            | Light green          | Black                | Land                           | Mammal               |
|           4 | Layla         | Lemur     |      2 |           550 |             4.28 | Forest                | Dark green           | White                | Land                           | Mammal               |
|           6 | Kylie         | Camel     |      4 |          1200 |             3.15 | Desert                | #d6a740              | Black                | Land                           | Mammal               |
|           8 | Faye          | Fox       |      4 |           420 |             4.95 | Urban                 | #222                 | White                | Land                           | Mammal               |
|           2 | Pokyo         | Penguin   |      2 |           850 |             4.5  | Salt water            | #78aaf5              | White                | Water                          | Bird                 |
|           3 | Fenella       | Frog      |      4 |           400 |            10.79 | Fresh water           | LightBlue            | Dark blue            | Water                          | Amphibian            |
|           7 | Jeremy        | Jackdaw   |      2 |           295 |             7.65 | Sky                   | #0a66f0              | White                | Air                            | Bird                 |
|           9 | Oliver        | Owl       |      2 |           380 |             6.75 | Sky                   | #0a66f0              | White                | Air                            | Bird                 |
|          10 | Cleopatra     | Clownfish |      0 |           290 |             2.69 | Salt water            | #78aaf5              | White                | Water                          | Fish                 |


Table: Purchase
|   PurchaseId | PurchaseDate            | PurchaseDateTime        |   ProductId |   CentreId |   Quantity |   Price | PaymentDate             |   StaffId |   Revenue |   Cost |   Profit |
|-------------:|:------------------------|:------------------------|------------:|-----------:|-----------:|--------:|:------------------------|----------:|----------:|-------:|---------:|
|        15470 | 2017-01-01 00:00:00.000 | 2017-01-01 15:12:00.000 |           1 |        258 |          1 |     8.5 | 2017-01-01 00:00:00.000 |      4671 |       8.5 |   7.19 |     1.31 |
|        15486 | 2017-01-02 00:00:00.000 | 2017-01-02 16:30:00.000 |           1 |        352 |          1 |     8.5 | 2017-01-02 00:00:00.000 |      5511 |       8.5 |   7.19 |     1.31 |
|        15492 | 2017-01-02 00:00:00.000 | 2017-01-02 17:07:00.000 |           1 |        319 |          1 |     8.5 | 2017-01-02 00:00:00.000 |      4955 |       8.5 |   7.19 |     1.31 |
|        15505 | 2017-01-02 00:00:00.000 | 2017-01-02 18:35:00.000 |           1 |        332 |          1 |     8.5 | 2017-01-02 00:00:00.000 |      5031 |       8.5 |   7.19 |     1.31 |
|        15737 | 2017-01-04 00:00:00.000 | 2017-01-04 14:33:00.000 |           1 |        338 |          1 |     8.5 | 2017-01-04 00:00:00.000 |      5074 |       8.5 |   7.19 |     1.31 |
|        15739 | 2017-01-04 00:00:00.000 | 2017-01-04 15:02:00.000 |           1 |        348 |          1 |     8.5 | 2017-01-04 00:00:00.000 |      5129 |       8.5 |   7.19 |     1.31 |
|        15823 | 2017-01-04 00:00:00.000 | 2017-01-04 17:44:00.000 |           1 |        121 |          1 |     8.5 | 2017-01-04 00:00:00.000 |      3947 |       8.5 |   7.19 |     1.31 |
|        15830 | 2017-01-04 00:00:00.000 | 2017-01-04 18:06:00.000 |           1 |        332 |          1 |     8.5 | 2017-01-04 00:00:00.000 |      5031 |       8.5 |   7.19 |     1.31 |
|        15843 | 2017-01-05 00:00:00.000 | 2017-01-05 18:11:00.000 |           1 |        376 |          1 |     8.5 | 2017-01-05 00:00:00.000 |      5377 |       8.5 |   7.19 |     1.31 |
|        15923 | 2017-01-05 00:00:00.000 | 2017-01-05 18:55:00.000 |           1 |        292 |          1 |     8.5 | 2017-01-05 00:00:00.000 |      4835 |       8.5 |   7.19 |     1.31 |

 


tables: name: Calendar
data: Calendar.csv
name: POS
data: POS.csv
name: Product
data: Product.csv
name: Purchase
data: Purchase.csv
label: Purchase
CentreId
POS
CentreId
Purchase
ProductId
Product
ProductId
Purchase
PurchaseDate
Calendar
Date
output: {
    "joins": [
        {
            "from_table": "Purchase",
            "from_column": "CentreId",
            "to_table": "POS",
            "to_column": "CentreId"
        },
        {
            "from_table": "Purchase",
            "from_column": "ProductId",
            "to_table": "Product",
            "to_column": "ProductId"
        },
        {
            "from_table": "Purchase",
            "from_column": "PurchaseDate",
            "to_table": "Calendar",
            "to_column": "Date"
        }
    ]
}