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: CEM
|   ID number |  English Stanine   | English Percentile   | Maths Stanine   | Maths Percentile   |   Reasoning Stanine |   Reasoning Percentile |   Year 9 |
|------------:|:-------------------|:---------------------|:----------------|:-------------------|--------------------:|-----------------------:|---------:|
|        8137 | 5                  | 42                   | 7               | 78                 |                   4 |                     27 |     2018 |
|        8003 | 4                  | 32                   | 3               | 17                 |                   4 |                     35 |     2018 |
|        8006 | 8                  | 93                   | 4               | 39                 |                   4 |                     39 |     2018 |
|        8007 | 7                  | 82                   | 5               | 50                 |                   4 |                     35 |     2018 |
|        8008 | 6                  | 73                   | 5               | 59                 |                   4 |                     31 |     2018 |
|        8200 | 6                  | 71                   | 7               | 82                 |                   4 |                     39 |     2018 |
|        8050 | 4                  | 23                   | 4               | 39                 |                   4 |                     35 |     2018 |
|        8025 | 3                  | 9                    | 4               | 30                 |                   4 |                     35 |     2018 |
|        8221 |                    |                      |                 |                    |                   4 |                     35 |     2018 |
|        8039 | 4                  | 26                   | 3               | 15                 |                   4 |                     31 |     2018 |


Table: Options
|   ID Number |   Line | Course_teacher   | Course   | Teacher   |
|------------:|-------:|:-----------------|:---------|:----------|
|        9285 |      1 | 6ESL_ZAR         | 6ESL     | ZAR       |
|        9264 |      1 | 6ESL_ZAR         | 6ESL     | ZAR       |
|        8168 |      1 | 6SCS_KJA         | 6SCS     | KJA       |
|        8130 |      1 | 6FRE_GCH         | 6FRE     | GCH       |
|        9266 |      1 | 6ESL_ZAR         | 6ESL     | ZAR       |
|        7260 |      1 | 6SCS_KJA         | 6SCS     | KJA       |
|        7183 |      1 | 6ENG_AST         | 6ENG     | AST       |
|        7154 |      1 | 6FRE_GCH         | 6FRE     | GCH       |
|        9270 |      1 | 6SCS_KJA         | 6SCS     | KJA       |
|        7209 |      1 | 6SCS_KJA         | 6SCS     | KJA       |


Table: PATdemo
|   ID Number | Test                                           | Stanine     |
|------------:|:-----------------------------------------------|:------------|
|        2956 | PAT Listening Comprehension - Test 8 - Year 10 | not entered |
|        4162 | PAT Listening Comprehension - Test 8 - Year 10 | not entered |
|        2783 | PAT Listening Comprehension - Test 8 - Year 10 | not entered |
|        4169 | PAT Listening Comprehension - Test 8 - Year 10 | not entered |
|        2841 | PAT Listening Comprehension - Test 8 - Year 10 | not entered |
|        4184 | PAT Listening Comprehension - Test 8 - Year 10 | not entered |
|        5043 | PAT Listening Comprehension - Test 8 - Year 10 | not entered |
|        5199 | PAT Listening Comprehension - Test 8 - Year 10 | not entered |
|        5021 | PAT Listening Comprehension - Test 8 - Year 10 | not entered |
|        2847 | PAT Listening Comprehension - Test 8 - Year 10 | not entered |


Table: students
|   ID Number | Name          | Gender   | Tutor   |   Year Level | Ethnicity - Level 1 Group   | Type   | Student Flag (Full, First)   | Secondary Tertiary Program   | Notes Flag   |
|------------:|:--------------|:---------|:--------|-------------:|:----------------------------|:-------|:-----------------------------|:-----------------------------|:-------------|
|        8161 | Aaliyah4784   | F        | MZARP   |           10 | European                    | RE     |                              |                              | No           |
|        8158 | Abigail3195   | F        | MZARP   |           10 | Asian                       | RE     |                              |                              | No           |
|        8118 | Alexandra5018 | M        | DALRS   |           10 | Maori                       | RE     |                              |                              | No           |
|        8044 | Alice2694     | F        | ADDRW   |           10 | Pasifika                    | RE     |                              |                              | No           |
|        8065 | Amber8719     | M        | DJHKE   |           10 | Maori                       | RE     |                              |                              | No           |
|        8278 | Amy1552       | M        | AMAGE   |           10 | Pasifika                    | RE     |                              |                              | No           |
|        8193 | Andy4022      | F        | HRTCR   |           10 | Pasifika                    | RE     |                              |                              | No           |
|        8222 | Andy9132      | M        | FABBR   |           10 | European                    | RE     |                              |                              | No           |
|        8042 | Angus9100     | F        | ADDRW   |           10 | Maori                       | RE     |                              |                              | No           |
|        8049 | Antonia5782   | F        | FJRND   |           10 | Asian                       | RE     |                              |                              | No           |

 


tables: name: CEM
data: CEM.csv
name: Options
data: Options.csv
name: PATdemo
data: PATdemo.csv
name: students
data: students.csv
label: Options
ID Number
students
ID Number
PATdemo
ID Number
students
ID Number
CEM
English Percentile
students
ID Number
output: {
    "joins": [
        {
            "from_table": "Options",
            "from_column": "ID Number",
            "to_table": "students",
            "to_column": "ID Number"
        },
        {
            "from_table": "PATdemo",
            "from_column": "ID Number",
            "to_table": "students",
            "to_column": "ID Number"
        },
        {
            "from_table": "CEM",
            "from_column": "English Percentile",
            "to_table": "students",
            "to_column": "ID Number"
        }
    ]
}