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: AgeGroup
|   AgeGroupID | AgeGroup   |
|-------------:|:-----------|
|            1 | <30        |
|            2 | 30-49      |
|            3 | 50+        |


Table: Dates
| Date                    |   Year | Month Name   |   Month Number | Weekday   |   Weekday number | Year Month   | Quarter   |
|:------------------------|-------:|:-------------|---------------:|:----------|-----------------:|:-------------|:----------|
| 2017-07-01 00:00:00.000 |   2017 | Jul          |              7 | Saturday  |                7 | Jul 17       | Q3        |
| 2017-07-02 00:00:00.000 |   2017 | Jul          |              7 | Sunday    |                1 | Jul 17       | Q3        |
| 2017-07-03 00:00:00.000 |   2017 | Jul          |              7 | Monday    |                2 | Jul 17       | Q3        |
| 2017-07-04 00:00:00.000 |   2017 | Jul          |              7 | Tuesday   |                3 | Jul 17       | Q3        |
| 2017-07-05 00:00:00.000 |   2017 | Jul          |              7 | Wednesday |                4 | Jul 17       | Q3        |
| 2017-07-06 00:00:00.000 |   2017 | Jul          |              7 | Thursday  |                5 | Jul 17       | Q3        |
| 2017-07-07 00:00:00.000 |   2017 | Jul          |              7 | Friday    |                6 | Jul 17       | Q3        |
| 2017-07-08 00:00:00.000 |   2017 | Jul          |              7 | Saturday  |                7 | Jul 17       | Q3        |
| 2017-07-09 00:00:00.000 |   2017 | Jul          |              7 | Sunday    |                1 | Jul 17       | Q3        |
| 2017-07-10 00:00:00.000 |   2017 | Jul          |              7 | Monday    |                2 | Jul 17       | Q3        |


Table: Department
|   DeptID | Department           |
|---------:|:---------------------|
|        1 | Admin Offices        |
|        2 | Executive Office     |
|        3 | IT/IS                |
|        4 | Software Engineering |
|        5 | Production           |
|        6 | Sales                |
|        7 | Human Resources      |


Table: Education
|   EduID | Education       |
|--------:|:----------------|
|       1 | Master Degree   |
|       2 | Bachelor Degree |
|       3 | Certifcate I    |
|       4 | Certificate II  |
|       5 | Diploma         |


Table: Employees
|   EmpID | EmpFirstName   | EmpLastName   | EmpFullName      | DateOfBirth   | HireDate                |   DeptID | Gender   |   Age |   AgeGroup | MaritalStatus   | PayTypeID     |   EthnicGroupID |   PositionID | TermDate   |   EduID |
|--------:|:---------------|:--------------|:-----------------|:--------------|:------------------------|---------:|:---------|------:|-----------:|:----------------|:--------------|----------------:|-------------:|:-----------|--------:|
|   11010 | Jacquelyn      | Suarez        | Jacquelyn Suarez | 21/11/2000    | 2017-01-01 00:00:00.000 |        6 | F        |    20 |          1 | S               | Permanent     |               3 |           19 |            |       5 |
|   11011 | Curtis         | Lu            | Curtis Lu        | 21/02/1999    | 2017-01-01 00:00:00.000 |        6 | M        |    21 |          1 | M               | Contract Temp |               4 |           19 |            |       5 |
|   11012 | Lauren         | Walker        | Lauren Walker    | 16/09/1991    | 2017-01-01 00:00:00.000 |        6 | F        |    29 |          1 | M               | Contract Temp |               4 |           19 |            |       5 |
|   11014 | Sydney         | Bennett       | Sydney Bennett   | 26/08/2000    | 2017-01-01 00:00:00.000 |        6 | F        |    20 |          1 | S               | Contract Temp |               6 |           19 |            |       5 |
|   11015 | Chloe          | Young         | Chloe Young      | 08/02/2001    | 2017-01-01 00:00:00.000 |        6 | F        |    19 |          1 | S               | Contract Temp |               6 |           19 |            |       5 |
|   11019 | Luke           | Lal           | Luke Lal         | 05/04/2000    | 2017-01-01 00:00:00.000 |        6 | M        |    20 |          1 | S               | Contract Temp |               1 |           19 |            |       5 |
|   11022 | Ethan          | Zhang         | Ethan Zhang      | 12/03/1998    | 2017-01-01 00:00:00.000 |        6 | M        |    22 |          1 | M               | Contract Temp |               3 |           19 |            |       5 |
|   11023 | Seth           | Edwards       | Seth Edwards     | 07/01/1999    | 2017-01-01 00:00:00.000 |        6 | M        |    21 |          1 | M               | Contract Temp |               5 |           19 |            |       5 |
|   11024 | Russell        | Xie           | Russell Xie      | 24/11/1999    | 2017-01-01 00:00:00.000 |        6 | M        |    21 |          1 | M               | Contract Temp |               5 |           19 |            |       5 |
|   11025 | Alejandro      | Beck          | Alejandro Beck   | 18/07/1992    | 2017-01-01 00:00:00.000 |        6 | M        |    28 |          1 | M               | Permanent     |               1 |           19 |            |       5 |


Table: Ethnicity
|   EthnicGroupID | Ethnicity   |
|----------------:|:------------|
|               1 | Group A     |
|               2 | Group B     |
|               3 | Group C     |
|               4 | Group D     |
|               5 | Group E     |
|               6 | Group F     |
|               7 | Group G     |


Table: PayType
| PayTypeID   | PayType       |
|:------------|:--------------|
| T           | Contract Temp |
| P           | Permanent     |


Table: Position
|   PositionID | Position          |
|-------------:|:------------------|
|            1 | CEO               |
|            2 | COO               |
|            3 | CFO               |
|            4 | CMO               |
|            5 | CTO               |
|            6 | CIO               |
|            7 | Marketing manager |
|            8 | Product manager   |
|            9 | Finance manager   |
|           10 | HR manager        |

 


tables: name: AgeGroup
data: AgeGroup.csv
name: Dates
data: Dates.csv
name: Department
data: Department.csv
name: Education
data: Education.csv
name: Employees
data: Employees.csv
name: Ethnicity
data: Ethnicity.csv
name: PayType
data: PayType.csv
name: Position
data: Position.csv
label: Employees
DeptID
Department
DeptID
Employees
PayTypeID
PayType
PayTypeID
Employees
EthnicGroupID
Ethnicity
EthnicGroupID
Employees
AgeGroup
AgeGroup
AgeGroupID
Employees
PositionID
Position
PositionID
Employees
EduID
Education
EduID
output: {
    "joins": [
        {
            "from_table": "Employees",
            "from_column": "DeptID",
            "to_table": "Department",
            "to_column": "DeptID"
        },
        {
            "from_table": "Employees",
            "from_column": "PayTypeID",
            "to_table": "PayType",
            "to_column": "PayTypeID"
        },
        {
            "from_table": "Employees",
            "from_column": "EthnicGroupID",
            "to_table": "Ethnicity",
            "to_column": "EthnicGroupID"
        },
        {
            "from_table": "Employees",
            "from_column": "AgeGroup",
            "to_table": "AgeGroup",
            "to_column": "AgeGroupID"
        },
        {
            "from_table": "Employees",
            "from_column": "PositionID",
            "to_table": "Position",
            "to_column": "PositionID"
        },
        {
            "from_table": "Employees",
            "from_column": "EduID",
            "to_table": "Education",
            "to_column": "EduID"
        }
    ]
}