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: category master
| Category               |   CategoryID |
|:-----------------------|-------------:|
| Bread                  |         1709 |
| Cold Snacks            |         1703 |
| Entrees/Salad          |         1704 |
| Fast Food              |         1708 |
| Fresh Bakery           |         1707 |
| Fresh Bakery Multi-Day |         1712 |
| Fresh Sandwiches       |         1701 |
| Grill                  |         1705 |
| Hot Food               |         1702 |
| Nachos                 |         1706 |


Table: customer satisification
| Measurement                                    |   Score | date   |   DateStoreKey.2 |
|:-----------------------------------------------|--------:|:-------|-----------------:|
| Bun warmer is clean, no grease, crumbs or dust |       1 |        |            10253 |
| Bun warmer is clean, no grease, crumbs or dust |       1 |        |            10258 |
| Bun warmer is clean, no grease, crumbs or dust |       1 |        |            10437 |
| Bun warmer is clean, no grease, crumbs or dust |       1 |        |            15948 |
| Bun warmer is clean, no grease, crumbs or dust |       1 |        |            16188 |
| Bun warmer is clean, no grease, crumbs or dust |       1 |        |            18248 |
| Bun warmer is clean, no grease, crumbs or dust |       1 |        |            18580 |
| Bun warmer is clean, no grease, crumbs or dust |       1 |        |            21260 |
| Bun warmer is clean, no grease, crumbs or dust |       1 |        |            23662 |
| Bun warmer is clean, no grease, crumbs or dust |       1 |        |            25173 |


Table: Earnings actual
| Actual   | date   |   DateStoreKey.2 |
|:---------|:-------|-----------------:|
|          |        |            10253 |
|          |        |            10258 |
|          |        |            10437 |
|          |        |            15948 |
|          |        |            16188 |
|          |        |            18248 |
|          |        |            18580 |
|          |        |            21260 |
|          |        |            23662 |
|          |        |            25173 |


Table: Earnings Budget
| Budget   | date   |   DateStoreKey.2 |
|:---------|:-------|-----------------:|
|          |        |            10253 |
|          |        |            10258 |
|          |        |            10437 |
|          |        |            15948 |
|          |        |            16188 |
|          |        |            18248 |
|          |        |            18580 |
|          |        |            21260 |
|          |        |            23662 |
|          |        |            25173 |


Table: FreshFoodSales
|   CategoryID |   Sales | Same_Store   | SS_Key     | date                    |   DateStoreKey.2 |
|-------------:|--------:|:-------------|:-----------|:------------------------|-----------------:|
|         1701 | 3576.21 | Yes          | 10009JanFF | 2012-01-01 00:00:00.000 |            10009 |
|         1701 | 1947.5  | Yes          | 10017JanFF | 2012-01-01 00:00:00.000 |            10017 |
|         1701 | 1753.02 | Yes          | 10022JanFF | 2012-01-01 00:00:00.000 |            10022 |
|         1701 | 1740.35 | Yes          | 10030JanFF | 2012-01-01 00:00:00.000 |            10030 |
|         1701 | 1830.45 | Yes          | 10033JanFF | 2012-01-01 00:00:00.000 |            10033 |
|         1701 | 1828.3  | Yes          | 10039JanFF | 2012-01-01 00:00:00.000 |            10039 |
|         1701 | 1642.75 | Yes          | 10056JanFF | 2012-01-01 00:00:00.000 |            10056 |
|         1701 | 1657.32 | Yes          | 10060JanFF | 2012-01-01 00:00:00.000 |            10060 |
|         1701 | 1233.44 | Yes          | 10110JanFF | 2012-01-01 00:00:00.000 |            10110 |
|         1701 | 1679.31 | Yes          | 10147JanFF | 2012-01-01 00:00:00.000 |            10147 |


Table: LinkTable
| Date                    | DateStoreKey   | Month   |   MonthNumber |   Store |   Year | YearMonth               |
|:------------------------|:---------------|:--------|--------------:|--------:|-------:|:------------------------|
| 2013-04-01 00:00:00.000 | 4/1/2013_10009 | Apr     |             4 |   10009 |   2013 | 2013-04-01 00:00:00.000 |
| 2013-04-01 00:00:00.000 | 4/1/2013_10017 | Apr     |             4 |   10017 |   2013 | 2013-04-01 00:00:00.000 |
| 2013-04-01 00:00:00.000 | 4/1/2013_10022 | Apr     |             4 |   10022 |   2013 | 2013-04-01 00:00:00.000 |
| 2013-04-01 00:00:00.000 | 4/1/2013_10030 | Apr     |             4 |   10030 |   2013 | 2013-04-01 00:00:00.000 |
| 2013-04-01 00:00:00.000 | 4/1/2013_10033 | Apr     |             4 |   10033 |   2013 | 2013-04-01 00:00:00.000 |
| 2013-04-01 00:00:00.000 | 4/1/2013_10039 | Apr     |             4 |   10039 |   2013 | 2013-04-01 00:00:00.000 |
| 2013-04-01 00:00:00.000 | 4/1/2013_10056 | Apr     |             4 |   10056 |   2013 | 2013-04-01 00:00:00.000 |
| 2013-04-01 00:00:00.000 | 4/1/2013_10060 | Apr     |             4 |   10060 |   2013 | 2013-04-01 00:00:00.000 |
| 2013-04-01 00:00:00.000 | 4/1/2013_10110 | Apr     |             4 |   10110 |   2013 | 2013-04-01 00:00:00.000 |
| 2013-04-01 00:00:00.000 | 4/1/2013_10147 | Apr     |             4 |   10147 |   2013 | 2013-04-01 00:00:00.000 |


Table: Master Calender
| Date                    | Cal.Date   |   DateAsInteger |   Monthnumber | YearMonthNumber   | MonthNameLong   |   DayOfWeekNumber | DayOfWeek   | Quater   | YearQuater   |
|:------------------------|:-----------|----------------:|--------------:|:------------------|:----------------|------------------:|:------------|:---------|:-------------|
| 2012-07-01 00:00:00.000 | 07/01/2012 |        20120701 |             7 | 2012/07           | July            |                 1 | Sunday      | Q3       | 2012/33      |
| 2012-07-02 00:00:00.000 | 07/02/2012 |        20120702 |             7 | 2012/07           | July            |                 2 | Monday      | Q3       | 2012/33      |
| 2012-07-03 00:00:00.000 | 07/03/2012 |        20120703 |             7 | 2012/07           | July            |                 3 | Tuesday     | Q3       | 2012/33      |
| 2012-07-04 00:00:00.000 | 07/04/2012 |        20120704 |             7 | 2012/07           | July            |                 4 | Wednesday   | Q3       | 2012/33      |
| 2012-07-05 00:00:00.000 | 07/05/2012 |        20120705 |             7 | 2012/07           | July            |                 5 | Thursday    | Q3       | 2012/33      |
| 2012-07-06 00:00:00.000 | 07/06/2012 |        20120706 |             7 | 2012/07           | July            |                 6 | Friday      | Q3       | 2012/33      |
| 2012-07-07 00:00:00.000 | 07/07/2012 |        20120707 |             7 | 2012/07           | July            |                 7 | Saturday    | Q3       | 2012/33      |
| 2012-07-08 00:00:00.000 | 07/08/2012 |        20120708 |             7 | 2012/07           | July            |                 1 | Sunday      | Q3       | 2012/33      |
| 2012-07-09 00:00:00.000 | 07/09/2012 |        20120709 |             7 | 2012/07           | July            |                 2 | Monday      | Q3       | 2012/33      |
| 2012-07-10 00:00:00.000 | 07/10/2012 |        20120710 |             7 | 2012/07           | July            |                 3 | Tuesday     | Q3       | 2012/33      |


Table: Parameter Table
| Measures                   |   Index |
|:---------------------------|--------:|
| number of store in country |       1 |
| total store                |       2 |


Table: StoreGeoLocations
|   Accuracy | Coordinates      | Country Code   | Country         | GeoCodeKey   |   Latitude |   Longitude | State   |
|-----------:|:-----------------|:---------------|:----------------|:-------------|-----------:|------------:|:--------|
|          4 | 50.9- -1.4833    | GB             | Hampshire       | GB_SO40      |    50.9    |     -1.4833 |         |
|          4 | 50.15- -1.2167   | GB             | Hampshire       | GB_SO21      |    50.15   |     -1.2167 |         |
|          4 | 50.85- -1.1667   | GB             | Hampshire       | GB_PO16      |    50.85   |     -1.1667 |         |
|          4 | 50.85- -1.1833   | GB             | Hampshire       | GB_PO16      |    50.85   |     -1.1833 |         |
|          4 | 50.95- -2.5      | GB             | Gloucestershire | GB_GL54      |    50.95   |     -2.5    |         |
|          4 | 50.5333- -2.45   | GB             | Hampshire       | GB_SO21      |    50.5333 |     -2.45   |         |
|          4 | 50.6833- -1.4167 | GB             | Hampshire       | GB_SO40      |    50.6833 |     -1.4167 |         |
|          4 | 50.7331- -1.7757 | GB             | Dorset          | GB_BH23      |    50.7331 |     -1.7757 |         |
|          4 | 50.7399- -1.708  | GB             | Dorset          | GB_BH23      |    50.7399 |     -1.708  |         |
|          4 | 50.7508- -1.765  | GB             | Dorset          | GB_BH23      |    50.7508 |     -1.765  |         |


Table: StoreLocation
| City       | Country   | GeoCodeKey   |   Post Code |   Store |
|:-----------|:----------|:-------------|------------:|--------:|
| Alexandria | USA       | US_71301     |       71301 |   10439 |
| Amherst    | USA       | US_14228     |       14228 |   18248 |
| Asheboro   | USA       | US_27203     |       27203 |   32245 |
| Atlanta    | USA       | US_30350     |       30350 |   10366 |
| Atlanta    | USA       | US_30350     |       30350 |   10417 |
| Atlanta    | USA       | US_30350     |       30350 |   23458 |
| Atlanta    | USA       | US_30350     |       30350 |   24640 |
| Atlanta    | USA       | US_30350     |       30350 |   26779 |
| Austin     | USA       | US_78759     |       78759 |   25359 |
| Austin     | USA       | US_78759     |       78759 |   26169 |


Table: Stores
| District Manager Name   | District Name   | EndDate                 | Region Market   | Region Market Manager   | Region Store Manager Name   | StartDate               |   Store | Store Type         |   StoreCounter |
|:------------------------|:----------------|:------------------------|:----------------|:------------------------|:----------------------------|:------------------------|--------:|:-------------------|---------------:|
| Abbot Bennett           | District 40     | 2013-12-31 00:00:00.000 | USA             | Michael Walker          | Ashton Hogan                | 2012-01-01 00:00:00.000 |   26169 | Convenience        |              1 |
| Abbot Bennett           | District 40     | 2013-12-31 00:00:00.000 | USA             | Michael Walker          | Bevis Atkins                | 2012-01-01 00:00:00.000 |   27970 | Convenience        |              1 |
| Abbot Bennett           | District 40     | 2013-12-31 00:00:00.000 | USA             | Michael Walker          | Carter Conrad               | 2012-01-01 00:00:00.000 |   29549 | Convenience        |              1 |
| Abbot Bennett           | District 40     | 2013-12-31 00:00:00.000 | USA             | Michael Walker          | Colby Saunders              | 2012-01-01 00:00:00.000 |   25956 | Fuel & Convenience |              1 |
| Abbot Bennett           | District 40     | 2013-12-31 00:00:00.000 | USA             | Michael Walker          | Dai Howell                  | 2012-01-01 00:00:00.000 |   25357 | Convenience        |              1 |
| Abbot Bennett           | District 40     | 2013-12-31 00:00:00.000 | USA             | Michael Walker          | Evan Frost                  | 2012-01-01 00:00:00.000 |   24350 | Convenience        |              1 |
| Abbot Bennett           | District 40     | 2013-12-31 00:00:00.000 | USA             | Michael Walker          | Glenna Johns                | 2012-01-01 00:00:00.000 |   24644 | Fuel & Convenience |              1 |
| Abbot Bennett           | District 40     | 2013-12-31 00:00:00.000 | USA             | Michael Walker          | Gray Webb                   | 2012-01-01 00:00:00.000 |   23656 | Convenience        |              1 |
| Abbot Bennett           | District 40     | 2013-12-31 00:00:00.000 | USA             | Michael Walker          | Isaac Kennedy               | 2012-01-01 00:00:00.000 |   29367 | Fuel & Convenience |              1 |
| Abbot Bennett           | District 40     | 2013-12-31 00:00:00.000 | USA             | Michael Walker          | Lev Workman                 | 2012-01-01 00:00:00.000 |   10465 | Convenience        |              1 |


Table: SurveyCategory
| Area             | Focus       |   Focus Sort | Measurement                                     |
|:-----------------|:------------|-------------:|:------------------------------------------------|
| Chili and Cheese | Cleanliness |            4 | Machine is clean, no spills and liners          |
| Coffee           | Cleanliness |            4 | Coffee counters are clean                       |
| Coffee           | Cleanliness |            4 | Coffee machines and warming plates are clean    |
| Coffee           | Cleanliness |            4 | Coffee machines are clean (interior & exterior) |
| Coffee           | Cleanliness |            4 | Coffee pots are clean                           |
| Coffee           | Cleanliness |            4 | Condiment trays are clean and stocked           |
| Coffee           | Cleanliness |            4 | Grinder is clean                                |
| Condiments       | Cleanliness |            4 | Condiment area is clean                         |
| Condiments       | Cleanliness |            4 | Pumps are free of old dried product             |
| Condiments       | Cleanliness |            4 | Sneeze guard is free of old dried product       |


Table: Top 5 Bottom
|   CategoryID |   Sales | Same_Store   | SS_Key     | date                    |   DateStoreKey.2 |
|-------------:|--------:|:-------------|:-----------|:------------------------|-----------------:|
|         1704 |    1.49 | Yes          | 33037JanFF | 2013-01-01 00:00:00.000 |            33037 |
|         1704 |    1.49 | Yes          | 21260JanFF | 2013-01-01 00:00:00.000 |            21260 |
|         1704 |    1.49 | Yes          | 32973JanFF | 2013-01-01 00:00:00.000 |            32973 |
|         1704 |    1.49 | Yes          | 21260JanFF | 2013-01-05 00:00:00.000 |            21260 |
|         1704 |    1.49 | Yes          | 32295JanFF | 2013-01-01 00:00:00.000 |            32295 |
|         1704 |    1.49 | Yes          | 32295JanFF | 2013-01-05 00:00:00.000 |            32295 |
|         1704 |    1.49 | Yes          | 32973JanFF | 2013-01-05 00:00:00.000 |            32973 |
|         1704 |    1.49 | Yes          | 33037JanFF | 2013-01-05 00:00:00.000 |            33037 |
|         1704 |    1.49 | Yes          | 21260JanFF | 2013-01-09 00:00:00.000 |            21260 |
|         1704 |    1.49 | Yes          | 32295JanFF | 2013-01-09 00:00:00.000 |            32295 |


Table: TOP BELLOW 5 Sales
|   CategoryID |   Sales | Same_Store   | SS_Key     | date                    |   DateStoreKey.2 |
|-------------:|--------:|:-------------|:-----------|:------------------------|-----------------:|
|         1704 |    1.49 | Yes          | 33037JanFF | 2013-01-01 00:00:00.000 |            33037 |
|         1704 |    1.49 | Yes          | 21260JanFF | 2013-01-01 00:00:00.000 |            21260 |
|         1704 |    1.49 | Yes          | 32973JanFF | 2013-01-01 00:00:00.000 |            32973 |
|         1704 |    1.49 | Yes          | 21260JanFF | 2013-01-05 00:00:00.000 |            21260 |
|         1704 |    1.49 | Yes          | 32295JanFF | 2013-01-01 00:00:00.000 |            32295 |
|         1704 |    1.49 | Yes          | 32295JanFF | 2013-01-05 00:00:00.000 |            32295 |
|         1704 |    1.49 | Yes          | 32973JanFF | 2013-01-05 00:00:00.000 |            32973 |
|         1704 |    1.49 | Yes          | 33037JanFF | 2013-01-05 00:00:00.000 |            33037 |
|         1704 |    1.49 | Yes          | 21260JanFF | 2013-01-09 00:00:00.000 |            21260 |
|         1704 |    1.49 | Yes          | 32295JanFF | 2013-01-09 00:00:00.000 |            32295 |


Table: Top N Analysis
|   Top N Analysis |
|-----------------:|
|                0 |
|                1 |
|                2 |
|                3 |
|                4 |
|                5 |
|                6 |
|                7 |
|                8 |
|                9 |


Table: Top5 Sales
|   CategoryID |   Sales | Same_Store   | SS_Key     | date                    |   DateStoreKey.2 |
|-------------:|--------:|:-------------|:-----------|:------------------------|-----------------:|
|         1702 | 19566.8 | Yes          | 32860AprFF | 2013-01-08 00:00:00.000 |            32860 |
|         1702 | 19566.8 | Yes          | 32860AprFF | 2013-01-12 00:00:00.000 |            32860 |
|         1702 | 19566.8 | Yes          | 32860AprFF | 2013-01-04 00:00:00.000 |            32860 |
|         1702 | 20843.9 | Yes          | 32860MarFF | 2013-01-07 00:00:00.000 |            32860 |
|         1702 | 20843.9 | Yes          | 32860MarFF | 2013-01-11 00:00:00.000 |            32860 |
|         1702 | 20843.9 | Yes          | 32860MarFF | 2013-01-03 00:00:00.000 |            32860 |

 


tables: name: category master
data: category master.csv
name: customer satisification
data: customer satisification.csv
name: Earnings actual
data: Earnings actual.csv
name: Earnings Budget
data: Earnings Budget.csv
name: FreshFoodSales
data: FreshFoodSales.csv
name: LinkTable
data: LinkTable.csv
name: Master Calender
data: Master Calender.csv
name: Parameter Table
data: Parameter Table.csv
name: StoreGeoLocations
data: StoreGeoLocations.csv
name: StoreLocation
data: StoreLocation.csv
name: Stores
data: Stores.csv
name: SurveyCategory
data: SurveyCategory.csv
name: Top 5 Bottom
data: Top 5 Bottom.csv
name: TOP BELLOW 5 Sales
data: TOP BELLOW 5 Sales.csv
name: Top N Analysis
data: Top N Analysis.csv
name: Top5 Sales
data: Top5 Sales.csv
label: FreshFoodSales
CategoryID
category master
CategoryID
LinkTable
Store
Stores
Store
StoreLocation
Store
Stores
Store
customer satisification
Measurement
SurveyCategory
Measurement
StoreGeoLocations
GeoCodeKey
StoreLocation
GeoCodeKey
Earnings actual
date
LinkTable
Date
Earnings Budget
DateStoreKey.2
Earnings actual
DateStoreKey.2
customer satisification
DateStoreKey.2
FreshFoodSales
DateStoreKey.2
Earnings Budget
DateStoreKey.2
FreshFoodSales
DateStoreKey.2
output: {
    "joins": [
        {
            "from_table": "FreshFoodSales",
            "from_column": "CategoryID",
            "to_table": "category master",
            "to_column": "CategoryID"
        },
        {
            "from_table": "LinkTable",
            "from_column": "Store",
            "to_table": "Stores",
            "to_column": "Store"
        },
        {
            "from_table": "StoreLocation",
            "from_column": "Store",
            "to_table": "Stores",
            "to_column": "Store"
        },
        {
            "from_table": "customer satisification",
            "from_column": "Measurement",
            "to_table": "SurveyCategory",
            "to_column": "Measurement"
        },
        {
            "from_table": "StoreGeoLocations",
            "from_column": "GeoCodeKey",
            "to_table": "StoreLocation",
            "to_column": "GeoCodeKey"
        },
        {
            "from_table": "Earnings actual",
            "from_column": "date",
            "to_table": "LinkTable",
            "to_column": "Date"
        },
        {
            "from_table": "Earnings Budget",
            "from_column": "DateStoreKey.2",
            "to_table": "Earnings actual",
            "to_column": "DateStoreKey.2"
        },
        {
            "from_table": "customer satisification",
            "from_column": "DateStoreKey.2",
            "to_table": "FreshFoodSales",
            "to_column": "DateStoreKey.2"
        },
        {
            "from_table": "Earnings Budget",
            "from_column": "DateStoreKey.2",
            "to_table": "FreshFoodSales",
            "to_column": "DateStoreKey.2"
        }
    ]
}