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: Dates
| Date                    |   Year |   QuarterOfYear |   MonthOfYear |   DayOfMonth |   DateInt | MonthName   | MonthInCalendar   | QuarterInCalendar   |   DayInWeek | DayOfWeekName   | WeekEnding              |   Week Number |   MonthnYear |   QuarternYear |   ShortYear | FY   |
|:------------------------|-------:|----------------:|--------------:|-------------:|----------:|:------------|:------------------|:--------------------|------------:|:----------------|:------------------------|--------------:|-------------:|---------------:|------------:|:-----|
| 2017-07-01 00:00:00.000 |   2017 |               3 |             7 |            1 |  20170701 | July        | Jul 2017          | Q3 2017             |           6 | Saturday        | 2017-07-01 00:00:00.000 |            26 |     20170700 |       20170300 |          17 | FY18 |
| 2017-07-02 00:00:00.000 |   2017 |               3 |             7 |            2 |  20170702 | July        | Jul 2017          | Q3 2017             |           0 | Sunday          | 2017-07-08 00:00:00.000 |            27 |     20170700 |       20170300 |          17 | FY18 |
| 2017-07-03 00:00:00.000 |   2017 |               3 |             7 |            3 |  20170703 | July        | Jul 2017          | Q3 2017             |           1 | Monday          | 2017-07-08 00:00:00.000 |            27 |     20170700 |       20170300 |          17 | FY18 |
| 2017-07-04 00:00:00.000 |   2017 |               3 |             7 |            4 |  20170704 | July        | Jul 2017          | Q3 2017             |           2 | Tuesday         | 2017-07-08 00:00:00.000 |            27 |     20170700 |       20170300 |          17 | FY18 |
| 2017-07-05 00:00:00.000 |   2017 |               3 |             7 |            5 |  20170705 | July        | Jul 2017          | Q3 2017             |           3 | Wednesday       | 2017-07-08 00:00:00.000 |            27 |     20170700 |       20170300 |          17 | FY18 |
| 2017-07-06 00:00:00.000 |   2017 |               3 |             7 |            6 |  20170706 | July        | Jul 2017          | Q3 2017             |           4 | Thursday        | 2017-07-08 00:00:00.000 |            27 |     20170700 |       20170300 |          17 | FY18 |
| 2017-07-07 00:00:00.000 |   2017 |               3 |             7 |            7 |  20170707 | July        | Jul 2017          | Q3 2017             |           5 | Friday          | 2017-07-08 00:00:00.000 |            27 |     20170700 |       20170300 |          17 | FY18 |
| 2017-07-08 00:00:00.000 |   2017 |               3 |             7 |            8 |  20170708 | July        | Jul 2017          | Q3 2017             |           6 | Saturday        | 2017-07-08 00:00:00.000 |            27 |     20170700 |       20170300 |          17 | FY18 |
| 2017-07-09 00:00:00.000 |   2017 |               3 |             7 |            9 |  20170709 | July        | Jul 2017          | Q3 2017             |           0 | Sunday          | 2017-07-15 00:00:00.000 |            28 |     20170700 |       20170300 |          17 | FY18 |
| 2017-07-10 00:00:00.000 |   2017 |               3 |             7 |           10 |  20170710 | July        | Jul 2017          | Q3 2017             |           1 | Monday          | 2017-07-15 00:00:00.000 |            28 |     20170700 |       20170300 |          17 | FY18 |


Table: Equipment Serial Number
| Serial No.       |
|:-----------------|
| FDB0K-1930-00318 |
| FDB0M-1930-00263 |
| FDB0K-1930-00139 |
| AT14E50226       |
| P050938          |
| FDB11-1930-00095 |
| Q260918D         |
| N200278          |
| D040887          |
| G320088          |


Table: Hour Meters
| Equipsoft No.   | Posting Date            | Service Date            |   Current Meter Reading |   Previous Meter Reading | Service Order No.   |
|:----------------|:------------------------|:------------------------|------------------------:|-------------------------:|:--------------------|
| 124667          | 2020-02-03 00:00:00.000 | 2020-02-03 00:00:00.000 |                       1 |                        0 | SVO10283            |
| EQ134918        | 2020-03-13 00:00:00.000 | 2020-03-13 00:00:00.000 |                       1 |                        0 | SVO10305            |
| 39699           | 2020-01-20 00:00:00.000 | 2020-01-20 00:00:00.000 |                       1 |                        0 | SVO10387            |
| EQ117691        | 2020-01-15 00:00:00.000 | 2020-01-15 00:00:00.000 |                       1 |                        0 | SVO10902            |
| EQ37541         | 2020-01-28 00:00:00.000 | 2020-01-28 00:00:00.000 |                       1 |                        0 | SVO11792            |
| EQ134552        | 2020-01-29 00:00:00.000 | 2020-01-29 00:00:00.000 |                       1 |                        0 | SVO11808            |
| 39668           | 2020-01-22 00:00:00.000 | 2020-01-22 00:00:00.000 |                       1 |                        0 | SVO12041            |
| 39725           | 2020-01-14 00:00:00.000 | 2020-01-14 00:00:00.000 |                       1 |                        0 | SVO12062            |
| 39665           | 2020-01-16 00:00:00.000 | 2020-01-16 00:00:00.000 |                       1 |                        0 | SVO12078            |
| 39670           | 2020-02-18 00:00:00.000 | 2020-02-18 00:00:00.000 |                       1 |                        0 | SVO12094            |


Table: Labor
| Service Order No.   | Invoice No.   |   Customer No. |   Amount |
|:--------------------|:--------------|---------------:|---------:|
| SVO38420            | SVI37985      |         317666 |  -255    |
| SVO37578            | SVI37737      |         317666 |  -255    |
| SVO31127            | SVI37607      |         317666 |  -100    |
| SVO27193            | SVI34396      |         317666 |  -255    |
| SVO34269            | SVI33836      |         317666 |  -382.5  |
| SVO31808            | SVI33217      |         317666 |  -446.25 |
| SVO31808            | SVI33217      |         317666 |  -191.25 |
| SVO33113            | SVI33213      |         317666 |  -127.5  |
| SVO33113            | SVI33213      |         317666 |  -191.25 |
| SVO33392            | SVI33208      |         317666 |  -446.25 |


Table: Misc Charges
| Service Order No.   | Invoice No.   |   Customer No. |   Amount | Type         |
|:--------------------|:--------------|---------------:|---------:|:-------------|
| SVO37578            | SVI37737      |         317666 |   -14.68 | Service Cost |
| SVO27193            | SVI34396      |         317666 |   -34.69 | Service Cost |
| SVO31808            | SVI33217      |         317666 |    -9    | Service Cost |
| SVO33113            | SVI33213      |         317666 |   -12.36 | Service Cost |
| SVO32164            | SVI33202      |         317666 |   -25.93 | Service Cost |
| SVO31632            | SVI31953      |         317666 |   -26.41 | Service Cost |
| SVO28942            | SVI31951      |         317666 |   -18.37 | Service Cost |
| SVO28942            | SVI31951      |         317666 |   -12.88 | Service Cost |
| SVO32162            | SVI31908      |         317666 |   -15.39 | Service Cost |
| SVO29272            | SVI29739      |         317666 |    -7    | Service Cost |


Table: Parts
| Service Order No.   | Invoice No.   |   Customer No. |   Amount |
|:--------------------|:--------------|---------------:|---------:|
| SVO37578            | SVI37737      |         317666 |   -29.2  |
| SVO37578            | SVI37737      |         317666 |    -4.62 |
| SVO31127            | SVI37607      |         317666 |    -6.33 |
| SVO31127            | SVI37607      |         317666 |   -13.07 |
| SVO31127            | SVI37607      |         317666 |    -6.64 |
| SVO31127            | SVI37607      |         317666 |   -54.72 |
| SVO31127            | SVI37607      |         317666 |   -64.6  |
| SVO31127            | SVI37607      |         317666 |   -67.62 |
| SVO27193            | SVI34396      |         317666 |   -48.46 |
| SVO27193            | SVI34396      |         317666 |  -151.35 |


Table: Posted Invoices
| Invoice No.   |   Customer No. | Customer Name             | Service Order No.   | Order Date              | Posting Date            |   Total |   Amount w Tax | Branch   | Department   | Business Posting Group   | Service Order Type   | Equipsoft No.   | Serial No.       |   Rank | Modifier Code   | Component Code   |   Job Code | Work Description                                      |
|:--------------|---------------:|:--------------------------|:--------------------|:------------------------|:------------------------|--------:|---------------:|:---------|:-------------|:-------------------------|:---------------------|:----------------|:-----------------|-------:|:----------------|:-----------------|-----------:|:------------------------------------------------------|
| SVI13528      |         317666 | T.W. PERRY (BALTIMORE MD) | SVO10060            | 2020-01-05 00:00:00.000 | 2020-02-03 00:00:00.000 |  345.93 |         362.19 | JP       | SER          | SVPM                     | PM                   | EQ46191         | FDB0K-1930-00318 |      1 |                 | 85               |         85 | PLANNEDMAINTENANCE                                    |
| SVI11119      |         317666 | T.W. PERRY (BALTIMORE MD) | SVO10066            | 2020-01-05 00:00:00.000 | 2020-01-24 00:00:00.000 |  350.8  |         367.35 | JP       | SER          | SVPM                     | PM                   | EQ46241         | FDB0M-1930-00263 |      1 | PM              | 85               |         85 | PLANNEDPLANNED MAINTENANCEMAINTENANCE                 |
| SVI11441      |         317666 | T.W. PERRY (BALTIMORE MD) | SVO10068            | 2020-01-05 00:00:00.000 | 2020-01-26 00:00:00.000 |  419.1  |         439.75 | JP       | SER          | SVPM                     | PM                   | EQ46091         | FDB0K-1930-00139 |      1 |                 | 85               |         85 | PLANNEDMAINTENANCE                                    |
| SVI10710      |         317666 | T.W. PERRY (BALTIMORE MD) | SVO10981            | 2020-01-07 00:00:00.000 | 2020-01-20 00:00:00.000 |  553.81 |         571.15 | JP       | SER          | SVFLD                    | FLD                  | EQ41161         | AT14E50226       |      1 | REP             | FUELS            |         99 | REMOVE AND REPLACEREPAIRS TO BE DONEFUEL SENDING UNIT |
| SVI12804      |         317666 | T.W. PERRY (BALTIMORE MD) | SVO11029            | 2020-01-08 00:00:00.000 | 2020-01-30 00:00:00.000 |  330.54 |         330.77 | JP       | SER          | SVFLD                    | FLD                  | EQ51831         | P050938          |      1 |                 | 25               |         99 | REMOVE AND REPLACEOF UNIT (S)                         |
| SVI15207      |         317666 | T.W. PERRY (BALTIMORE MD) | SVO11247            | 2020-01-08 00:00:00.000 | 2020-02-13 00:00:00.000 |  380.5  |         397.85 | JP       | SER          | SVPM                     | PM                   | EQ46341         | FDB11-1930-00095 |      1 |                 | 85               |         85 | PLANNEDMAINTENANCE                                    |
| SVI12822      |         317666 | T.W. PERRY (BALTIMORE MD) | SVO12061            | 2020-01-08 00:00:00.000 | 2020-01-30 00:00:00.000 |  345.63 |         360.37 | JP       | SER          | SVPM                     | PM                   | EQ51831         | P050938          |      1 |                 | 85               |         85 | PLANNEDMAINTENANCE                                    |
| SVI12903      |         317666 | T.W. PERRY (BALTIMORE MD) | SVO12074            | 2020-01-08 00:00:00.000 | 2020-01-30 00:00:00.000 |  564.38 |         579.12 | JP       | SER          | SVPM                     | PM                   | EQ117881        | Q260918D         |      1 | PM              | 85               |         85 | PLANNEDPLANNED MAINTENANCEMAINTENANCE                 |
| SVI14891      |         317666 | T.W. PERRY (BALTIMORE MD) | SVO12493            | 2020-01-09 00:00:00.000 | 2020-02-12 00:00:00.000 |  418.37 |         436.65 | JP       | SER          | SVPM                     | PM                   | EQ51431         | N200278          |      1 |                 | 85               |         85 | PLANNEDMAINTENANCE                                    |
| SVI15104      |         317666 | T.W. PERRY (BALTIMORE MD) | SVO12622            | 2020-01-10 00:00:00.000 | 2020-02-13 00:00:00.000 |  714.56 |         723.01 | JP       | SER          | SVFLD                    | FLD                  | EQ44111         | D040887          |      1 | REP             | 10306            |         99 | REMOVE AND REPLACEREPAIRS TO BE DONEHYD. LINE MISC    |


Table: Service Ledger Entries
| Modifier_Code   | Component_Code   |   Job_Code | Work_Description                 | Service_Order_No   |
|:----------------|:-----------------|-----------:|:---------------------------------|:-------------------|
|                 | 10306            |        104 | REPAIRHYD. LINE MISC             | SVO38420           |
|                 | 1317             |         99 | REMOVE AND REPLACESEAT SWITCH    | SVO37578           |
|                 | 85               |         85 | PLANNEDMAINTENANCE               | SVO31127           |
|                 | 1355             |         99 | REMOVE AND REPLACEBRACKET(S)     | SVO27193           |
|                 | 10306            |         99 | REMOVE AND REPLACEHYD. LINE MISC | SVO34269           |
|                 | 13207            |        110 | RESEALCYLINDER STEERING          | SVO31808           |
|                 | CHAIN            |          5 | ADJUSTCHAINS                     | SVO33113           |
|                 | 10306            |         99 | REMOVE AND REPLACEHYD. LINE MISC | SVO33392           |
|                 | 10306            |         99 | REMOVE AND REPLACEHYD. LINE MISC | SVO33529           |
|                 | 85               |         85 | PLANNEDMAINTENANCE               | SVO32164           |

 


tables: name: Dates
data: Dates.csv
name: Equipment Serial Number
data: Equipment Serial Number.csv
name: Hour Meters
data: Hour Meters.csv
name: Labor
data: Labor.csv
name: Misc Charges
data: Misc Charges.csv
name: Parts
data: Parts.csv
name: Posted Invoices
data: Posted Invoices.csv
name: Service Ledger Entries
data: Service Ledger Entries.csv
label: Posted Invoices
Serial No.
Equipment Serial Number
Serial No.
Posted Invoices
Order Date
Dates
Date
Posted Invoices
Service Order No.
Service Ledger Entries
Service_Order_No
Parts
Invoice No.
Posted Invoices
Invoice No.
Labor
Invoice No.
Posted Invoices
Invoice No.
Misc Charges
Invoice No.
Posted Invoices
Invoice No.
Posted Invoices
Service Order No.
Hour Meters
Service Order No.
output: {
    "joins": [
        {
            "from_table": "Posted Invoices",
            "from_column": "Serial No.",
            "to_table": "Equipment Serial Number",
            "to_column": "Serial No."
        },
        {
            "from_table": "Posted Invoices",
            "from_column": "Order Date",
            "to_table": "Dates",
            "to_column": "Date"
        },
        {
            "from_table": "Posted Invoices",
            "from_column": "Service Order No.",
            "to_table": "Service Ledger Entries",
            "to_column": "Service_Order_No"
        },
        {
            "from_table": "Parts",
            "from_column": "Invoice No.",
            "to_table": "Posted Invoices",
            "to_column": "Invoice No."
        },
        {
            "from_table": "Labor",
            "from_column": "Invoice No.",
            "to_table": "Posted Invoices",
            "to_column": "Invoice No."
        },
        {
            "from_table": "Misc Charges",
            "from_column": "Invoice No.",
            "to_table": "Posted Invoices",
            "to_column": "Invoice No."
        },
        {
            "from_table": "Posted Invoices",
            "from_column": "Service Order No.",
            "to_table": "Hour Meters",
            "to_column": "Service Order No."
        }
    ]
}