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: Actual by Country
| Country Name         | Average Actual Gini   |
|:---------------------|:----------------------|
| Dominican Republic   | 47.947826086956525    |
| Aruba                |                       |
| Lebanon              | 31.8                  |
| Afghanistan          |                       |
| French Polynesia     |                       |
| Angola               | 48.666666666666664    |
| Albania              | 31.411111111111111    |
| Andorra              |                       |
| United Arab Emirates | 29.25                 |
| Argentina            | 46.239285714285714    |


Table: Actual_Predicted_with_Imputation
|   Column1 |   Actual |   Predicted |   Residuals |
|----------:|---------:|------------:|------------:|
|         0 |     28.8 |     32.2158 |    3.41579  |
|         1 |     58.7 |     49.7531 |   -8.94691  |
|         2 |     32.9 |     31.6699 |   -1.23012  |
|         3 |     40.9 |     40.6916 |   -0.208421 |
|         4 |     31.3 |     31.6539 |    0.35391  |
|         5 |     37.4 |     38.5858 |    1.18581  |
|         6 |     36   |     35.4454 |   -0.554632 |
|         7 |     25.9 |     27.4    |    1.49999  |
|         8 |     35.3 |     40.1037 |    4.8037   |
|         9 |     48.1 |     46.094  |   -2.00597  |


Table: Appended Predictions and OG
|   year | Stocks traded, total value (% of GDP)   | Inflation, consumer prices (annual %)   | Stocks traded, turnover ratio of domestic shares (%)   | Tax revenue (% of GDP)   | GDP per capita (current US$)   | Central government debt, total (% of GDP)   | Gini index (World Bank estimate)   | Broad money (% of GDP)   | Total reserves (includes gold, current US$)   | International migrant stock, total   | Income share held by highest 10%   | Poverty headcount ratio at national poverty lines (% of population)   | Life expectancy at birth, total (years)   | Mortality rate, infant (per 1,000 live births)   | Unemployment, total (% of total labor force) (modeled ILO estimate)   | Exports of goods and services (% of GDP)   |     timestamp | Country Name   | Country Code   | predicted_gini   |
|-------:|:----------------------------------------|:----------------------------------------|:-------------------------------------------------------|:-------------------------|:-------------------------------|:--------------------------------------------|:-----------------------------------|:-------------------------|:----------------------------------------------|:-------------------------------------|:-----------------------------------|:----------------------------------------------------------------------|:------------------------------------------|:-------------------------------------------------|:----------------------------------------------------------------------|:-------------------------------------------|--------------:|:---------------|:---------------|:-----------------|
|   2020 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635698678476 | Andorra        | AND            |                  |
|   1991 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699156203 | American Samoa | ASM            |                  |
|   1992 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699161215 | American Samoa | ASM            |                  |
|   1993 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699166229 | American Samoa | ASM            |                  |
|   1994 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699171283 | American Samoa | ASM            |                  |
|   1996 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699181300 | American Samoa | ASM            |                  |
|   1997 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699186359 | American Samoa | ASM            |                  |
|   1998 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699191371 | American Samoa | ASM            |                  |
|   1999 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699196381 | American Samoa | ASM            |                  |
|   2001 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699206452 | American Samoa | ASM            |                  |


Table: Averages for Model and Actual by Country
| Country Name         |   Average Predicted Gini |   Average Actual Gini |   Residuals |
|:---------------------|-------------------------:|----------------------:|------------:|
| United Arab Emirates |                  31.1972 |               29.25   |   -1.94721  |
| Australia            |                  34.0901 |               33.8857 |   -0.20436  |
| Romania              |                  44.2305 |               36.3077 |   -7.92277  |
| Lebanon              |                  40.8584 |               31.8    |   -9.05843  |
| Mexico               |                  46.4444 |               49.9067 |    3.46223  |
| Egypt, Arab Rep.     |                  39.0753 |               31.0667 |   -8.00868  |
| United Kingdom       |                  35.2865 |               35.0182 |   -0.268352 |
| Sri Lanka            |                  41.5648 |               37.4    |   -4.16484  |
| Morocco              |                  42.4754 |               39.88   |   -2.59538  |
| Ghana                |                  45.1572 |               41.44   |   -3.71725  |


Table: capstone_sql_table
|   year | Stocks traded, total value (% of GDP)   | Inflation, consumer prices (annual %)   | Stocks traded, turnover ratio of domestic shares (%)   | Tax revenue (% of GDP)   | GDP per capita (current US$)   | Central government debt, total (% of GDP)   | Gini index (World Bank estimate)   | Broad money (% of GDP)   | Total reserves (includes gold, current US$)   | International migrant stock, total   | Income share held by highest 10%   | Poverty headcount ratio at national poverty lines (% of population)   | Life expectancy at birth, total (years)   | Mortality rate, infant (per 1,000 live births)   | Unemployment, total (% of total labor force) (modeled ILO estimate)   | Exports of goods and services (% of GDP)   |     timestamp | Country Name   | Country Code   |
|-------:|:----------------------------------------|:----------------------------------------|:-------------------------------------------------------|:-------------------------|:-------------------------------|:--------------------------------------------|:-----------------------------------|:-------------------------|:----------------------------------------------|:-------------------------------------|:-----------------------------------|:----------------------------------------------------------------------|:------------------------------------------|:-------------------------------------------------|:----------------------------------------------------------------------|:-------------------------------------------|--------------:|:---------------|:---------------|
|   2020 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635698678476 | Andorra        | AND            |
|   1991 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699156203 | American Samoa | ASM            |
|   1992 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699161215 | American Samoa | ASM            |
|   1993 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699166229 | American Samoa | ASM            |
|   1994 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699171283 | American Samoa | ASM            |
|   1996 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699181300 | American Samoa | ASM            |
|   1997 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699186359 | American Samoa | ASM            |
|   1998 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699191371 | American Samoa | ASM            |
|   1999 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699196381 | American Samoa | ASM            |
|   2001 |                                         |                                         |                                                        |                          |                                |                                             |                                    |                          |                                               |                                      |                                    |                                                                       |                                           |                                                  |                                                                       |                                            | 1635699206452 | American Samoa | ASM            |


Table: Country codes (2)
| Country Name                | Country Code   |
|:----------------------------|:---------------|
| Aruba                       | ABW            |
| Africa Eastern and Southern | AFE            |
| Afghanistan                 | AFG            |
| Africa Western and Central  | AFW            |
| Angola                      | AGO            |
| Albania                     | ALB            |
| Andorra                     | AND            |
| Arab World                  | ARB            |
| United Arab Emirates        | ARE            |
| Argentina                   | ARG            |


Table: Country codes (3)
| Country Name                | Country Code   |
|:----------------------------|:---------------|
| Aruba                       | ABW            |
| Africa Eastern and Southern | AFE            |
| Afghanistan                 | AFG            |
| Africa Western and Central  | AFW            |
| Angola                      | AGO            |
| Albania                     | ALB            |
| Andorra                     | AND            |
| Arab World                  | ARB            |
| United Arab Emirates        | ARE            |
| Argentina                   | ARG            |


Table: Country codes
| Country Name                | Country Code   |
|:----------------------------|:---------------|
| Aruba                       | ABW            |
| Africa Eastern and Southern | AFE            |
| Afghanistan                 | AFG            |
| Africa Western and Central  | AFW            |
| Angola                      | AGO            |
| Albania                     | ALB            |
| Andorra                     | AND            |
| Arab World                  | ARB            |
| United Arab Emirates        | ARE            |
| Argentina                   | ARG            |


Table: c_y_DF (2)
|   year | country   |   Stocks traded, total value (% of GDP) |   Inflation, consumer prices (annual %) |   Tax revenue (% of GDP) |   GDP per capita (current US$) |   Broad money (% of GDP) |   Total reserves (includes gold, current US$) |   Exports of goods and services (% of GDP) |   Index |
|-------:|:----------|----------------------------------------:|----------------------------------------:|-------------------------:|-------------------------------:|-------------------------:|----------------------------------------------:|-------------------------------------------:|--------:|
|   2011 | ARE       |                                 4.27882 |                                0.877347 |                0.321414  |                       39194.7  |                  63.143  |                                   3.72693e+10 |                                    90.0766 |       0 |
|   2012 | ARE       |                                 4.79239 |                                0.662269 |                0.363786  |                       40976.5  |                  61.7624 |                                   4.70352e+10 |                                   100.246  |       1 |
|   2014 | ARE       |                                35.7358  |                                2.34627  |                0.355723  |                       43751.8  |                  76.0157 |                                   7.84244e+10 |                                    99.5608 |       2 |
|   2015 | ARE       |                                16.0829  |                                4.06997  |                0.057734  |                       38663.4  |                  90.235  |                                   9.39291e+10 |                                   100.87   |       3 |
|   2016 | ARE       |                                13.8547  |                                1.61749  |                0.0434947 |                       38141.9  |                  93.4571 |                                   8.53908e+10 |                                   101.003  |       4 |
|   2017 | ARE       |                                11.4546  |                                1.96683  |                0.0664572 |                       40644.8  |                  90.1141 |                                   9.53776e+10 |                                    99.5949 |       5 |
|   2019 | ARE       |                                 6.94571 |                               -1.93108  |                0.964961  |                       43103.3  |                  91.3698 |                                   1.08359e+11 |                                    92.4563 |       6 |
|   1990 | AUS       |                                12.9307  |                                7.33302  |               22.4766    |                       18211.5  |                  54.176  |                                   1.93187e+10 |                                    15.1463 |       7 |
|   1991 | AUS       |                                14.039   |                                3.17668  |               22.374     |                       18821.8  |                  53.4112 |                                   1.93397e+10 |                                    16.0611 |       8 |
|   2005 | ROU       |                                 1.44391 |                                9.01491  |               17.4681    |                        4617.93 |                  33.8164 |                                   2.16012e+10 |                                    24.5352 |       9 |


Table: c_y_DF
|   year | country   |   Stocks traded, total value (% of GDP) |   Inflation, consumer prices (annual %) |   Tax revenue (% of GDP) |   GDP per capita (current US$) |   Broad money (% of GDP) |   Total reserves (includes gold, current US$) |   Exports of goods and services (% of GDP) |   Index |
|-------:|:----------|----------------------------------------:|----------------------------------------:|-------------------------:|-------------------------------:|-------------------------:|----------------------------------------------:|-------------------------------------------:|--------:|
|   2011 | ARE       |                                 4.27882 |                                0.877347 |                0.321414  |                       39194.7  |                  63.143  |                                   3.72693e+10 |                                    90.0766 |       0 |
|   2012 | ARE       |                                 4.79239 |                                0.662269 |                0.363786  |                       40976.5  |                  61.7624 |                                   4.70352e+10 |                                   100.246  |       1 |
|   2014 | ARE       |                                35.7358  |                                2.34627  |                0.355723  |                       43751.8  |                  76.0157 |                                   7.84244e+10 |                                    99.5608 |       2 |
|   2015 | ARE       |                                16.0829  |                                4.06997  |                0.057734  |                       38663.4  |                  90.235  |                                   9.39291e+10 |                                   100.87   |       3 |
|   2016 | ARE       |                                13.8547  |                                1.61749  |                0.0434947 |                       38141.9  |                  93.4571 |                                   8.53908e+10 |                                   101.003  |       4 |
|   2017 | ARE       |                                11.4546  |                                1.96683  |                0.0664572 |                       40644.8  |                  90.1141 |                                   9.53776e+10 |                                    99.5949 |       5 |
|   2019 | ARE       |                                 6.94571 |                               -1.93108  |                0.964961  |                       43103.3  |                  91.3698 |                                   1.08359e+11 |                                    92.4563 |       6 |
|   1990 | AUS       |                                12.9307  |                                7.33302  |               22.4766    |                       18211.5  |                  54.176  |                                   1.93187e+10 |                                    15.1463 |       7 |
|   1991 | AUS       |                                14.039   |                                3.17668  |               22.374     |                       18821.8  |                  53.4112 |                                   1.93397e+10 |                                    16.0611 |       8 |
|   2005 | ROU       |                                 1.44391 |                                9.01491  |               17.4681    |                        4617.93 |                  33.8164 |                                   2.16012e+10 |                                    24.5352 |       9 |


Table: gini_feature_importance
| Feature Name                                |   Importance |
|:--------------------------------------------|-------------:|
| Stocks traded, total value (% of GDP)       |       0.1342 |
| Inflation, consumer prices (annual %)       |       0.0438 |
| Tax revenue (% of GDP)                      |       0.118  |
| GDP per capita (current US$)                |       0.3569 |
| Broad money (% of GDP)                      |       0.0848 |
| Total reserves (includes gold, current US$) |       0.1036 |
| Exports of goods and services (% of GDP)    |       0.1587 |


Table: Predicted Outcomes
|   Stocks traded, total value (% of GDP) |   Inflation, consumer prices (annual %) |   Tax revenue (% of GDP) |   GDP per capita (current US$) |   Broad money (% of GDP) |   Total reserves (includes gold, current US$) |   Exports of goods and services (% of GDP) |   year |   predicted_gini | Country Code   | Country Name         |
|----------------------------------------:|----------------------------------------:|-------------------------:|-------------------------------:|-------------------------:|----------------------------------------------:|-------------------------------------------:|-------:|-----------------:|:---------------|:---------------------|
|                                 4.27882 |                                0.877347 |                0.321414  |                        39194.7 |                  63.143  |                                   3.72693e+10 |                                    90.0766 |   2011 |          29.972  | ARE            | United Arab Emirates |
|                                 4.79239 |                                0.662269 |                0.363786  |                        40976.5 |                  61.7624 |                                   4.70352e+10 |                                   100.246  |   2012 |          30.3759 | ARE            | United Arab Emirates |
|                                35.7358  |                                2.34627  |                0.355723  |                        43751.8 |                  76.0157 |                                   7.84244e+10 |                                    99.5608 |   2014 |          30.7454 | ARE            | United Arab Emirates |
|                                16.0829  |                                4.06997  |                0.057734  |                        38663.4 |                  90.235  |                                   9.39291e+10 |                                   100.87   |   2015 |          31.721  | ARE            | United Arab Emirates |
|                                13.8547  |                                1.61749  |                0.0434947 |                        38141.9 |                  93.4571 |                                   8.53908e+10 |                                   101.003  |   2016 |          32.1707 | ARE            | United Arab Emirates |
|                                11.4546  |                                1.96683  |                0.0664572 |                        40644.8 |                  90.1141 |                                   9.53776e+10 |                                    99.5949 |   2017 |          31.6085 | ARE            | United Arab Emirates |
|                                 6.94571 |                               -1.93108  |                0.964961  |                        43103.3 |                  91.3698 |                                   1.08359e+11 |                                    92.4563 |   2019 |          31.7871 | ARE            | United Arab Emirates |
|                                12.9307  |                                7.33302  |               22.4766    |                        18211.5 |                  54.176  |                                   1.93187e+10 |                                    15.1463 |   1990 |          36.1329 | AUS            | Australia            |
|                                14.039   |                                3.17668  |               22.374     |                        18821.8 |                  53.4112 |                                   1.93397e+10 |                                    16.0611 |   1991 |          35.0807 | AUS            | Australia            |
|                                12.9447  |                                1.01223  |               20.6807    |                        18570.1 |                  56.2715 |                                   1.38524e+10 |                                    16.6911 |   1992 |          34.9248 | AUS            | Australia            |


Table: Predictions by Country
| Country Name         |   Average Predicted Gini |
|:---------------------|-------------------------:|
| United Arab Emirates |                  31.1972 |
| Australia            |                  34.0901 |
| Romania              |                  44.2305 |
| Lebanon              |                  40.8584 |
| Bangladesh           |                  37.7212 |
| Bulgaria             |                  42.3083 |
| Bahrain              |                  42.4246 |
| Mexico               |                  46.4444 |
| Egypt, Arab Rep.     |                  39.0753 |
| United Kingdom       |                  35.2865 |

 


tables: name: Actual by Country
data: Actual by Country.csv
name: Actual_Predicted_with_Imputation
data: Actual_Predicted_with_Imputation.csv
name: Appended Predictions and OG
data: Appended Predictions and OG.csv
name: Averages for Model and Actual by Country
data: Averages for Model and Actual by Country.csv
name: capstone_sql_table
data: capstone_sql_table.csv
name: Country codes (2)
data: Country codes (2).csv
name: Country codes (3)
data: Country codes (3).csv
name: Country codes
data: Country codes.csv
name: c_y_DF (2)
data: c_y_DF (2).csv
name: c_y_DF
data: c_y_DF.csv
name: gini_feature_importance
data: gini_feature_importance.csv
name: Predicted Outcomes
data: Predicted Outcomes.csv
name: Predictions by Country
data: Predictions by Country.csv
label: Predicted Outcomes
Stocks traded, total value (% of GDP)
c_y_DF
Stocks traded, total value (% of GDP)
Predicted Outcomes
Country Code
Country codes
Country Code
capstone_sql_table
Country Name
Country codes
Country Name
Averages for Model and Actual by Country
Country Name
Actual by Country
Country Name
Predicted Outcomes
Stocks traded, total value (% of GDP)
c_y_DF (2)
Stocks traded, total value (% of GDP)
Predictions by Country
Country Name
Country codes
Country Name
Actual by Country
Country Name
Country codes
Country Name
capstone_sql_table
Country Name
Country codes (2)
Country Name
Predicted Outcomes
Country Name
Country codes (2)
Country Name
capstone_sql_table
Country Name
Country codes (3)
Country Name
Predicted Outcomes
Country Name
Country codes (3)
Country Name
Appended Predictions and OG
timestamp
capstone_sql_table
timestamp
output: {
    "joins": [
        {
            "from_table": "Predicted Outcomes",
            "from_column": "Stocks traded, total value (% of GDP)",
            "to_table": "c_y_DF",
            "to_column": "Stocks traded, total value (% of GDP)"
        },
        {
            "from_table": "Predicted Outcomes",
            "from_column": "Country Code",
            "to_table": "Country codes",
            "to_column": "Country Code"
        },
        {
            "from_table": "capstone_sql_table",
            "from_column": "Country Name",
            "to_table": "Country codes",
            "to_column": "Country Name"
        },
        {
            "from_table": "Averages for Model and Actual by Country",
            "from_column": "Country Name",
            "to_table": "Actual by Country",
            "to_column": "Country Name"
        },
        {
            "from_table": "Predicted Outcomes",
            "from_column": "Stocks traded, total value (% of GDP)",
            "to_table": "c_y_DF (2)",
            "to_column": "Stocks traded, total value (% of GDP)"
        },
        {
            "from_table": "Predictions by Country",
            "from_column": "Country Name",
            "to_table": "Country codes",
            "to_column": "Country Name"
        },
        {
            "from_table": "Actual by Country",
            "from_column": "Country Name",
            "to_table": "Country codes",
            "to_column": "Country Name"
        },
        {
            "from_table": "capstone_sql_table",
            "from_column": "Country Name",
            "to_table": "Country codes (2)",
            "to_column": "Country Name"
        },
        {
            "from_table": "Predicted Outcomes",
            "from_column": "Country Name",
            "to_table": "Country codes (2)",
            "to_column": "Country Name"
        },
        {
            "from_table": "capstone_sql_table",
            "from_column": "Country Name",
            "to_table": "Country codes (3)",
            "to_column": "Country Name"
        },
        {
            "from_table": "Predicted Outcomes",
            "from_column": "Country Name",
            "to_table": "Country codes (3)",
            "to_column": "Country Name"
        },
        {
            "from_table": "Appended Predictions and OG",
            "from_column": "timestamp",
            "to_table": "capstone_sql_table",
            "to_column": "timestamp"
        }
    ]
}