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: Actuals
| Entity      | Transaction Type   | Transaction Number   | Sequence Number   | GL Subaccount       | Date                    | Department       | Project   | Cost Centre   |   Amount | Description   | Customer/Supplier   | Invoice Status   | Hard/Soft   | Budget Code   |
|:------------|:-------------------|:---------------------|:------------------|:--------------------|:------------------------|:-----------------|:----------|:--------------|---------:|:--------------|:--------------------|:-----------------|:------------|:--------------|
| Citizens UK |                    |                      |                   | 5401 Gross Salaries | 2018-11-30 00:00:00.000 | Tyne & Wear      |           |               |     5065 | Nov Salary    | Nov Salary          |                  | Soft        |               |
| Citizens UK |                    |                      |                   | 5401 Gross Salaries | 2018-11-30 00:00:00.000 | Birmingham       |           |               |     5510 | Nov Salary    | Nov Salary          |                  | Soft        |               |
| Citizens UK |                    |                      |                   | 5401 Gross Salaries | 2018-11-30 00:00:00.000 | WLC              |           |               |     3035 | Nov Salary    | Nov Salary          |                  | Soft        |               |
| Citizens UK |                    |                      |                   | 5401 Gross Salaries | 2018-11-30 00:00:00.000 | Wales            |           |               |     5766 | Nov Salary    | Nov Salary          |                  | Soft        |               |
| Citizens UK |                    |                      |                   | 5401 Gross Salaries | 2018-11-30 00:00:00.000 | TELCO            |           |               |    17183 | Nov Salary    | Nov Salary          |                  | Soft        |               |
| Citizens UK |                    |                      |                   | 5401 Gross Salaries | 2018-11-30 00:00:00.000 | SPUK             |           |               |    39051 | Nov Salary    | Nov Salary          |                  | Soft        |               |
| Citizens UK |                    |                      |                   | 5401 Gross Salaries | 2018-11-30 00:00:00.000 | Somerset         |           |               |      611 | Nov Salary    | Nov Salary          |                  | Soft        |               |
| Citizens UK |                    |                      |                   | 5401 Gross Salaries | 2018-11-30 00:00:00.000 | SLC              |           |               |    15375 | Nov Salary    | Nov Salary          |                  | Soft        |               |
| Citizens UK |                    |                      |                   | 5401 Gross Salaries | 2018-11-30 00:00:00.000 | Sponsor Refugees |           |               |     9470 | Nov Salary    | Nov Salary          |                  | Soft        |               |
| Citizens UK |                    |                      |                   | 5401 Gross Salaries | 2018-11-30 00:00:00.000 | NOTT             |           |               |     3681 | Nov Salary    | Nov Salary          |                  | Soft        |               |


Table: Budget
| Department   | GL Subaccount     | Date                    |   Amount | Hard/Soft   | P&L Type    |
|:-------------|:------------------|:------------------------|---------:|:------------|:------------|
| CUK HQ       | 4000 Donations    | 2019-04-01 00:00:00.000 |   795155 | Soft        | 1. Income   |
| CUK HQ       | 4000 Donations    | 2019-05-31 00:00:00.000 |   -26668 | Soft        | 1. Income   |
| CUK HQ       | 4000 Donations    | 2019-06-30 00:00:00.000 |  -108151 | Soft        | 1. Income   |
| CUK HQ       | 5202 Train Ticket | 2019-04-01 00:00:00.000 |     1500 | Soft        | 2. Expenses |
| CUK HQ       | 5202 Train Ticket | 2019-05-31 00:00:00.000 |     1500 | Soft        | 2. Expenses |
| CUK HQ       | 5202 Train Ticket | 2019-06-30 00:00:00.000 |     1500 | Soft        | 2. Expenses |
| CUK HQ       | 5202 Train Ticket | 2019-07-31 00:00:00.000 |     1500 | Soft        | 2. Expenses |
| CUK HQ       | 5202 Train Ticket | 2019-08-31 00:00:00.000 |     1500 | Soft        | 2. Expenses |
| CUK HQ       | 5202 Train Ticket | 2019-09-30 00:00:00.000 |     1500 | Soft        | 2. Expenses |
| CUK HQ       | 5202 Train Ticket | 2019-10-31 00:00:00.000 |     1500 | Soft        | 2. Expenses |


Table: CoA
| GL Subaccount                 | GL Account   | Indexed Class   | Indexed Type   | Financial Statement   |
|:------------------------------|:-------------|:----------------|:---------------|:----------------------|
| 5201 Flight                   | Travel Costs | 2.1 Activities  | 2. Expenses    | Income & Expenditure  |
| 5202 Train Ticket             | Travel Costs | 2.1 Activities  | 2. Expenses    | Income & Expenditure  |
| 5203 Bus Fare                 | Travel Costs | 2.1 Activities  | 2. Expenses    | Income & Expenditure  |
| 5204 Taxi Fare                | Travel Costs | 2.1 Activities  | 2. Expenses    | Income & Expenditure  |
| 5205 Car Parking              | Travel Costs | 2.1 Activities  | 2. Expenses    | Income & Expenditure  |
| 5206 Car Mileage              | Travel Costs | 2.1 Activities  | 2. Expenses    | Income & Expenditure  |
| 5207 Cycle Mileage            | Travel Costs | 2.1 Activities  | 2. Expenses    | Income & Expenditure  |
| 5208 Leader/ Volunteer Travel | Travel Costs | 2.1 Activities  | 2. Expenses    | Income & Expenditure  |
| 5221 Venue Costs              | Venue Costs  | 2.1 Activities  | 2. Expenses    | Income & Expenditure  |
| 5222 Catering                 | Venue Costs  | 2.1 Activities  | 2. Expenses    | Income & Expenditure  |


Table: Dates
| Date                    |   Year |   QuarterOfYear |   MonthOfYear |   DayOfMonth |   DateInt | MonthName   | MonthInCalendar   | QuarterInCalendar   |   DayInWeek | DayOfWeekName   | WeekEnding              |   Week Number |   MonthnYear |   QuarternYear |   ShortYear | FY   |   FY.MonthNo | Quarter   | ShortMonths   | MonthYear   | ShotDate   |
|:------------------------|-------:|----------------:|--------------:|-------------:|----------:|:------------|:------------------|:--------------------|------------:|:----------------|:------------------------|--------------:|-------------:|---------------:|------------:|:-----|-------------:|:----------|:--------------|:------------|:-----------|
| 2020-07-01 00:00:00.000 |   2020 |               3 |             7 |            1 |  20200701 | July        | Jul 2020          | Q3 2020             |           2 | Wednesday       | 2020-07-05 00:00:00.000 |            27 |     20200700 |       20200300 |          20 | FY21 |            4 | Q2        | Jul           | Jul 20      | 01 Jul 20  |
| 2020-07-02 00:00:00.000 |   2020 |               3 |             7 |            2 |  20200702 | July        | Jul 2020          | Q3 2020             |           3 | Thursday        | 2020-07-05 00:00:00.000 |            27 |     20200700 |       20200300 |          20 | FY21 |            4 | Q2        | Jul           | Jul 20      | 02 Jul 20  |
| 2020-07-03 00:00:00.000 |   2020 |               3 |             7 |            3 |  20200703 | July        | Jul 2020          | Q3 2020             |           4 | Friday          | 2020-07-05 00:00:00.000 |            27 |     20200700 |       20200300 |          20 | FY21 |            4 | Q2        | Jul           | Jul 20      | 03 Jul 20  |
| 2020-07-04 00:00:00.000 |   2020 |               3 |             7 |            4 |  20200704 | July        | Jul 2020          | Q3 2020             |           5 | Saturday        | 2020-07-05 00:00:00.000 |            27 |     20200700 |       20200300 |          20 | FY21 |            4 | Q2        | Jul           | Jul 20      | 04 Jul 20  |
| 2020-07-05 00:00:00.000 |   2020 |               3 |             7 |            5 |  20200705 | July        | Jul 2020          | Q3 2020             |           6 | Sunday          | 2020-07-05 00:00:00.000 |            27 |     20200700 |       20200300 |          20 | FY21 |            4 | Q2        | Jul           | Jul 20      | 05 Jul 20  |
| 2020-07-06 00:00:00.000 |   2020 |               3 |             7 |            6 |  20200706 | July        | Jul 2020          | Q3 2020             |           0 | Monday          | 2020-07-12 00:00:00.000 |            28 |     20200700 |       20200300 |          20 | FY21 |            4 | Q2        | Jul           | Jul 20      | 06 Jul 20  |
| 2020-07-07 00:00:00.000 |   2020 |               3 |             7 |            7 |  20200707 | July        | Jul 2020          | Q3 2020             |           1 | Tuesday         | 2020-07-12 00:00:00.000 |            28 |     20200700 |       20200300 |          20 | FY21 |            4 | Q2        | Jul           | Jul 20      | 07 Jul 20  |
| 2020-07-08 00:00:00.000 |   2020 |               3 |             7 |            8 |  20200708 | July        | Jul 2020          | Q3 2020             |           2 | Wednesday       | 2020-07-12 00:00:00.000 |            28 |     20200700 |       20200300 |          20 | FY21 |            4 | Q2        | Jul           | Jul 20      | 08 Jul 20  |
| 2020-07-09 00:00:00.000 |   2020 |               3 |             7 |            9 |  20200709 | July        | Jul 2020          | Q3 2020             |           3 | Thursday        | 2020-07-12 00:00:00.000 |            28 |     20200700 |       20200300 |          20 | FY21 |            4 | Q2        | Jul           | Jul 20      | 09 Jul 20  |
| 2020-07-10 00:00:00.000 |   2020 |               3 |             7 |           10 |  20200710 | July        | Jul 2020          | Q3 2020             |           4 | Friday          | 2020-07-12 00:00:00.000 |            28 |     20200700 |       20200300 |          20 | FY21 |            4 | Q2        | Jul           | Jul 20      | 10 Jul 20  |


Table: Department
| Department    |
|:--------------|
| LWF           |
| CCA           |
| CUK HQ        |
| Tyne & Wear   |
| SPUK          |
| PACT          |
| Milton Keynes |
| Comms         |
| SLC           |
| NOTT          |


Table: Financial Statement
| Financial Statement   |
|:----------------------|
| Balance Sheet         |
| Income & Expenditure  |


Table: Forecast
| Department   | Subaccount Name   | Date                    |   Amount | Hard/Soft   | P&L Type    | Institution Name   | Project Name   |
|:-------------|:------------------|:------------------------|---------:|:------------|:------------|:-------------------|:---------------|
| Birmingham   | 5202 Train Ticket | 2019-06-30 00:00:00.000 |     74.9 | Soft        | 2. Expenses | Activity Cost      |                |
| Birmingham   | 5202 Train Ticket | 2019-07-31 00:00:00.000 |     17.4 | Soft        | 2. Expenses | Activity Cost      |                |
| Birmingham   | 5202 Train Ticket | 2019-09-30 00:00:00.000 |    140.9 | Soft        | 2. Expenses | Activity Cost      |                |
| Brighton     | 5202 Train Ticket | 2019-08-31 00:00:00.000 |     35.3 | Soft        | 2. Expenses | Activity Cost      |                |
| Brighton     | 5202 Train Ticket | 2019-10-31 00:00:00.000 |     40   | Soft        | 2. Expenses | Activity Cost      |                |
| Brighton     | 5202 Train Ticket | 2019-11-30 00:00:00.000 |     40   | Soft        | 2. Expenses | Activity Cost      |                |
| Brighton     | 5202 Train Ticket | 2019-12-31 00:00:00.000 |     40   | Soft        | 2. Expenses | Activity Cost      |                |
| Brighton     | 5202 Train Ticket | 2020-01-31 00:00:00.000 |     40   | Soft        | 2. Expenses | Activity Cost      |                |
| Brighton     | 5202 Train Ticket | 2020-02-29 00:00:00.000 |     40   | Soft        | 2. Expenses | Activity Cost      |                |
| Brighton     | 5202 Train Ticket | 2020-03-31 00:00:00.000 |     40   | Soft        | 2. Expenses | Activity Cost      |                |


Table: GL Account
| GL Account             |
|:-----------------------|
| Premises               |
| IT Equipment           |
| Office Equipment       |
| Furniture and Fixtures |
| Motor Vehicles         |
| Investments            |
| Debtors & Prepayments  |
| Accrued Income         |
| Group Balance          |
| Deposits and Cash      |


Table: GL Subaccount
| GL Subaccount                        |
|:-------------------------------------|
| 0010 Leasehold Property              |
| 0011 Leasehold Property Depreciation |
| 0020 IT Equipment                    |
| 0021 IT Equipment Depreciation       |
| 0030 Office Equipment                |
| 0031 Office Equipment Depreciation   |
| 0040 Furniture and Fixtures          |
| 0041 Furniture/Fixture Depreciation  |
| 0050 Motor Vehicles                  |
| 0051 Motor Vehicles Depreciation     |


Table: Grouping
| Department      | Group                  | Unit Full Name         |
|:----------------|:-----------------------|:-----------------------|
| LWF             | 2. National Programmes | Living Wage Foundation |
| Refugee Welcome | 2. National Programmes | Community Sponsorship  |
| NCOT            | 2. National Programmes | NCOT                   |
| Communications  | 3. Head Office         | Communications         |
| Training        | 3. Head Office         | Training               |
| Supervision     | 3. Head Office         | Supervision            |
| Birmingham      | 1. Chapters            | Birmingham Citizens    |
| CUK HQ          | 3. Head Office         | Head Office            |
| Essex           | 1. Chapters            | Essex Citizens         |
| Leeds           | 1. Chapters            | Leeds Citizens         |


Table: Indexed Class
| Indexed Class             |
|:--------------------------|
| 3.1 Fixed Assets          |
| 3.2 Current Assets        |
| 4.1 Current Liabilities   |
| 4.2 Long Term Liabilities |
| 5.1 Capital & Reserves    |
| 1.1 Donations             |
| 1.2 Grants                |
| 1.1 Sales                 |
| 1.3 Membership            |
| 1.4 Sponsorship           |


Table: Indexed Type
| Indexed Type   |
|:---------------|
| 3. Assets      |
| 4. Liabilities |
| 5. Equity      |
| 1. Income      |
| 2. Expenses    |


Table: P&L
|   Amount | P&L Type   | GL Subaccount                                   | Customer/Supplier                 | Transaction Type   | Cost Centre   | Hard/Soft   | Project      | FY   | Date                    | Department   |
|---------:|:-----------|:------------------------------------------------|:----------------------------------|:-------------------|:--------------|:------------|:-------------|:-----|:------------------------|:-------------|
|       60 | 1. Income  | 4610 Accreditation - Primary Employers Renewals | Emi Jewellery                     |                    |               | Hard        | Emp Renewals | FY20 | 2019-04-01 00:00:00.000 | LWF          |
|       60 | 1. Income  | 4610 Accreditation - Primary Employers Renewals | Cracking Good Food                |                    |               | Hard        | Emp Renewals | FY20 | 2019-04-01 00:00:00.000 | LWF          |
|       60 | 1. Income  | 4610 Accreditation - Primary Employers Renewals | Centre for Theology and Community |                    |               | Hard        | Emp Renewals | FY20 | 2019-04-01 00:00:00.000 | LWF          |
|       60 | 1. Income  | 4610 Accreditation - Primary Employers Renewals | Beacon Bolton Counselling Service |                    |               | Hard        | Emp Renewals | FY20 | 2019-04-01 00:00:00.000 | LWF          |
|       60 | 1. Income  | 4610 Accreditation - Primary Employers Renewals | Medact                            |                    |               | Hard        | Emp Renewals | FY20 | 2019-04-01 00:00:00.000 | LWF          |
|       60 | 1. Income  | 4610 Accreditation - Primary Employers Renewals | Workington Town Council           |                    |               | Hard        | Emp Renewals | FY20 | 2019-04-01 00:00:00.000 | LWF          |
|       60 | 1. Income  | 4610 Accreditation - Primary Employers Renewals | QCC Global Ltd                    |                    |               | Hard        | Emp Renewals | FY20 | 2019-04-01 00:00:00.000 | LWF          |
|       60 | 1. Income  | 4610 Accreditation - Primary Employers Renewals | Claremont Communications          |                    |               | Hard        | Emp Renewals | FY20 | 2019-06-27 00:00:00.000 | LWF          |
|       60 | 1. Income  | 4610 Accreditation - Primary Employers Renewals | Cambridge Ethnic Community Forum  |                    |               | Hard        | Emp Renewals | FY20 | 2019-06-28 00:00:00.000 | LWF          |
|       60 | 1. Income  | 4610 Accreditation - Primary Employers Renewals | Healthwatch Salford               |                    |               | Hard        | Emp Renewals | FY20 | 2019-06-28 00:00:00.000 | LWF          |


Table: Results Comparison
| 2.Comparison   |   1.Index |
|:---------------|----------:|
| vs LY          |         1 |
| vs Reforecast  |         2 |
| vs Budget      |         3 |

 


tables: name: Actuals
data: Actuals.csv
name: Budget
data: Budget.csv
name: CoA
data: CoA.csv
name: Dates
data: Dates.csv
name: Department
data: Department.csv
name: Financial Statement
data: Financial Statement.csv
name: Forecast
data: Forecast.csv
name: GL Account
data: GL Account.csv
name: GL Subaccount
data: GL Subaccount.csv
name: Grouping
data: Grouping.csv
name: Indexed Class
data: Indexed Class.csv
name: Indexed Type
data: Indexed Type.csv
name: P&L
data: P&L.csv
name: Results Comparison
data: Results Comparison.csv
label: Actuals
GL Subaccount
CoA
GL Subaccount
Actuals
Date
Dates
Date
Budget
Date
Dates
Date
Budget
GL Subaccount
CoA
GL Subaccount
Forecast
Subaccount Name
CoA
GL Subaccount
Forecast
Date
Dates
Date
output: {
    "joins": [
        {
            "from_table": "Actuals",
            "from_column": "GL Subaccount",
            "to_table": "CoA",
            "to_column": "GL Subaccount"
        },
        {
            "from_table": "Actuals",
            "from_column": "Date",
            "to_table": "Dates",
            "to_column": "Date"
        },
        {
            "from_table": "Budget",
            "from_column": "Date",
            "to_table": "Dates",
            "to_column": "Date"
        },
        {
            "from_table": "Budget",
            "from_column": "GL Subaccount",
            "to_table": "CoA",
            "to_column": "GL Subaccount"
        },
        {
            "from_table": "Forecast",
            "from_column": "Subaccount Name",
            "to_table": "CoA",
            "to_column": "GL Subaccount"
        },
        {
            "from_table": "Forecast",
            "from_column": "Date",
            "to_table": "Dates",
            "to_column": "Date"
        }
    ]
}