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: circuits
|   circuitId | circuitRef     | name                           | location     | country   |       lat |       lng |   alt | url                                                         |
|------------:|:---------------|:-------------------------------|:-------------|:----------|----------:|----------:|------:|:------------------------------------------------------------|
|           1 | albert_park    | Albert Park Grand Prix Circuit | Melbourne    | Australia | -37.8497  | 144.968   |    10 | http://en.wikipedia.org/wiki/Melbourne_Grand_Prix_Circuit   |
|           2 | sepang         | Sepang International Circuit   | Kuala Lumpur | Malaysia  |   2.76083 | 101.738   |    18 | http://en.wikipedia.org/wiki/Sepang_International_Circuit   |
|           3 | bahrain        | Bahrain International Circuit  | Sakhir       | Bahrain   |  26.0325  |  50.5106  |     7 | http://en.wikipedia.org/wiki/Bahrain_International_Circuit  |
|           4 | catalunya      | Circuit de Barcelona-Catalunya | MontmelÃ³    | Spain     |  41.57    |   2.26111 |   109 | http://en.wikipedia.org/wiki/Circuit_de_Barcelona-Catalunya |
|           5 | istanbul       | Istanbul Park                  | Istanbul     | Turkey    |  40.9517  |  29.405   |   130 | http://en.wikipedia.org/wiki/Istanbul_Park                  |
|           6 | monaco         | Circuit de Monaco              | Monte-Carlo  | Monaco    |  43.7347  |   7.42056 |     7 | http://en.wikipedia.org/wiki/Circuit_de_Monaco              |
|           7 | villeneuve     | Circuit Gilles Villeneuve      | Montreal     | Canada    |  45.5     | -73.5228  |    13 | http://en.wikipedia.org/wiki/Circuit_Gilles_Villeneuve      |
|           8 | magny_cours    | Circuit de Nevers Magny-Cours  | Magny Cours  | France    |  46.8642  |   3.16361 |   228 | http://en.wikipedia.org/wiki/Circuit_de_Nevers_Magny-Cours  |
|           9 | silverstone    | Silverstone Circuit            | Silverstone  | UK        |  52.0786  |  -1.01694 |   153 | http://en.wikipedia.org/wiki/Silverstone_Circuit            |
|          10 | hockenheimring | Hockenheimring                 | Hockenheim   | Germany   |  49.3278  |   8.56583 |   103 | http://en.wikipedia.org/wiki/Hockenheimring                 |


Table: constructors
|   constructorId | constructorRef   | name     | nationality   | url                                                          |
|----------------:|:-----------------|:---------|:--------------|:-------------------------------------------------------------|
|               1 | mclaren          | McLaren  | British       | http://en.wikipedia.org/wiki/McLaren                         |
|               3 | williams         | Williams | British       | http://en.wikipedia.org/wiki/Williams_Grand_Prix_Engineering |
|              16 | bar              | BAR      | British       | http://en.wikipedia.org/wiki/British_American_Racing         |
|              19 | jaguar           | Jaguar   | British       | http://en.wikipedia.org/wiki/Jaguar_Racing                   |
|              21 | arrows           | Arrows   | British       | http://en.wikipedia.org/wiki/Arrows_Grand_Prix_International |
|              23 | brawn            | Brawn    | British       | http://en.wikipedia.org/wiki/Brawn_GP                        |
|              24 | stewart          | Stewart  | British       | http://en.wikipedia.org/wiki/Stewart_Grand_Prix              |
|              25 | tyrrell          | Tyrrell  | British       | http://en.wikipedia.org/wiki/Tyrrell_Racing                  |
|              26 | lola             | Lola     | British       | http://en.wikipedia.org/wiki/MasterCard_Lola                 |
|              29 | footwork         | Footwork | British       | http://en.wikipedia.org/wiki/Footwork_Arrows                 |


Table: constructor_results
|   constructorResultsId |   raceId |   constructorId |   points | status   |
|-----------------------:|---------:|----------------:|---------:|:---------|
|                    579 |       71 |              18 |        0 | \N       |
|                    588 |       72 |              18 |        0 | \N       |
|                    598 |       73 |              18 |        0 | \N       |
|                    608 |       74 |              18 |        0 | \N       |
|                    618 |       75 |              18 |        0 | \N       |
|                    626 |       76 |              18 |        0 | \N       |
|                    637 |       77 |              18 |        0 | \N       |
|                    645 |       78 |              18 |        0 | \N       |
|                    667 |       80 |              18 |        0 | \N       |
|                    677 |       81 |              18 |        0 | \N       |


Table: constructor_standings
|   constructorStandingsId |   raceId |   constructorId |   points |   position |   wins |
|-------------------------:|---------:|----------------:|---------:|-----------:|-------:|
|                      629 |       77 |              18 |        0 |         10 |      0 |
|                     1826 |       78 |              18 |        0 |         10 |      0 |
|                     6156 |       91 |              18 |        0 |         10 |      0 |
|                     6166 |       92 |              18 |        0 |         10 |      0 |
|                     6176 |       93 |              18 |        0 |         10 |      0 |
|                     6186 |       94 |              18 |        0 |         10 |      0 |
|                     6196 |       95 |              18 |        0 |         10 |      0 |
|                     6206 |       96 |              18 |        0 |         10 |      0 |
|                     6216 |       97 |              18 |        0 |         10 |      0 |
|                     6004 |      110 |              18 |        0 |         10 |      0 |


Table: drivers
|   driverId | driverRef      | number   | code   | forename   | surname   | dob                     | nationality   | url                                           | Driver Name      |
|-----------:|:---------------|:---------|:-------|:-----------|:----------|:------------------------|:--------------|:----------------------------------------------|:-----------------|
|        121 | andretti       | \N       | \N     | Michael    | Andretti  | 1962-10-05 00:00:00.000 | American      | http://en.wikipedia.org/wiki/Michael_Andretti | Michael Andretti |
|        158 | cheever        | \N       | \N     | Eddie      | Cheever   | 1958-01-10 00:00:00.000 | American      | http://en.wikipedia.org/wiki/Eddie_Cheever    | Eddie Cheever    |
|        193 | sullivan       | \N       | \N     | Danny      | Sullivan  | 1950-03-09 00:00:00.000 | American      | http://en.wikipedia.org/wiki/Danny_Sullivan   | Danny Sullivan   |
|        207 | mario_andretti | \N       | \N     | Mario      | Andretti  | 1940-02-28 00:00:00.000 | American      | http://en.wikipedia.org/wiki/Mario_Andretti   | Mario Andretti   |
|        214 | cogan          | \N       | \N     | Kevin      | Cogan     | 1956-03-31 00:00:00.000 | American      | http://en.wikipedia.org/wiki/Kevin_Cogan      | Kevin Cogan      |
|        239 | lunger         | \N       | \N     | Brett      | Lunger    | 1945-11-14 00:00:00.000 | American      | http://en.wikipedia.org/wiki/Brett_Lunger     | Brett Lunger     |
|        240 | ongais         | \N       | \N     | Danny      | Ongais    | 1942-05-21 00:00:00.000 | American      | http://en.wikipedia.org/wiki/Danny_Ongais     | Danny Ongais     |
|        249 | rahal          | \N       | \N     | Bobby      | Rahal     | 1953-01-10 00:00:00.000 | American      | http://en.wikipedia.org/wiki/Bobby_Rahal      | Bobby Rahal      |
|        288 | donohue        | \N       | \N     | Mark       | Donohue   | 1937-03-18 00:00:00.000 | American      | http://en.wikipedia.org/wiki/Mark_Donohue     | Mark Donohue     |
|        309 | revson         | \N       | \N     | Peter      | Revson    | 1939-02-27 00:00:00.000 | American      | http://en.wikipedia.org/wiki/Peter_Revson     | Peter Revson     |


Table: driver_standings
|   driverStandingsId |   raceId |   driverId |   points |   position |   positionText |   wins |
|--------------------:|---------:|-----------:|---------:|-----------:|---------------:|-------:|
|                  44 |       20 |         11 |        0 |         20 |             20 |      0 |
|                  64 |       21 |         19 |        0 |         20 |             20 |      0 |
|                  85 |       22 |         19 |        0 |         20 |             20 |      0 |
|                 108 |       23 |         11 |        0 |         20 |             20 |      0 |
|                 130 |       24 |         11 |        0 |         20 |             20 |      0 |
|                 152 |       25 |         11 |        0 |         20 |             20 |      0 |
|                 174 |       26 |         11 |        0 |         20 |             20 |      0 |
|                 196 |       27 |         11 |        0 |         20 |             20 |      0 |
|                 218 |       28 |         11 |        0 |         20 |             20 |      0 |
|                 240 |       29 |         11 |        0 |         20 |             20 |      0 |


Table: lap_times
|   raceId |   driverId |   lap |   position | time     |   milliseconds |
|---------:|-----------:|------:|-----------:|:---------|---------------:|
|      905 |          1 |     1 |          2 | 1:42.306 |         102306 |
|      905 |          1 |     2 |          2 | 2:03.482 |         123482 |
|      905 |          1 |     3 |          2 | 1:58.916 |         118916 |
|      905 |          1 |     4 |          2 | 1:22.609 |          82609 |
|      905 |          1 |     5 |          2 | 1:21.053 |          81053 |
|      905 |          1 |     6 |          2 | 1:20.556 |          80556 |
|      905 |          1 |     7 |          2 | 1:20.370 |          80370 |
|      905 |          1 |     8 |          2 | 1:20.430 |          80430 |
|      905 |          1 |     9 |          2 | 1:20.531 |          80531 |
|      905 |          1 |    10 |          2 | 1:20.546 |          80546 |


Table: pit_stops
|   raceId |   driverId |   stop |   lap | time                    |   duration |   milliseconds |
|---------:|-----------:|-------:|------:|:------------------------|-----------:|---------------:|
|      841 |        153 |      1 |     1 | 1899-12-30 17:05:23.000 |     26.898 |          26898 |
|      841 |         30 |      1 |     1 | 1899-12-30 17:05:52.000 |     25.021 |          25021 |
|      844 |        815 |      1 |     1 | 1899-12-30 15:05:18.000 |     29.27  |          29270 |
|      845 |        155 |      1 |     1 | 1899-12-30 14:05:11.000 |     24.871 |          24871 |
|      852 |         10 |      1 |     1 | 1899-12-30 14:05:58.000 |     35.092 |          35092 |
|      852 |        811 |      1 |     1 | 1899-12-30 14:06:10.000 |     30.795 |          30795 |
|      852 |          5 |      1 |     1 | 1899-12-30 14:06:14.000 |     28.539 |          28539 |
|      853 |        155 |      1 |     1 | 1899-12-30 14:05:42.000 |     27.55  |          27550 |
|      853 |         22 |      1 |     1 | 1899-12-30 14:06:43.000 |     29.157 |          29157 |
|      854 |        817 |      1 |     1 | 1899-12-30 20:06:48.000 |     44.17  |          44170 |


Table: qualifying
|   qualifyId |   raceId |   driverId |   constructorId |   number |   position | q1       | q2   | q3   |
|------------:|---------:|-----------:|----------------:|---------:|-----------:|:---------|:-----|:-----|
|          40 |       19 |          6 |               3 |        8 |         18 | 1:36.388 | \N   | \N   |
|         104 |       22 |          6 |               3 |        8 |         16 | 1:27.547 | \N   | \N   |
|         164 |       25 |          6 |               3 |        8 |         16 | 1:16.243 | \N   | \N   |
|         186 |       26 |          3 |               3 |        7 |         18 | 1:21.668 | \N   | \N   |
|         204 |       27 |          6 |               3 |        8 |         16 | 1:16.083 | \N   | \N   |
|         223 |       28 |          3 |               3 |        7 |         15 | 1:20.748 | \N   | \N   |
|         225 |       28 |          6 |               3 |        8 |         17 | 1:21.085 | \N   | \N   |
|         267 |       30 |          6 |               3 |        8 |         19 | 1:48.268 | \N   | \N   |
|         286 |       31 |          6 |               3 |        8 |         18 | 1:36.653 | \N   | \N   |
|         345 |       34 |          6 |               3 |        8 |         17 | 1:36.863 | \N   | \N   |


Table: races
|   raceId |   year |   round |   circuitId | name                     | date                    | time   | url                                                        |
|---------:|-------:|--------:|------------:|:-------------------------|:------------------------|:-------|:-----------------------------------------------------------|
|       90 |   2004 |       1 |           1 | Australian Grand Prix    | 2004-03-07 00:00:00.000 | \N     | http://en.wikipedia.org/wiki/2004_Australian_Grand_Prix    |
|       91 |   2004 |       2 |           2 | Malaysian Grand Prix     | 2004-03-21 00:00:00.000 | \N     | http://en.wikipedia.org/wiki/2004_Malaysian_Grand_Prix     |
|       92 |   2004 |       3 |           3 | Bahrain Grand Prix       | 2004-04-04 00:00:00.000 | \N     | http://en.wikipedia.org/wiki/2004_Bahrain_Grand_Prix       |
|       93 |   2004 |       4 |          21 | San Marino Grand Prix    | 2004-04-25 00:00:00.000 | \N     | http://en.wikipedia.org/wiki/2004_San_Marino_Grand_Prix    |
|       94 |   2004 |       5 |           4 | Spanish Grand Prix       | 2004-05-09 00:00:00.000 | \N     | http://en.wikipedia.org/wiki/2004_Spanish_Grand_Prix       |
|       95 |   2004 |       6 |           6 | Monaco Grand Prix        | 2004-05-23 00:00:00.000 | \N     | http://en.wikipedia.org/wiki/2004_Monaco_Grand_Prix        |
|       96 |   2004 |       7 |          20 | European Grand Prix      | 2004-05-30 00:00:00.000 | \N     | http://en.wikipedia.org/wiki/2004_European_Grand_Prix      |
|       97 |   2004 |       8 |           7 | Canadian Grand Prix      | 2004-06-13 00:00:00.000 | \N     | http://en.wikipedia.org/wiki/2004_Canadian_Grand_Prix      |
|       98 |   2004 |       9 |          19 | United States Grand Prix | 2004-06-20 00:00:00.000 | \N     | http://en.wikipedia.org/wiki/2004_United_States_Grand_Prix |
|       99 |   2004 |      10 |           8 | French Grand Prix        | 2004-07-04 00:00:00.000 | \N     | http://en.wikipedia.org/wiki/2004_French_Grand_Prix        |


Table: results
|   resultId |   raceId |   driverId |   constructorId |   number |   grid | position   | positionText   |   positionOrder |   points |   laps | time   | milliseconds   | fastestLap   | rank   | fastestLapTime   |   fastestLapSpeed |   statusId |   fastestLapTime - Copy.1 |   fastestLapTime - Copy.2.1 |   fastestLapTime - Copy.2.2 |   FastestLap in Milliseconds |
|-----------:|---------:|-----------:|----------------:|---------:|-------:|:-----------|:---------------|----------------:|---------:|-------:|:-------|:---------------|:-------------|:-------|:-----------------|------------------:|-----------:|--------------------------:|----------------------------:|----------------------------:|-----------------------------:|
|       2230 |      125 |         22 |               6 |        2 |      3 | \N         | R              |              14 |        0 |     39 | \N     | \N             | \N           | \N     | \N               |           999.999 |          5 |                         0 |                           0 |                           0 |                            0 |
|       3121 |      166 |         30 |               6 |        3 |      1 | \N         | R              |              16 |        0 |     58 | \N     | \N             | \N           | \N     | \N               |           999.999 |          5 |                         0 |                           0 |                           0 |                            0 |
|       3361 |      177 |         56 |               6 |        4 |      4 | \N         | R              |              14 |        0 |     46 | \N     | \N             | \N           | \N     | \N               |           999.999 |          5 |                         0 |                           0 |                           0 |                            0 |
|       3672 |      191 |         30 |               6 |        3 |      3 | \N         | R              |              17 |        0 |      5 | \N     | \N             | \N           | \N     | \N               |           999.999 |          5 |                         0 |                           0 |                           0 |                            0 |
|       4330 |      221 |         56 |               6 |        6 |     14 | \N         | R              |              16 |        0 |     22 | \N     | \N             | \N           | \N     | \N               |           999.999 |          5 |                         0 |                           0 |                           0 |                            0 |
|       4614 |      234 |         56 |               6 |        2 |      8 | \N         | R              |              14 |        0 |     34 | \N     | \N             | \N           | \N     | \N               |           999.999 |          5 |                         0 |                           0 |                           0 |                            0 |
|       4820 |      243 |         55 |               6 |       27 |      2 | \N         | R              |              22 |        0 |     25 | \N     | \N             | \N           | \N     | \N               |           999.999 |          5 |                         0 |                           0 |                           0 |                            0 |
|       4940 |      248 |         55 |               6 |       27 |     10 | \N         | R              |              18 |        0 |     12 | \N     | \N             | \N           | \N     | \N               |           999.999 |          5 |                         0 |                           0 |                           0 |                            0 |
|       5106 |      255 |         55 |               6 |       27 |      2 | \N         | R              |              16 |        0 |     24 | \N     | \N             | \N           | \N     | \N               |           999.999 |          5 |                         0 |                           0 |                           0 |                            0 |
|       5127 |      256 |         77 |               6 |       28 |      4 | \N         | R              |              13 |        0 |     34 | \N     | \N             | \N           | \N     | \N               |           999.999 |          5 |                         0 |                           0 |                           0 |                            0 |


Table: seasons
|   year | url                                                   |
|-------:|:------------------------------------------------------|
|   2009 | https://en.wikipedia.org/wiki/2009_Formula_One_season |
|   2008 | https://en.wikipedia.org/wiki/2008_Formula_One_season |
|   2007 | https://en.wikipedia.org/wiki/2007_Formula_One_season |
|   2006 | https://en.wikipedia.org/wiki/2006_Formula_One_season |
|   2005 | https://en.wikipedia.org/wiki/2005_Formula_One_season |
|   2004 | https://en.wikipedia.org/wiki/2004_Formula_One_season |
|   2003 | https://en.wikipedia.org/wiki/2003_Formula_One_season |
|   2002 | https://en.wikipedia.org/wiki/2002_Formula_One_season |
|   2001 | https://en.wikipedia.org/wiki/2001_Formula_One_season |
|   2000 | https://en.wikipedia.org/wiki/2000_Formula_One_season |


Table: status
|   statusId | status       |
|-----------:|:-------------|
|          1 | Finished     |
|          2 | Disqualified |
|          3 | Accident     |
|          4 | Collision    |
|          5 | Engine       |
|          6 | Gearbox      |
|          7 | Transmission |
|          8 | Clutch       |
|          9 | Hydraulics   |
|         10 | Electrical   |

 


tables: name: circuits
data: circuits.csv
name: constructors
data: constructors.csv
name: constructor_results
data: constructor_results.csv
name: constructor_standings
data: constructor_standings.csv
name: drivers
data: drivers.csv
name: driver_standings
data: driver_standings.csv
name: lap_times
data: lap_times.csv
name: pit_stops
data: pit_stops.csv
name: qualifying
data: qualifying.csv
name: races
data: races.csv
name: results
data: results.csv
name: seasons
data: seasons.csv
name: status
data: status.csv
label: constructor_results
constructorId
constructors
constructorId
constructor_standings
constructorId
constructors
constructorId
driver_standings
driverId
drivers
driverId
lap_times
driverId
drivers
driverId
pit_stops
driverId
drivers
driverId
qualifying
constructorId
constructors
constructorId
qualifying
driverId
drivers
driverId
races
circuitId
circuits
circuitId
constructor_results
raceId
races
raceId
constructor_standings
raceId
races
raceId
driver_standings
raceId
races
raceId
lap_times
raceId
races
raceId
pit_stops
raceId
races
raceId
qualifying
raceId
races
raceId
results
raceId
races
raceId
results
constructorId
constructors
constructorId
results
driverId
drivers
driverId
results
statusId
status
statusId
races
year
seasons
year
output: {
    "joins": [
        {
            "from_table": "constructor_results",
            "from_column": "constructorId",
            "to_table": "constructors",
            "to_column": "constructorId"
        },
        {
            "from_table": "constructor_standings",
            "from_column": "constructorId",
            "to_table": "constructors",
            "to_column": "constructorId"
        },
        {
            "from_table": "driver_standings",
            "from_column": "driverId",
            "to_table": "drivers",
            "to_column": "driverId"
        },
        {
            "from_table": "lap_times",
            "from_column": "driverId",
            "to_table": "drivers",
            "to_column": "driverId"
        },
        {
            "from_table": "pit_stops",
            "from_column": "driverId",
            "to_table": "drivers",
            "to_column": "driverId"
        },
        {
            "from_table": "qualifying",
            "from_column": "constructorId",
            "to_table": "constructors",
            "to_column": "constructorId"
        },
        {
            "from_table": "qualifying",
            "from_column": "driverId",
            "to_table": "drivers",
            "to_column": "driverId"
        },
        {
            "from_table": "races",
            "from_column": "circuitId",
            "to_table": "circuits",
            "to_column": "circuitId"
        },
        {
            "from_table": "constructor_results",
            "from_column": "raceId",
            "to_table": "races",
            "to_column": "raceId"
        },
        {
            "from_table": "constructor_standings",
            "from_column": "raceId",
            "to_table": "races",
            "to_column": "raceId"
        },
        {
            "from_table": "driver_standings",
            "from_column": "raceId",
            "to_table": "races",
            "to_column": "raceId"
        },
        {
            "from_table": "lap_times",
            "from_column": "raceId",
            "to_table": "races",
            "to_column": "raceId"
        },
        {
            "from_table": "pit_stops",
            "from_column": "raceId",
            "to_table": "races",
            "to_column": "raceId"
        },
        {
            "from_table": "qualifying",
            "from_column": "raceId",
            "to_table": "races",
            "to_column": "raceId"
        },
        {
            "from_table": "results",
            "from_column": "raceId",
            "to_table": "races",
            "to_column": "raceId"
        },
        {
            "from_table": "results",
            "from_column": "constructorId",
            "to_table": "constructors",
            "to_column": "constructorId"
        },
        {
            "from_table": "results",
            "from_column": "driverId",
            "to_table": "drivers",
            "to_column": "driverId"
        },
        {
            "from_table": "results",
            "from_column": "statusId",
            "to_table": "status",
            "to_column": "statusId"
        },
        {
            "from_table": "races",
            "from_column": "year",
            "to_table": "seasons",
            "to_column": "year"
        }
    ]
}