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
| playerID   |   yearID |   stint | teamID   | lgID   |   G |   AB |   R |   H |   2B |   3B |   HR |   RBI |   SB |   CS |   BB |   SO |   IBB |   HBP |   SH |   SF |   GIDP | yearAndTeam   | playerYearAndTeam   | nameAndTeam             |
|:-----------|---------:|--------:|:---------|:-------|----:|-----:|----:|----:|-----:|-----:|-----:|------:|-----:|-----:|-----:|-----:|------:|------:|-----:|-----:|-------:|:--------------|:--------------------|:------------------------|
| brently01  |     1913 |       1 | CLE      | AL     |   1 |    0 |   0 |   0 |    0 |    0 |    0 |     0 |    0 |    0 |    0 |    0 |     0 |     0 |    0 |    0 |      0 | 1913_CLE      | brently01_1913_CLE  | Lynn Brenton, CLE       |
| dashnle01  |     1913 |       1 | CLE      | AL     |   1 |    0 |   0 |   0 |    0 |    0 |    0 |     0 |    0 |    0 |    0 |    0 |     0 |     0 |    0 |    0 |      0 | 1913_CLE      | dashnle01_1913_CLE  | Lee Dashner, CLE        |
| glavelu01  |     1913 |       1 | CLE      | AL     |   1 |    0 |   0 |   0 |    0 |    0 |    0 |     0 |    0 |    0 |    0 |    0 |     0 |     0 |    0 |    0 |      0 | 1913_CLE      | glavelu01_1913_CLE  | Luke Glavenich, CLE     |
| greggda01  |     1913 |       1 | CLE      | AL     |   1 |    0 |   0 |   0 |    0 |    0 |    0 |     0 |    0 |    0 |    0 |    0 |     0 |     0 |    0 |    0 |      0 | 1913_CLE      | greggda01_1913_CLE  | Dave Gregg, CLE         |
| beckge01   |     1914 |       1 | CLE      | AL     |   1 |    0 |   0 |   0 |    0 |    0 |    0 |     0 |    0 |    0 |    0 |    0 |     0 |     0 |    0 |    0 |      0 | 1914_CLE      | beckge01_1914_CLE   | George Beck, CLE        |
| bennhe01   |     1914 |       1 | CLE      | AL     |   1 |    0 |   0 |   0 |    0 |    0 |    0 |     0 |    0 |    0 |    0 |    0 |     0 |     0 |    0 |    0 |      0 | 1914_CLE      | bennhe01_1914_CLE   | Henry Benn, CLE         |
| bowmaab01  |     1915 |       1 | CLE      | AL     |   2 |    0 |   0 |   0 |    0 |    0 |    0 |     0 |    0 |    0 |    0 |    0 |     0 |     0 |    0 |    0 |      0 | 1915_CLE      | bowmaab01_1915_CLE  | Abe Bowman, CLE         |
| hillhe01   |     1915 |       1 | CLE      | AL     |   1 |    0 |   0 |   0 |    0 |    0 |    0 |     0 |    0 |    0 |    0 |    0 |     0 |     0 |    0 |    0 |      0 | 1915_CLE      | hillhe01_1915_CLE   | Herbert Hill, CLE       |
| desjash01  |     1916 |       1 | CLE      | AL     |   1 |    0 |   0 |   0 |    0 |    0 |    0 |     0 |    0 |    0 |    0 |    0 |     0 |     0 |    0 |    0 |      0 | 1916_CLE      | desjash01_1916_CLE  | Shorty Des Jardien, CLE |
| gunkere01  |     1916 |       1 | CLE      | AL     |   1 |    0 |   0 |   0 |    0 |    0 |    0 |     0 |    0 |    0 |    0 |    0 |     0 |     0 |    0 |    0 |      0 | 1916_CLE      | gunkere01_1916_CLE  | Red Gunkel, CLE         |


Table: Fielding
| playerID   |   yearID |   stint | teamID   | lgID   | POS   |   G |   GS |   InnOuts |   PO |   A |   E |   DP | PB   | WP   | SB   | CS   | ZR   | yearAndTeam   | playerYearAndTeam   |
|:-----------|---------:|--------:|:---------|:-------|:------|----:|-----:|----------:|-----:|----:|----:|-----:|:-----|:-----|:-----|:-----|:-----|:--------------|:--------------------|
| bruckan01  |     1905 |       1 | DET      | AL     | P     |   1 |    0 |         3 |    0 |   0 |   0 |    0 |      |      |      |      |      | 1905_DET      | bruckan01_1905_DET  |
| lordbr01   |     1907 |       1 | PHA      | AL     | P     |   1 |    0 |         3 |    0 |   0 |   0 |    0 |      |      |      |      |      | 1907_PHA      | lordbr01_1907_PHA   |
| collior01  |     1909 |       1 | WS1      | AL     | P     |   1 |    0 |         3 |    0 |   0 |   0 |    0 |      |      |      |      |      | 1909_WS1      | collior01_1909_WS1  |
| formabi01  |     1910 |       1 | WS1      | AL     | P     |   1 |    0 |         3 |    0 |   0 |   0 |    0 |      |      |      |      |      | 1910_WS1      | formabi01_1910_WS1  |
| valenvi01  |     1954 |       1 | CHA      | AL     | P     |   1 |    0 |         3 |    0 |   0 |   0 |    0 |      |      |      |      |      | 1954_CHA      | valenvi01_1954_CHA  |
| wilsobi02  |     1955 |       1 | KC1      | AL     | P     |   1 |    0 |         3 |    0 |   0 |   0 |    0 |      |      |      |      |      | 1955_KC1      | wilsobi02_1955_KC1  |
| kindeel01  |     1957 |       1 | CHA      | AL     | P     |   1 |    0 |         3 |    0 |   0 |   0 |    0 |      |      |      |      |      | 1957_CHA      | kindeel01_1957_CHA  |
| mcilwst01  |     1957 |       1 | CHA      | AL     | P     |   1 |    0 |         3 |    0 |   0 |   0 |    0 |      |      |      |      |      | 1957_CHA      | mcilwst01_1957_CHA  |
| sprinja01  |     1957 |       1 | BOS      | AL     | P     |   1 |    0 |         3 |    0 |   0 |   0 |    0 |      |      |      |      |      | 1957_BOS      | sprinja01_1957_BOS  |
| becquju01  |     1960 |       1 | WS1      | AL     | P     |   1 |    0 |         3 |    0 |   0 |   0 |    0 |      |      |      |      |      | 1960_WS1      | becquju01_1960_WS1  |


Table: People
| playerID   |   birthYear |   birthMonth |   birthDay | birthCountry   | birthState   | birthCity   | deathYear   | deathMonth   | deathDay   | deathCountry   | deathState   | deathCity   | nameFirst   | nameLast   | nameGiven        |   weight |   height | bats   | throws   | debut      | finalGame   | retroID   | bbrefID   | nameFull       |
|:-----------|------------:|-------------:|-----------:|:---------------|:-------------|:------------|:------------|:-------------|:-----------|:---------------|:-------------|:------------|:------------|:-----------|:-----------------|---------:|---------:|:-------|:---------|:-----------|:------------|:----------|:----------|:---------------|
| alexaga01  |        1953 |            3 |         27 | USA            | CA           | Los Angeles |             |              |            |                |              |             | Gary        | Alexander  | Gary Wayne       |      195 |       74 | R      | R        | 1975-09-12 | 1981-09-28  | alexg101  | alexaga01 | Gary Alexander |
| allenro02  |        1959 |           10 |          5 | USA            | CA           | Los Angeles |             |              |            |                |              |             | Rod         | Allen      | Roderick Bernet  |      185 |       73 | R      | R        | 1983-04-07 | 1988-10-02  | aller001  | allenro02 | Rod Allen      |
| anderji01  |        1957 |            2 |         23 | USA            | CA           | Los Angeles |             |              |            |                |              |             | Jim         | Anderson   | James Lea        |      170 |       72 | R      | R        | 1978-07-02 | 1984-09-26  | andej001  | anderji01 | Jim Anderson   |
| andremi01  |        1943 |            7 |          9 | USA            | CA           | Los Angeles |             |              |            |                |              |             | Mike        | Andrews    | Michael Jay      |      195 |       75 | R      | R        | 1966-09-18 | 1973-09-29  | andrm101  | andremi01 | Mike Andrews   |
| apodabo01  |        1950 |            1 |         31 | USA            | CA           | Los Angeles |             |              |            |                |              |             | Bob         | Apodaca    | Robert John      |      170 |       71 | R      | R        | 1973-09-18 | 1977-09-18  | apodb101  | apodabo01 | Bob Apodaca    |
| bartobr01  |        1982 |            4 |         25 | USA            | CA           | Los Angeles |             |              |            |                |              |             | Brian       | Barton     | Brian Deon       |      190 |       75 | R      | R        | 2008-04-01 | 2009-06-03  | bartb001  | bartobr01 | Brian Barton   |
| battoch01  |        1954 |            8 |         24 | USA            | CA           | Los Angeles |             |              |            |                |              |             | Chris       | Batton     | Christopher Sean |      195 |       76 | R      | R        | 1976-09-19 | 1976-10-02  | battc101  | battoch01 | Chris Batton   |
| bellke01   |        1955 |            7 |         13 | USA            | CA           | Los Angeles |             |              |            |                |              |             | Kevin       | Bell       | Kevin Robert     |      195 |       72 | R      | R        | 1976-06-16 | 1982-10-03  | bellk101  | bellke01  | Kevin Bell     |
| brandro01  |        1940 |            1 |         13 | USA            | CA           | Los Angeles |             |              |            |                |              |             | Ron         | Brand      | Ronald George    |      167 |       67 | R      | R        | 1963-05-26 | 1971-09-25  | branr101  | brandro01 | Ron Brand      |
| bressed01  |        1932 |            5 |          2 | USA            | CA           | Los Angeles |             |              |            |                |              |             | Eddie       | Bressoud   | Edward Francis   |      175 |       73 | R      | R        | 1956-06-14 | 1967-09-26  | brese101  | bressed01 | Eddie Bressoud |


Table: Teams
|   yearID | lgID   | teamID   | franchID   | divID   |   Rank |   G | Ghome   |   W |   L | DivWin   | WCWin   | LgWin   | WSWin   |   R |   AB |    H |   2B |   3B |   HR |   BB |   SO | SB   | CS   | HBP   | SF   |   RA |   ER |   ERA |   CG |   SHO |   SV |   IPouts |   HA |   HRA |   BBA |   SOA |   E |   DP |    FP | name                    | park                | attendance   |   BPF |   PPF | teamIDBR   | teamIDlahman45   | teamIDretro   | yearAndTeam   |
|---------:|:-------|:---------|:-----------|:--------|-------:|----:|:--------|----:|----:|:---------|:--------|:--------|:--------|----:|-----:|-----:|-----:|-----:|-----:|-----:|-----:|:-----|:-----|:------|:-----|-----:|-----:|------:|-----:|------:|-----:|---------:|-----:|------:|------:|------:|----:|-----:|------:|:------------------------|:--------------------|:-------------|------:|------:|:-----------|:-----------------|:--------------|:--------------|
|     1884 | NL     | BFN      | BUF        |         |      3 | 114 |         |  64 |  47 |          |         | N       | N       | 700 | 4197 | 1099 |  163 |   69 |   39 |  215 |  458 |      |      |       |      |  626 |  328 |  2.95 |  108 |    14 |    1 |     3003 | 1041 |    46 |   189 |   534 | 462 |   71 | 0.905 | Buffalo Bisons          | Olympic Park I      |              |   103 |   105 | BUF        | BFN              | BFN           | 1884_BFN      |
|     1884 | NL     | BSN      | ATL        |         |      2 | 116 |         |  73 |  38 |          |         | N       | N       | 684 | 4189 | 1063 |  179 |   60 |   36 |  207 |  660 |      |      |       |      |  468 |  285 |  2.47 |  109 |    14 |    2 |     3111 |  932 |    30 |   135 |   742 | 384 |   46 | 0.922 | Boston Beaneaters       | South End Grounds I |              |    99 |    97 | BSN        | BSN              | BSN           | 1884_BSN      |
|     1884 | NL     | CHN      | CHC        |         |      5 | 112 |         |  62 |  50 |          |         | N       | N       | 834 | 4182 | 1176 |  162 |   50 |  142 |  264 |  469 |      |      |       |      |  647 |  336 |  3.03 |  106 |     9 |    0 |     2992 | 1028 |    83 |   231 |   472 | 595 |  107 | 0.886 | Chicago White Stockings | Lake Front Park II  |              |   108 |   105 | CHC        | CHN              | CHN           | 1884_CHN      |
|     1884 | NL     | CL2      | CBL        |         |      7 | 113 |         |  35 |  77 |          |         | N       | N       | 458 | 3934 |  934 |  147 |   49 |   16 |  170 |  576 |      |      |       |      |  716 |  379 |  3.43 |  107 |     7 |    0 |     2984 | 1046 |    35 |   269 |   482 | 512 |   75 | 0.897 | Cleveland Blues         | Kennard Street Park |              |   103 |   106 | CLV        | CL2              | CL2           | 1884_CL2      |
|     1884 | NL     | DTN      | DTN        |         |      8 | 114 |         |  28 |  84 |          |         | N       | N       | 445 | 3970 |  825 |  114 |   47 |   31 |  207 |  699 |      |      |       |      |  736 |  370 |  3.38 |  109 |     3 |    0 |     2954 | 1097 |    36 |   245 |   488 | 550 |   60 | 0.886 | Detroit Wolverines      | Recreation Park     |              |    94 |    97 | DTN        | DTN              | DTN           | 1884_DTN      |
|     1884 | NL     | NY1      | SFG        |         |      4 | 116 |         |  62 |  50 |          |         | N       | N       | 693 | 4124 | 1053 |  149 |   68 |   22 |  249 |  492 |      |      |       |      |  623 |  351 |  3.12 |  111 |     4 |    0 |     3042 | 1011 |    28 |   326 |   567 | 514 |   69 | 0.895 | New York Gothams        | Polo Grounds I      |              |   105 |   102 | NYG        | NY1              | NY1           | 1884_NY1      |
|     1884 | NL     | PHI      | PHI        |         |      6 | 113 |         |  39 |  73 |          |         | N       | N       | 549 | 3998 |  934 |  149 |   39 |   14 |  209 |  512 |      |      |       |      |  824 |  428 |  3.93 |  106 |     3 |    1 |     2943 | 1090 |    37 |   254 |   411 | 536 |   67 | 0.888 | Philadelphia Quakers    | Recreation Park     |              |    94 |    99 | PHI        | PHI              | PHI           | 1884_PHI      |
|     1885 | NL     | BFN      | BUF        |         |      7 | 112 |         |  38 |  74 |          |         | N       | N       | 495 | 3900 |  980 |  149 |   50 |   23 |  179 |  380 |      |      |       |      |  761 |  456 |  4.29 |  107 |     4 |    1 |     2868 | 1175 |    31 |   234 |   320 | 464 |   65 | 0.901 | Buffalo Bisons          | Olympic Park I      |              |   103 |   105 | BUF        | BFN              | BFN           | 1885_BFN      |
|     1885 | NL     | BSN      | ATL        |         |      5 | 113 |         |  46 |  66 |          |         | N       | N       | 528 | 3950 |  915 |  144 |   53 |   22 |  190 |  522 |      |      |       |      |  589 |  330 |  3.03 |  111 |    10 |    0 |     2943 | 1045 |    26 |   188 |   480 | 478 |   79 | 0.901 | Boston Beaneaters       | South End Grounds I |              |    96 |    95 | BSN        | BSN              | BSN           | 1885_BSN      |
|     1885 | NL     | DTN      | DTN        |         |      6 | 108 |         |  41 |  67 |          |         | N       | N       | 514 | 3773 |  917 |  149 |   66 |   25 |  216 |  451 |      |      |       |      |  582 |  305 |  2.88 |  105 |     6 |    1 |     2863 |  966 |    18 |   224 |   475 | 462 |   61 | 0.901 | Detroit Wolverines      | Recreation Park     |              |   100 |   101 | DTN        | DTN              | DTN           | 1885_DTN      |


Table: TeamsFranchises
| franchID   | franchName                    | active   | NAassoc   |
|:-----------|:------------------------------|:---------|:----------|
| ALT        | Altoona Mountain City         | N        |           |
| ANA        | Los Angeles Angels of Anaheim | Y        |           |
| ARI        | Arizona Diamondbacks          | Y        |           |
| BAL        | Baltimore Orioles             | Y        |           |
| BFB        | Buffalo Bisons                | N        |           |
| BFL        | Buffalo Bisons                | N        |           |
| BLC        | Baltimore Canaries            | NA       |           |
| BLO        | Baltimore Orioles             | N        |           |
| BLT        | Baltimore Terrapins           | N        |           |
| BLU        | Baltimore Monumentals         | N        |           |

 


tables: name: Batting
data: Batting.csv
name: Fielding
data: Fielding.csv
name: People
data: People.csv
name: Teams
data: Teams.csv
name: TeamsFranchises
data: TeamsFranchises.csv
label: Batting
yearAndTeam
Teams
yearAndTeam
Teams
franchID
TeamsFranchises
franchID
Batting
playerYearAndTeam
Fielding
playerYearAndTeam
Batting
playerID
People
playerID
output: {
    "joins": [
        {
            "from_table": "Batting",
            "from_column": "yearAndTeam",
            "to_table": "Teams",
            "to_column": "yearAndTeam"
        },
        {
            "from_table": "Teams",
            "from_column": "franchID",
            "to_table": "TeamsFranchises",
            "to_column": "franchID"
        },
        {
            "from_table": "Batting",
            "from_column": "playerYearAndTeam",
            "to_table": "Fielding",
            "to_column": "playerYearAndTeam"
        },
        {
            "from_table": "Batting",
            "from_column": "playerID",
            "to_table": "People",
            "to_column": "playerID"
        }
    ]
}