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: Clients
|   ClientID | ClientName                  | Address1             | Address2   | Town       | County   | PostCode   | Region                   | OuterPostode   |   CountryID | ClientType   | ClientSize   | ClientSince            |   IsCreditWorthy |   IsDealer |
|-----------:|:----------------------------|:---------------------|:-----------|:-----------|:---------|:-----------|:-------------------------|:---------------|------------:|:-------------|:-------------|:-----------------------|-----------------:|-----------:|
|          1 | Aldo Motors                 | 4, Scale Street      |            | Uttoxeter  | Staffs   | ST17 99RZ  | East Midlands            | ST             |           1 | Wholesaler   | Large        | 1/4/1998 12:00:00 AM   |                1 |          1 |
|          2 | Honest John                 | 99a Baker Street     | NULL       | London     |          | NSW1 1A    | Greater London Authority | EC             |           1 | Dealer       | Large        | 1/1/2000 12:00:00 AM   |                0 |          0 |
|          3 | Bright Orange               | 17, Arcadia Way      | NULL       | Birmingham | NULL     | B1 50AZ    | West Midlands            | B              |           1 | Dealer       | Large        | 4/1/2005 12:00:00 AM   |                0 |          0 |
|          4 | Cut'n'Shut                  | Grange Avenue        | NULL       | Manchester | NULL     | M1 5AZ     | North West               | M              |           1 | Dealer       | Small        | 1/1/2010 12:00:00 AM   |                1 |          0 |
|          5 | Wheels'R'Us                 | Buckingham Drive     | NULL       | London     | NULL     | SE1 4YY    | Greater London Authority | NE             |           1 | Dealer       | Large        | 5/31/2007 12:00:00 AM  |                1 |          1 |
|          6 | Les Arnaqueurs              | 33, Rue Des Bleus    | NULL       | Paris      | NULL     | 75010      | NULL                     | NULL           |           2 | Dealer       | Large        | 2/15/2003 12:00:00 AM  |                1 |          0 |
|          7 | Crippen & Co                | 1012 Princess Street | NULL       | Glasgow    | NULL     | G1 8GH     | NULL                     | NULL           |           1 | Dealer       | Large        | 10/15/2009 12:00:00 AM |                1 |          0 |
|          8 | Rocky Riding                | 5205 108th Ave       | NULL       | New York   | New York | NULL       | NULL                     | NY             |           3 | Dealer       | Large        | 10/15/2009 12:00:00 AM |                1 |          0 |
|          9 | Voitures Diplomatiques S.A. | NULL                 | NULL       | Geneva     | NULL     | NULL       | NULL                     | NULL           |           6 | Wholesaler   | Large        | 10/15/2009 12:00:00 AM |                1 |          0 |
|         10 | Karz                        | NULL                 | NULL       | Stuttgart  | NULL     | NULL       | NULL                     | NULL           |           4 | Dealer       | Small        | 5/31/2006 12:00:00 AM  |                1 |          1 |


Table: Colors
|   ColorID | Color                |
|----------:|:---------------------|
|         1 | Red                  |
|         2 | Blue                 |
|         3 | Green                |
|         4 | Silver               |
|         5 | Canary Yellow        |
|         6 | Night Blue           |
|         7 | Black                |
|         8 | British Racing Green |
|         9 | Dark Purple          |
|        10 | Pink                 |


Table: Countries
|   CountryID | CountryName    | CountryISOCode   |
|------------:|:---------------|:-----------------|
|           1 | United Kingdom | GBR              |
|           2 | France         | FRA              |
|           3 | USA            | USA              |
|           4 | Germany        | DEU              |
|           5 | Spain          | ESP              |
|           6 | Switzerland    | CHE              |


Table: financials
| Segment    | Country   | Product   | Discount Band   |   Units Sold |   Manufacturing Price |   Sale Price |   Gross Sales |   Discounts |    Sales |   COGS |   Profit | Date                    |   Month Number | Month Name   |   Year |   GrossProfit |   GrossP% |
|:-----------|:----------|:----------|:----------------|-------------:|----------------------:|-------------:|--------------:|------------:|---------:|-------:|---------:|:------------------------|---------------:|:-------------|-------:|--------------:|----------:|
| Government | Germany   | Carretera | None            |         1513 |                     3 |          350 |        529550 |         0   |   529550 | 393380 |   136170 | 2014-12-01 00:00:00.000 |             12 | December     |   2014 |        136170 |  0.257143 |
| Government | Germany   | Paseo     | None            |         1006 |                    10 |          350 |        352100 |         0   |   352100 | 261560 |    90540 | 2014-06-01 00:00:00.000 |              6 | June         |   2014 |         90540 |  0.257143 |
| Government | Canada    | Paseo     | None            |         1725 |                    10 |          350 |        603750 |         0   |   603750 | 448500 |   155250 | 2013-11-01 00:00:00.000 |             11 | November     |   2013 |        155250 |  0.257143 |
| Government | Germany   | Paseo     | None            |         1513 |                    10 |          350 |        529550 |         0   |   529550 | 393380 |   136170 | 2014-12-01 00:00:00.000 |             12 | December     |   2014 |        136170 |  0.257143 |
| Government | Germany   | Velo      | None            |         1006 |                   120 |          350 |        352100 |         0   |   352100 | 261560 |    90540 | 2014-06-01 00:00:00.000 |              6 | June         |   2014 |         90540 |  0.257143 |
| Government | France    | VTT       | None            |         1527 |                   250 |          350 |        534450 |         0   |   534450 | 397020 |   137430 | 2013-09-01 00:00:00.000 |              9 | September    |   2013 |        137430 |  0.257143 |
| Government | France    | Amarilla  | None            |         2750 |                   260 |          350 |        962500 |         0   |   962500 | 715000 |   247500 | 2014-02-01 00:00:00.000 |              2 | February     |   2014 |        247500 |  0.257143 |
| Government | Mexico    | Carretera | Low             |         1210 |                     3 |          350 |        423500 |      4235   |   419265 | 314600 |   104665 | 2014-03-01 00:00:00.000 |              3 | March        |   2014 |        104665 |  0.249639 |
| Government | Mexico    | Carretera | Low             |         1397 |                     3 |          350 |        488950 |      4889.5 |   484060 | 363220 |   120840 | 2014-10-01 00:00:00.000 |             10 | October      |   2014 |        120840 |  0.249639 |
| Government | France    | Carretera | Low             |         2155 |                     3 |          350 |        754250 |      7542.5 |   746708 | 560300 |   186408 | 2014-12-01 00:00:00.000 |             12 | December     |   2014 |        186408 |  0.249639 |


Table: InvoiceLines
|   InvoiceLineID |   InvoiceID |   StockID |   SalePrice |   LineItem |
|----------------:|------------:|----------:|------------:|-----------:|
|               3 |           1 |         1 |       95000 |          1 |
|               4 |           2 |         2 |      120000 |          1 |
|               5 |           3 |         3 |       88000 |          1 |
|               6 |           4 |         4 |       89000 |          1 |
|               7 |           5 |         5 |       92000 |          1 |
|               8 |           6 |         6 |      102500 |          1 |
|               9 |           7 |         7 |      110000 |          1 |
|              10 |           8 |         8 |      125000 |          1 |
|              11 |           9 |         9 |      130000 |          1 |
|              12 |          10 |        10 |       75000 |          1 |


Table: Invoices
|   InvoiceID | InvoiceNumber                        |   ClientID | InvoiceDate             |   TotalDiscount |   DeliveryCharge |   InvoiceDateKey |   Year |
|------------:|:-------------------------------------|-----------:|:------------------------|----------------:|-----------------:|-----------------:|-------:|
|           1 | 8B3D7F83-F42C-4523-A737-CDCBF7705B77 |          1 | 2012-10-04 00:00:00.000 |             500 |              750 |         20121004 |   2012 |
|           2 | 139BEEEF-FF32-4BE9-9EF1-819AC888B85C |          2 | 2012-01-01 00:00:00.000 |               0 |             1500 |         20120101 |   2012 |
|           3 | D35D72CD-5FF3-4701-A6D1-265A4F4E7CD5 |          3 | 2012-02-02 00:00:00.000 |             750 |             1000 |         20120202 |   2012 |
|           4 | 2ABAA300-E2A5-4E37-BFCA-7B80ED88A2BD |          2 | 2012-03-03 00:00:00.000 |               0 |             1000 |         20120303 |   2012 |
|           5 | A1C2D846-EC39-46FA-A399-0C194AAD4DC8 |          5 | 2012-04-04 00:00:00.000 |               0 |             1500 |         20120404 |   2012 |
|           6 | 1B8F325A-CC41-4BA6-A486-9D44962E40A3 |          4 | 2012-05-04 00:00:00.000 |               0 |             1000 |         20120504 |   2012 |
|           7 | F1B566F0-D137-4810-B449-575438F3F392 |          3 | 2012-06-04 00:00:00.000 |             750 |              500 |         20120604 |   2012 |
|           8 | ADFFAC9E-DFF3-4BAB-9EC4-DEE9A2B69350 |          6 | 2012-07-04 00:00:00.000 |            2500 |             1000 |         20120704 |   2012 |
|           9 | 15A3BC61-82BD-4CCD-8F0B-49EEE59AF4B7 |          1 | 2012-08-04 00:00:00.000 |               0 |             1000 |         20120804 |   2012 |
|          10 | CFC6726D-1522-4981-BC6B-766AE2C6EED0 |          1 | 2012-09-04 00:00:00.000 |               0 |             1000 |         20120904 |   2012 |


Table: KPIs
|   FiscalYear |   Sales |   Profit |   OPEX |   TransCost |   NewCustomer |   EmpTO |   StockTO |   DIFOT |   DayShip |   GP |
|-------------:|--------:|---------:|-------:|------------:|--------------:|--------:|----------:|--------:|----------:|-----:|
|         2010 | 1e+07   |       10 |     10 |         2   |            10 |       2 |         6 |      80 |        10 |   20 |
|         2011 | 2e+07   |       15 |     12 |         1.8 |            20 |       2 |         6 |      80 |        10 |   27 |
|         2012 | 3.5e+08 |       15 |     12 |         1.5 |            30 |       2 |        10 |      85 |        10 |   27 |
|         2013 | 5e+07   |       15 |     12 |         1.5 |            40 |       2 |        10 |      85 |         7 |   27 |
|         2014 | 7e+07   |       15 |     12 |         1.5 |            50 |       2 |        12 |      90 |         7 |   27 |
|         2015 | 1e+08   |       15 |     12 |         1.5 |            50 |       2 |        12 |      90 |         7 |   27 |
|         2016 | 7e+07   |       15 |     12 |         1.5 |            50 |       2 |        12 |      90 |         7 |   27 |
|         2017 | 1e+08   |       15 |     12 |         1.5 |            50 |       2 |        12 |      90 |         7 |   27 |


Table: Stock
|   StockID | Make         | Model         |   ColorID | VehicleType   |   CostPrice |   SpareParts |   LaborCost | Registration_Date       |   Mileage |   VehicleAgeInYears |
|----------:|:-------------|:--------------|----------:|:--------------|------------:|-------------:|------------:|:------------------------|----------:|--------------------:|
|        21 | Rolls Royce  | Silver Seraph |         1 | Saloon        |       62000 |          400 |         951 | 1999-01-01 00:00:00.000 |     52500 |             21.5524 |
|        23 | Rolls Royce  | Silver Shadow |         8 | Saloon        |       62000 |          400 |         750 | 1985-01-08 00:00:00.000 |     52500 |             35.5415 |
|        31 | Aston Martin | DB4           |         6 | Coupe         |       75890 |          400 |         147 | 2006-09-08 00:00:00.000 |     52500 |             13.862  |
|        89 | TVR          | Tuscan        |         2 | Coupe         |       37500 |          400 |         325 | 2006-09-20 00:00:00.000 |     52500 |             13.8291 |
|        90 | Jaguar       | XK            |         3 | Saloon        |       37500 |          400 |         325 | 2007-05-09 00:00:00.000 |     52500 |             13.1963 |
|        91 | TVR          | Cerbera       |         4 | Coupe         |       37500 |          400 |         325 | 2006-09-20 00:00:00.000 |     52500 |             13.8291 |
|        92 | Jaguar       | XK            |         5 | Convertible   |       37500 |          400 |         325 | 2007-05-09 00:00:00.000 |     52500 |             13.1963 |
|        93 | TVR          | Tuscan        |         6 | Coupe         |       37500 |          400 |         325 | 2006-09-20 00:00:00.000 |     52500 |             13.8291 |
|        94 | Jaguar       | XK            |         5 | Saloon        |       37500 |          400 |         325 | 2006-09-20 00:00:00.000 |     52500 |             13.8291 |
|        95 | TVR          | Cerbera       |         4 | Coupe         |       37500 |          400 |         325 | 2006-09-20 00:00:00.000 |     52500 |             13.8291 |

 


tables: name: Clients
data: Clients.csv
name: Colors
data: Colors.csv
name: Countries
data: Countries.csv
name: financials
data: financials.csv
name: InvoiceLines
data: InvoiceLines.csv
name: Invoices
data: Invoices.csv
name: KPIs
data: KPIs.csv
name: Stock
data: Stock.csv
label: InvoiceLines
StockID
Stock
StockID
Clients
CountryID
Countries
CountryID
Stock
ColorID
Colors
ColorID
InvoiceLines
InvoiceID
Invoices
InvoiceID
Invoices
ClientID
Clients
ClientID
financials
Year
KPIs
FiscalYear
output: {
    "joins": [
        {
            "from_table": "InvoiceLines",
            "from_column": "StockID",
            "to_table": "Stock",
            "to_column": "StockID"
        },
        {
            "from_table": "Clients",
            "from_column": "CountryID",
            "to_table": "Countries",
            "to_column": "CountryID"
        },
        {
            "from_table": "Stock",
            "from_column": "ColorID",
            "to_table": "Colors",
            "to_column": "ColorID"
        },
        {
            "from_table": "InvoiceLines",
            "from_column": "InvoiceID",
            "to_table": "Invoices",
            "to_column": "InvoiceID"
        },
        {
            "from_table": "Invoices",
            "from_column": "ClientID",
            "to_table": "Clients",
            "to_column": "ClientID"
        },
        {
            "from_table": "financials",
            "from_column": "Year",
            "to_table": "KPIs",
            "to_column": "FiscalYear"
        }
    ]
}