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: 123
|   total_points |   Finish |   year | Country   |
|---------------:|---------:|-------:|:----------|
|             29 |        3 |   1995 | ENG       |
|             34 |        3 |   1996 | ENG       |
|             33 |        3 |   1997 | ENG       |
|             30 |        3 |   1998 | ENG       |
|             24 |        3 |   1999 | ENG       |
|             26 |        3 |   2000 | ENG       |
|             28 |        3 |   2001 | ENG       |
|             19 |        3 |   2002 | ENG       |
|             33 |        3 |   2003 | ENG       |
|             32 |        3 |   2004 | ENG       |


Table: AVG Distance 1_2
| Country   |   AVG Distance (1995-2009) |   AVG Distance (2010 -) |
|:----------|---------------------------:|------------------------:|
| ENG       |                    6.46667 |                     9.2 |
| ESP       |                    5.86667 |                     6.4 |
| FRA       |                    6.06667 |                    12   |
| IT        |                    5.66667 |                     8.2 |
| GER       |                    5.8     |                    12.1 |


Table: Distance
| team                 |   total_points |   Finish |   year | Country   |
|:---------------------|---------------:|---------:|-------:|:----------|
| Manchester United FC |             82 |        1 |   1995 | ENG       |
| Newcastle United FC  |             78 |        2 |   1995 | ENG       |
| Manchester United FC |             75 |        1 |   1996 | ENG       |
| Arsenal FC           |             68 |        2 |   1996 | ENG       |
| Arsenal FC           |             78 |        1 |   1997 | ENG       |
| Manchester United FC |             77 |        2 |   1997 | ENG       |
| Manchester United FC |             79 |        1 |   1998 | ENG       |
| Arsenal FC           |             78 |        2 |   1998 | ENG       |
| Manchester United FC |             91 |        1 |   1999 | ENG       |
| Arsenal FC           |             73 |        2 |   1999 | ENG       |


Table: FirstLast
| total_points   | Finish   | year   | Country   |
|:---------------|:---------|:-------|:----------|
|                |          |        |           |
|                |          |        |           |
|                |          |        |           |
|                |          |        |           |
|                |          |        |           |
|                |          |        |           |
|                |          |        |           |
|                |          |        |           |
|                |          |        |           |
|                |          |        |           |


Table: Highest Point Total
|   Points | Team                 |   Year | Country   |
|---------:|:---------------------|-------:|:----------|
|       87 | Atlético Madrid      |   1995 | ESP       |
|       92 | Real Madrid          |   1996 | ESP       |
|       87 | Bayern Munich        |   1997 | GER       |
|       87 | Bayern Munich        |   1998 | GER       |
|       91 | Manchester United FC |   1999 | ENG       |
|       80 | Real Madrid          |   2000 | ESP       |
|       87 | Arsenal FC           |   2001 | ENG       |
|       83 | Manchester United FC |   2002 | ENG       |
|       90 | Arsenal FC           |   2003 | ENG       |
|       95 | Chelsea FC           |   2004 | ENG       |


Table: Sheet1
|   Round | Raw Date                | Date                    | Team 1      | FT   | HT   | Team 2           |   Year | Country   |   FT Team 1 |   FT Team 2 |   HT Team 1 |   HT Team 2 |   HTGD |   FTGD |   Team 1 (pts) |   Team 2 (pts) |
|--------:|:------------------------|:------------------------|:------------|:-----|:-----|:-----------------|-------:|:----------|------------:|------------:|------------:|------------:|-------:|-------:|---------------:|---------------:|
|       1 | (Wed) 19 Jul 1995 (W29) | 1995-07-19 00:00:00.000 | FC Gueugnon | 0-0  | 0-0  | FC Metz          |   1995 | FR        |           0 |           0 |           0 |           0 |      0 |      0 |              1 |              1 |
|       3 | (Sat) 5 Aug 1995 (W31)  | 1995-08-05 00:00:00.000 | FC Gueugnon | 0-0  | 0-0  | FC Martigues     |   1995 | FR        |           0 |           0 |           0 |           0 |      0 |      0 |              1 |              1 |
|       3 | (Sat) 5 Aug 1995 (W31)  | 1995-08-05 00:00:00.000 | EA Guingamp | 0-0  | 0-0  | OGC Nice         |   1995 | FR        |           0 |           0 |           0 |           0 |      0 |      0 |              1 |              1 |
|       3 | (Sat) 5 Aug 1995 (W31)  | 1995-08-05 00:00:00.000 | RC Lens     | 0-0  | 0-0  | RC Strasbourg    |   1995 | FR        |           0 |           0 |           0 |           0 |      0 |      0 |              1 |              1 |
|       5 | (Sat) 19 Aug 1995 (W33) | 1995-08-19 00:00:00.000 | Le Havre AC | 0-0  | 0-0  | FC Metz          |   1995 | FR        |           0 |           0 |           0 |           0 |      0 |      0 |              1 |              1 |
|       5 | (Fri) 25 Aug 1995 (W34) | 1995-08-25 00:00:00.000 | Lille OSC   | 0-0  | 0-0  | FC Nantes        |   1995 | FR        |           0 |           0 |           0 |           0 |      0 |      0 |              1 |              1 |
|       8 | (Sat) 9 Sep 1995 (W36)  | 1995-09-09 00:00:00.000 | EA Guingamp | 0-0  | 0-0  | Montpellier HSC  |   1995 | FR        |           0 |           0 |           0 |           0 |      0 |      0 |              1 |              1 |
|       8 | (Sun) 10 Sep 1995 (W36) | 1995-09-10 00:00:00.000 | FC Metz     | 0-0  | 0-0  | Stade Rennais FC |   1995 | FR        |           0 |           0 |           0 |           0 |      0 |      0 |              1 |              1 |
|       9 | (Sat) 16 Sep 1995 (W37) | 1995-09-16 00:00:00.000 | FC Nantes   | 0-0  | 0-0  | EA Guingamp      |   1995 | FR        |           0 |           0 |           0 |           0 |      0 |      0 |              1 |              1 |
|      10 | (Thu) 21 Sep 1995 (W38) | 1995-09-21 00:00:00.000 | EA Guingamp | 0-0  | 0-0  | FC Gueugnon      |   1995 | FR        |           0 |           0 |           0 |           0 |      0 |      0 |              1 |              1 |


Table: test_results
| Team         |   Points |   Year | Country   |
|:-------------|---------:|-------:|:----------|
| Real Madrid  |      100 |   2011 | ESP       |
| FC Barcelona |      100 |   2012 | ESP       |
| FC Barcelona |       99 |   2009 | ESP       |
| FC Barcelona |       96 |   2010 | ESP       |
| Real Madrid  |       96 |   2009 | ESP       |
| FC Barcelona |       94 |   2014 | ESP       |
| FC Barcelona |       93 |   2017 | ESP       |
| Real Madrid  |       93 |   2016 | ESP       |
| Real Madrid  |       92 |   2014 | ESP       |
| Real Madrid  |       92 |   2010 | ESP       |

 


tables: name: 123
data: 123.csv
name: AVG Distance 1_2
data: AVG Distance 1_2.csv
name: Distance
data: Distance.csv
name: FirstLast
data: FirstLast.csv
name: Highest Point Total
data: Highest Point Total.csv
name: Sheet1
data: Sheet1.csv
name: test_results
data: test_results.csv
label: Sheet1
Year
Highest Point Total
Year
test_results
Year
Highest Point Total
Year
Distance
year
Highest Point Total
Year
FirstLast
year
Highest Point Total
Year
123
year
Highest Point Total
Year
Sheet1
Country
AVG Distance 1_2
Country
test_results
Country
AVG Distance 1_2
Country
Distance
Country
AVG Distance 1_2
Country
FirstLast
Country
AVG Distance 1_2
Country
123
Country
AVG Distance 1_2
Country
output: {
    "joins": [
        {
            "from_table": "Sheet1",
            "from_column": "Year",
            "to_table": "Highest Point Total",
            "to_column": "Year"
        },
        {
            "from_table": "test_results",
            "from_column": "Year",
            "to_table": "Highest Point Total",
            "to_column": "Year"
        },
        {
            "from_table": "Distance",
            "from_column": "year",
            "to_table": "Highest Point Total",
            "to_column": "Year"
        },
        {
            "from_table": "FirstLast",
            "from_column": "year",
            "to_table": "Highest Point Total",
            "to_column": "Year"
        },
        {
            "from_table": "123",
            "from_column": "year",
            "to_table": "Highest Point Total",
            "to_column": "Year"
        },
        {
            "from_table": "Sheet1",
            "from_column": "Country",
            "to_table": "AVG Distance 1_2",
            "to_column": "Country"
        },
        {
            "from_table": "test_results",
            "from_column": "Country",
            "to_table": "AVG Distance 1_2",
            "to_column": "Country"
        },
        {
            "from_table": "Distance",
            "from_column": "Country",
            "to_table": "AVG Distance 1_2",
            "to_column": "Country"
        },
        {
            "from_table": "FirstLast",
            "from_column": "Country",
            "to_table": "AVG Distance 1_2",
            "to_column": "Country"
        },
        {
            "from_table": "123",
            "from_column": "Country",
            "to_table": "AVG Distance 1_2",
            "to_column": "Country"
        }
    ]
}