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: batting_details
|   Season | match_key   | match_no         | batsmen         |   player_key | wicket_status   |   R |   B |   M |   fours |   sixes |   SR | special_role   | match_date              |
|---------:|:------------|:-----------------|:----------------|-------------:|:----------------|----:|----:|----:|--------:|--------:|-----:|:---------------|:------------------------|
|     2008 | 20080428CSK | 15th match (N)   | JDP Oram        |         1015 | not out         |   0 |   0 |   0 |       0 |       0 |    0 | normal player  | 2008-04-28 00:00:00.000 |
|     2008 | 20080429MI  | 16th match (N)   | I Sharma        |         1059 | not out         |   0 |   0 |   0 |       0 |       0 |    0 | normal player  | 2008-04-29 00:00:00.000 |
|     2008 | 20080503KXP | 20th match (N)   | Joginder Sharma |         1017 | not out         |   0 |   0 |   0 |       0 |       0 |    0 | normal player  | 2008-02-05 00:00:00.000 |
|     2008 | 20080502DC  | 20th match (N)   | Joginder Sharma |         1017 | not out         |   0 |   0 |   0 |       0 |       0 |    0 | normal player  | 2008-02-05 00:00:00.000 |
|     2008 | 20080503RCB | 21               | Z Khan          |         1008 | not out         |   0 |   0 |   0 |       0 |       0 |    0 | normal player  | 2008-03-05 00:00:00.000 |
|     2008 | 20080504RR  | 23rd match (D/N) | A Nehra         |         1123 | not out         |   0 |   0 |   0 |       0 |       0 |    0 | normal player  | 2008-04-05 00:00:00.000 |
|     2008 | 20080511KKR | 31               | S Sreesanth     |         1127 | not out         |   0 |   0 |   0 |       0 |       0 |    0 | normal player  | 2008-10-05 00:00:00.000 |
|     2008 | 20080514MI  | 35th match (N)   | GD McGrath      |         1503 | not out         |   0 |   0 |   0 |       0 |       0 |    0 | normal player  | 2008-05-13 00:00:00.000 |
|     2008 | 20080526RR  | 51               | DP Vijaykumar   |         1510 | not out         |   0 |   0 |   0 |       0 |       0 |    0 | normal player  | 2008-05-25 00:00:00.000 |
|     2008 | 20080530RR  | 55th match (D/N) | A Kumble        |         1068 | not out         |   0 |   0 |   0 |       0 |       0 |    0 | normal player  | 2008-05-28 00:00:00.000 |


Table: batting_position
| match_key   |   innings | team            | batsman       |   player_key |   batting_position |   Season |
|:------------|----------:|:----------------|:--------------|-------------:|-------------------:|---------:|
| 20080419CSK |         2 | Kings XI Punjab | K Goel        |         1041 |                  1 |     2008 |
| 20080419CSK |         2 | Kings XI Punjab | JR Hopes      |         1186 |                  2 |     2008 |
| 20080419CSK |         2 | Kings XI Punjab | KC Sangakkara |         1043 |                  3 |     2008 |
| 20080419CSK |         2 | Kings XI Punjab | Yuvraj Singh  |         1042 |                  4 |     2008 |
| 20080419CSK |         2 | Kings XI Punjab | SM Katich     |         1113 |                  5 |     2008 |
| 20080419CSK |         2 | Kings XI Punjab | IK Pathan     |         1045 |                  6 |     2008 |
| 20080425KXP |         1 | Kings XI Punjab | K Goel        |         1041 |                  1 |     2008 |
| 20080425KXP |         1 | Kings XI Punjab | IK Pathan     |         1045 |                  2 |     2008 |
| 20080425KXP |         1 | Kings XI Punjab | KC Sangakkara |         1043 |                  3 |     2008 |
| 20080425KXP |         1 | Kings XI Punjab | Yuvraj Singh  |         1042 |                  4 |     2008 |


Table: ipl_matches
|   Season | Match_Key   | match_date              | Ground       | Winner                      | match_result     | Toss_Winner                 | Toss_Decision   | Teams   | Name                        |   is_winner |
|---------:|:------------|:------------------------|:-------------|:----------------------------|:-----------------|:----------------------------|:----------------|:--------|:----------------------------|------------:|
|     2009 | 20090427DC  | 2009-04-27 00:00:00.000 | Durban       | Deccan Chargers             | won by 6 Wickets | Deccan Chargers             | field           | Team 1  | Chennai Super Kings         |           0 |
|     2009 | 20090427DC  | 2009-04-27 00:00:00.000 | Durban       | Deccan Chargers             | won by 6 Wickets | Deccan Chargers             | field           | Team 2  | Deccan Chargers             |           1 |
|     2009 | 20090430DC  | 2009-04-30 00:00:00.000 | Centurion    | Delhi Capitals              | won by 6 Wickets | Delhi Capitals              | field           | Team 1  | Deccan Chargers             |           0 |
|     2009 | 20090430DC  | 2009-04-30 00:00:00.000 | Centurion    | Delhi Capitals              | won by 6 Wickets | Delhi Capitals              | field           | Team 2  | Delhi Capitals              |           1 |
|     2009 | 20090512RCB | 2009-05-12 00:00:00.000 | Centurion    | Royal Challengers Bangalore | won by 6 Wickets | Royal Challengers Bangalore | field           | Team 1  | Royal Challengers Bangalore |           1 |
|     2009 | 20090512RCB | 2009-05-12 00:00:00.000 | Centurion    | Royal Challengers Bangalore | won by 6 Wickets | Royal Challengers Bangalore | field           | Team 2  | Kolkata Knight Riders       |           0 |
|     2009 | 20090515KXP | 2009-05-15 00:00:00.000 | Bloemfontein | Kings XI Punjab             | won by 6 Wickets | Kings XI Punjab             | field           | Team 1  | Delhi Capitals              |           0 |
|     2009 | 20090515KXP | 2009-05-15 00:00:00.000 | Bloemfontein | Kings XI Punjab             | won by 6 Wickets | Kings XI Punjab             | field           | Team 2  | Kings XI Punjab             |           1 |
|     2009 | 20090516DC  | 2009-05-16 00:00:00.000 | Johannesburg | Deccan Chargers             | won by 6 Wickets | Deccan Chargers             | field           | Team 1  | Deccan Chargers             |           1 |
|     2009 | 20090516DC  | 2009-05-16 00:00:00.000 | Johannesburg | Deccan Chargers             | won by 6 Wickets | Deccan Chargers             | field           | Team 2  | Kolkata Knight Riders       |           0 |


Table: match_team_rr
|   season | match_key   | match_date              | team                  |   innings |   overs_played |   runs_made |   allocated_overs |    rr |
|---------:|:------------|:------------------------|:----------------------|----------:|---------------:|------------:|------------------:|------:|
|     2008 | 20080418KKR | 2008-04-18 00:00:00.000 | Kolkata Knight Riders |         1 |           19.6 |         222 |                20 | 11.1  |
|     2008 | 20080419CSK | 2008-04-19 00:00:00.000 | Chennai Super Kings   |         1 |           19.6 |         240 |                20 | 12    |
|     2008 | 20080419DD  | 2008-04-19 00:00:00.000 | Rajasthan Royals      |         1 |           19.6 |         129 |                20 |  6.45 |
|     2008 | 20080420RCB | 2008-04-20 00:00:00.000 | Mumbai Indians        |         1 |           19.6 |         165 |                20 |  8.25 |
|     2008 | 20080423CSK | 2008-04-23 00:00:00.000 | Chennai Super Kings   |         1 |           19.6 |         208 |                20 | 10.4  |
|     2008 | 20080425KXP | 2008-04-25 00:00:00.000 | Kings XI Punjab       |         1 |           19.6 |         182 |                20 |  9.1  |
|     2008 | 20080427DC  | 2008-04-27 00:00:00.000 | Mumbai Indians        |         1 |           19.6 |         154 |                20 |  7.7  |
|     2008 | 20080427KXP | 2008-04-27 00:00:00.000 | Delhi Daredevils      |         1 |           19.6 |         158 |                20 |  7.9  |
|     2008 | 20080428CSK | 2008-04-28 00:00:00.000 | Chennai Super Kings   |         1 |           19.6 |         178 |                20 |  8.9  |
|     2008 | 20080430DD  | 2008-04-30 00:00:00.000 | Delhi Daredevils      |         1 |           19.6 |         191 |                20 |  9.55 |


Table: merged_final
|   Season | match_key   |   innings | team                        | batsman         |   player_key |   batting_position |   R |   B |   fours |   sixes | special_role   |
|---------:|:------------|----------:|:----------------------------|:----------------|-------------:|-------------------:|----:|----:|--------:|--------:|:---------------|
|     2008 | 20080418KKR |         2 | Royal Challengers Bangalore | B Akhil         |         1025 |                  7 |   0 |   2 |       0 |       0 | normal player  |
|     2008 | 20080420KKR |         1 | Deccan Chargers             | VVS Laxman      |         1063 |                  3 |   0 |   6 |       0 |       0 | captain        |
|     2008 | 20080420KKR |         1 | Deccan Chargers             | RG Sharma       |         1064 |                  5 |   0 |   3 |       0 |       0 | normal player  |
|     2008 | 20080420KKR |         1 | Deccan Chargers             | WPUJC Vaas      |         1135 |                  9 |   0 |   1 |       0 |       0 | normal player  |
|     2008 | 20080420KKR |         2 | Kolkata Knight Riders       | RT Ponting      |         1280 |                  3 |   0 |   1 |       0 |       0 | normal player  |
|     2008 | 20080420RCB |         1 | Mumbai Indians              | DJ Thornely     |         1484 |                  3 |   0 |   5 |       0 |       0 | normal player  |
|     2008 | 20080425KXP |         1 | Kings XI Punjab             | S Sohal         |         1124 |                  7 |   0 |   4 |       0 |       0 | normal player  |
|     2008 | 20080425KXP |         1 | Kings XI Punjab             | PP Chawla       |         1046 |                  9 |   0 |   1 |       0 |       0 | normal player  |
|     2008 | 20080425KXP |         1 | Kings XI Punjab             | S Sreesanth     |         1127 |                 10 |   0 |   1 |       0 |       0 | normal player  |
|     2008 | 20080425KXP |         2 | Mumbai Indians              | Harbhajan Singh |         1007 |                  8 |   0 |   1 |       0 |       0 | captain        |


Table: run_rate_new
|   season | match_key   | match_date              | team            |   innings |   overs_played |   runs_made |   allocated_overs |   rr | Ground   |   Is_Winner |
|---------:|:------------|:------------------------|:----------------|----------:|---------------:|------------:|------------------:|-----:|:---------|------------:|
|     2011 | 20110410PW  | 2011-04-10 00:00:00.000 | Kings XI Punjab |         1 |           19.6 |         112 |                20 | 5.6  | Mumbai   |           1 |
|     2011 | 20110410PW  | 2011-04-10 00:00:00.000 | Kings XI Punjab |         1 |           19.6 |         112 |                20 | 5.6  | Mumbai   |           0 |
|     2011 | 20110415KTK | 2011-04-15 00:00:00.000 | Mumbai Indians  |         1 |           19.6 |         182 |                20 | 9.1  | Mumbai   |           0 |
|     2011 | 20110415KTK | 2011-04-15 00:00:00.000 | Mumbai Indians  |         1 |           19.6 |         182 |                20 | 9.1  | Mumbai   |           1 |
|     2011 | 20110427CSK | 2011-04-27 00:00:00.000 | Pune Warriors   |         1 |           19.6 |         141 |                20 | 7.05 | Mumbai   |           0 |
|     2011 | 20110427CSK | 2011-04-27 00:00:00.000 | Pune Warriors   |         1 |           19.6 |         141 |                20 | 7.05 | Mumbai   |           1 |
|     2011 | 20110502MI  | 2011-05-02 00:00:00.000 | Mumbai Indians  |         1 |           19.6 |         159 |                20 | 7.95 | Mumbai   |           1 |
|     2011 | 20110502MI  | 2011-05-02 00:00:00.000 | Mumbai Indians  |         1 |           19.6 |         159 |                20 | 7.95 | Mumbai   |           0 |
|     2011 | 20110504MI  | 2011-05-04 00:00:00.000 | Mumbai Indians  |         1 |           19.6 |         160 |                20 | 8    | Mumbai   |           0 |
|     2011 | 20110504MI  | 2011-05-04 00:00:00.000 | Mumbai Indians  |         1 |           19.6 |         160 |                20 | 8    | Mumbai   |           1 |


Table: season_key
|   Season |
|---------:|
|     2009 |
|     2011 |
|     2012 |
|     2013 |
|     2014 |
|     2015 |
|     2016 |
|     2017 |
|     2018 |
|     2019 |


Table: summary_table
|   Season | team                        |   sum of runs |   sum of fours |   sum of sixes |   highest run rate |   total boundary contribution |
|---------:|:----------------------------|--------------:|---------------:|---------------:|-------------------:|------------------------------:|
|     2008 | Royal Challengers Bangalore |          1722 |             47 |             18 |             466.66 |                    0.0377468  |
|     2008 | Deccan Chargers             |          1722 |             40 |             14 |             466.66 |                    0.0313589  |
|     2008 | Kolkata Knight Riders       |          1722 |             34 |             22 |             466.66 |                    0.0325203  |
|     2008 | Mumbai Indians              |          1722 |             49 |             17 |             466.66 |                    0.0383275  |
|     2008 | Kings XI Punjab             |          1722 |             77 |             30 |             466.66 |                    0.062137   |
|     2009 | Rajasthan Royals            |          1252 |             21 |              5 |             400    |                    0.0207668  |
|     2009 | Kings XI Punjab             |          1252 |             24 |              9 |             400    |                    0.0263578  |
|     2009 | Kolkata Knight Riders       |          1252 |              9 |              3 |             400    |                    0.00958466 |
|     2009 | Deccan Chargers             |          1252 |             11 |              5 |             400    |                    0.0127796  |
|     2009 | Chennai Super Kings         |          1252 |             23 |              9 |             400    |                    0.0255591  |


Table: team_key
| Name                        |
|:----------------------------|
| Chennai Super Kings         |
| Mumbai Indians              |
| Royal Challengers Bangalore |
| Rajasthan Royals            |
| Delhi Capitals              |
| Kings XI Punjab             |
| Deccan Chargers             |
| Kolkata Knight Riders       |
| Kochi Tuskers Kerala        |
| Pune Warriors               |

 


tables: name: batting_details
data: batting_details.csv
name: batting_position
data: batting_position.csv
name: ipl_matches
data: ipl_matches.csv
name: match_team_rr
data: match_team_rr.csv
name: merged_final
data: merged_final.csv
name: run_rate_new
data: run_rate_new.csv
name: season_key
data: season_key.csv
name: summary_table
data: summary_table.csv
name: team_key
data: team_key.csv
label: ipl_matches
Name
team_key
Name
match_team_rr
team
team_key
Name
ipl_matches
Season
season_key
Season
batting_position
Season
season_key
Season
match_team_rr
season
season_key
Season
batting_details
Season
season_key
Season
batting_position
team
team_key
Name
merged_final
Season
season_key
Season
merged_final
team
team_key
Name
output: {
    "joins": [
        {
            "from_table": "ipl_matches",
            "from_column": "Name",
            "to_table": "team_key",
            "to_column": "Name"
        },
        {
            "from_table": "match_team_rr",
            "from_column": "team",
            "to_table": "team_key",
            "to_column": "Name"
        },
        {
            "from_table": "ipl_matches",
            "from_column": "Season",
            "to_table": "season_key",
            "to_column": "Season"
        },
        {
            "from_table": "batting_position",
            "from_column": "Season",
            "to_table": "season_key",
            "to_column": "Season"
        },
        {
            "from_table": "match_team_rr",
            "from_column": "season",
            "to_table": "season_key",
            "to_column": "Season"
        },
        {
            "from_table": "batting_details",
            "from_column": "Season",
            "to_table": "season_key",
            "to_column": "Season"
        },
        {
            "from_table": "batting_position",
            "from_column": "team",
            "to_table": "team_key",
            "to_column": "Name"
        },
        {
            "from_table": "merged_final",
            "from_column": "Season",
            "to_table": "season_key",
            "to_column": "Season"
        },
        {
            "from_table": "merged_final",
            "from_column": "team",
            "to_table": "team_key",
            "to_column": "Name"
        }
    ]
}