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: Customers
|   Account Ref | Account Owner     | Account Name   |
|--------------:|:------------------|:---------------|
|        900422 | Bart Vanderostyne | Adrenio GmbH   |
|        900745 | Sandra Conejos    | Entel          |
|        900974 | Don Paige         | Home Telecom   |
|        901512 | Stefan Tsvetkov   | Iskratel       |
|        901858 | Stefan Tsvetkov   | Moldtelecom    |
|        901491 | Daniel Fearon     | Stream Group   |
|        901688 | Matthew Fletcher  | VITEC          |


Table: Dates
| Date                    |   Year |   QuarterOfYear |   MonthOfYear |   DayOfMonth |   DateInt | MonthName   | MonthInCalendar   | QuarterInCalendar   |   DayInWeek | DayOfWeekName   | WeekEnding              |   Week Number |   MonthnYear |   QuarternYear |   ShortYear | FY   |
|:------------------------|-------:|----------------:|--------------:|-------------:|----------:|:------------|:------------------|:--------------------|------------:|:----------------|:------------------------|--------------:|-------------:|---------------:|------------:|:-----|
| 2016-07-01 00:00:00.000 |   2016 |               3 |             7 |            1 |  20160701 | July        | Jul 2016          | Q3 2016             |           4 | Friday          | 2016-07-03 00:00:00.000 |            27 |     20160700 |       20160300 |          16 | FY17 |
| 2016-07-02 00:00:00.000 |   2016 |               3 |             7 |            2 |  20160702 | July        | Jul 2016          | Q3 2016             |           5 | Saturday        | 2016-07-03 00:00:00.000 |            27 |     20160700 |       20160300 |          16 | FY17 |
| 2016-07-03 00:00:00.000 |   2016 |               3 |             7 |            3 |  20160703 | July        | Jul 2016          | Q3 2016             |           6 | Sunday          | 2016-07-03 00:00:00.000 |            27 |     20160700 |       20160300 |          16 | FY17 |
| 2016-07-04 00:00:00.000 |   2016 |               3 |             7 |            4 |  20160704 | July        | Jul 2016          | Q3 2016             |           0 | Monday          | 2016-07-10 00:00:00.000 |            28 |     20160700 |       20160300 |          16 | FY17 |
| 2016-07-05 00:00:00.000 |   2016 |               3 |             7 |            5 |  20160705 | July        | Jul 2016          | Q3 2016             |           1 | Tuesday         | 2016-07-10 00:00:00.000 |            28 |     20160700 |       20160300 |          16 | FY17 |
| 2016-07-06 00:00:00.000 |   2016 |               3 |             7 |            6 |  20160706 | July        | Jul 2016          | Q3 2016             |           2 | Wednesday       | 2016-07-10 00:00:00.000 |            28 |     20160700 |       20160300 |          16 | FY17 |
| 2016-07-07 00:00:00.000 |   2016 |               3 |             7 |            7 |  20160707 | July        | Jul 2016          | Q3 2016             |           3 | Thursday        | 2016-07-10 00:00:00.000 |            28 |     20160700 |       20160300 |          16 | FY17 |
| 2016-07-08 00:00:00.000 |   2016 |               3 |             7 |            8 |  20160708 | July        | Jul 2016          | Q3 2016             |           4 | Friday          | 2016-07-10 00:00:00.000 |            28 |     20160700 |       20160300 |          16 | FY17 |
| 2016-07-09 00:00:00.000 |   2016 |               3 |             7 |            9 |  20160709 | July        | Jul 2016          | Q3 2016             |           5 | Saturday        | 2016-07-10 00:00:00.000 |            28 |     20160700 |       20160300 |          16 | FY17 |
| 2016-07-10 00:00:00.000 |   2016 |               3 |             7 |           10 |  20160710 | July        | Jul 2016          | Q3 2016             |           6 | Sunday          | 2016-07-10 00:00:00.000 |            28 |     20160700 |       20160300 |          16 | FY17 |


Table: Items
| Item Number   | Product   | Revenue Type   | Parent        | Sub Parent   | Config                  | Item Class   | Desc                                                                       | Column9   | Column10   | Column11   |
|:--------------|:----------|:---------------|:--------------|:-------------|:------------------------|:-------------|:---------------------------------------------------------------------------|:----------|:-----------|:-----------|
| 99-880809-83A | APOLLO    | Device         | KAMAI         | Kamai 7B     | Kam 7B                  | FP           | Kamai 7B- 2GB SDRAM, 8GB eMMC, 5GHz 802.11ac (4x4), Maxi ATV v2 RC, US PSU |           |            |            |
| 99-880900-70  | ENABLE    | Device         | KAMAI         | Kamai 7Q     | Kam 751Q                | FP           | Kamai 751Q, 2GB SDRAM, 16GB eMMC, 802.11ac (4x4), 3.5mm to 3RCA, US PSU    |           |            |            |
| A150-6002-QFP | AMINET    | Device         | X5X           | A150         | A150-6002               | FP           | A150,PSU-US,RC-WILLOW,HDMI,NTSC QFP                                        |           |            |            |
| A150-6007-QFP | AMINET    | Device         | X5X           | A150         | A150-6007               | FP           | A150,PSU-UK,RC-WILLOW,HDMI,PALG QFP                                        |           |            |            |
| ESWNAH1100A   | ENABLE    | Software       | RECURRING     | Software     | License                 | SW           | Enable Hybrid TV Software                                                  |           |            |            |
| ESWNAN1101A   | ENGAGE    | Prof Services  | NON RECURRING | Hosted       | Set Up                  | PS 1T        | Engage - Hosted Service Assurance Configuration and Setup                  |           |            |            |
| ESWNAN1701    | ENGAGE    | Software       | RECURRING     | Engage       | Ensure + Ensight Bundle | SW           | Engage - Bundle For Ensight/Ensure                                         |           |            |            |
| SUBSCRIPTION  | MOVE      | Software       | RECURRING     | Software     | iTunes                  | SW           | Subscription                                                               |           |            |            |
| ESSEUE5100A   | MOVE      | Prof Services  | NON RECURRING | Prof Serv    | Services                | PS 1T        | Integration of Software                                                    |           |            |            |
| A140-5014-QFP | AMINET    | Device         | X4X           | A140         | A140-5014               | FP           | A140,PSU-UK,RC-WILLOW,HDMI,PALG QFP                                        |           |            |            |


Table: Sales
| Co    |   Account Ref | Cust Name    | Item No       |   Qty |   Orig Unit Price | Curr   |   Total $ | Date                    | SP             | COLUMN FROM RESULTS   |
|:------|--------------:|:-------------|:--------------|------:|------------------:|:-------|----------:|:------------------------|:---------------|:----------------------|
| ACL   |        900422 | Adrenio GmbH | 99-880809-83A |   200 |          119.25   | USD    |     23850 | 2017-05-30 00:00:00.000 | B VANDEROSTYNE | NEW                   |
| ACL   |        900422 | Adrenio GmbH | 99-880900-70  |     4 |          121.7    | USD    |       487 | 2016-12-30 00:00:00.000 | B VANDEROSTYNE | NEW                   |
| ACL   |        900422 | Adrenio GmbH | 99-880900-70  |   496 |          121.7    | USD    |     60363 | 2016-09-01 00:00:00.000 | B VANDEROSTYNE | NEW                   |
| ACL   |        900422 | Adrenio GmbH | 99-880809-83A |    50 |           66.11   | USD    |      3306 | 2018-04-16 00:00:00.000 | B VANDEROSTYNE | EXISTING              |
| ACL   |        900745 | Entel        | A150-6002-QFP | 15200 |           42.4766 | USD    |    645644 | 2017-06-21 00:00:00.000 | S CONEJOS      | NEW                   |
| ACL   |        900745 | Entel        | ESWNAN1101A   |     1 |        18000      | USD    |     18000 | 2016-07-15 00:00:00.000 | S CONEJOS      | NEW                   |
| ACL   |        900745 | Entel        | SUBSCRIPTION  |     1 |        25000      | USD    |     25000 | 2016-06-01 00:00:00.000 | S CONEJOS      | NEW                   |
| AT US |        900974 | Home Telecom | 99-880900-70  |     1 |          190      | USD    |       190 | 2017-11-01 00:00:00.000 | D PAIGE        | EXISTING              |
| AT US |        900974 | Home Telecom | 99-880900-70  |   150 |          190      | USD    |     28500 | 2017-11-01 00:00:00.000 | D PAIGE        | EXISTING              |
| AT US |        900974 | Home Telecom | 99-880900-70  |   200 |            4.5    | USD    |       900 | 2016-08-01 00:00:00.000 | D PAIGE        | NEW                   |

 


tables: name: Customers
data: Customers.csv
name: Dates
data: Dates.csv
name: Items
data: Items.csv
name: Sales
data: Sales.csv
label: Sales
Account Ref
Customers
Account Ref
Sales
Item No
Items
Item Number
Sales
Date
Dates
Date
output: {
    "joins": [
        {
            "from_table": "Sales",
            "from_column": "Account Ref",
            "to_table": "Customers",
            "to_column": "Account Ref"
        },
        {
            "from_table": "Sales",
            "from_column": "Item No",
            "to_table": "Items",
            "to_column": "Item Number"
        },
        {
            "from_table": "Sales",
            "from_column": "Date",
            "to_table": "Dates",
            "to_column": "Date"
        }
    ]
}