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: Accounts
|   Ser | Account_No   |
|------:|:-------------|
|     1 | 4000-100     |
|     2 | 4000-110     |
|     3 | 4000-120     |
|     4 | 4000-130     |
|     5 | 4000-140     |
|     6 | 4000-150     |


Table: Budget_Period
| Unit   |   Period | Account_No   |   Budget |
|:-------|---------:|:-------------|---------:|
| WAS    |   202108 | 4000-100     |     1000 |
| WAS    |   202108 | 4000-110     |     1200 |
| WAS    |   202108 | 4000-120     |      950 |
| WAS    |   202107 | 4000-100     |      975 |
| WAS    |   202107 | 4000-110     |     1000 |
| WAS    |   202107 | 4000-120     |     1100 |
| WAS    |   202106 | 4000-100     |      935 |
| WAS    |   202106 | 4000-110     |      955 |
| WAS    |   202106 | 4000-120     |      875 |
| WAS    |   202105 | 4000-100     |      900 |


Table: Calendar
| Date                    |   Year |   YearOffset | YearCompleted   |   QuarterOfYear | Quarter & Year   |   QuarternYear |   QuarterOffset | QuarterCompleted   |   MonthOfYear |   DayOfMonth | Month Name   | MonthShortName   | Month Initial   | Month & Year   |   MonthnYear |   MonthOffset | MonthCompleted   | MonthEnding             |   DateInt |   DayOfWeek | DayOfWeekName   | Weekday Initial   | Day Type   | Week & Year   |   WeeknYear |   WeekOffset | WeekCompleted   | WeekEnding              | IsAfterToday   | IsWorkingDay   | IsHoliday   | IsBusinessDay   |   Period | Period Start            |
|:------------------------|-------:|-------------:|:----------------|----------------:|:-----------------|---------------:|----------------:|:-------------------|--------------:|-------------:|:-------------|:-----------------|:----------------|:---------------|-------------:|--------------:|:-----------------|:------------------------|----------:|------------:|:----------------|:------------------|:-----------|:--------------|------------:|-------------:|:----------------|:------------------------|:---------------|:---------------|:------------|:----------------|---------:|:------------------------|
| 2020-01-01 00:00:00.000 |   2020 |           -1 | True            |               1 | Q1 2020          |       20200100 |              -6 | True               |             1 |            1 | January      | Jan              | J​               | Jan 2020       |     20200100 |           -20 | True             | 2020-01-31 00:00:00.000 |  20200101 |           3 | Wednesday       | W​​​                 | Weekday    | 2020-01       |    20200100 |          -90 | True            | 2020-01-05 00:00:00.000 | False          | True           | Unknown     | True            |   202001 | 2020-01-01 00:00:00.000 |
| 2020-01-02 00:00:00.000 |   2020 |           -1 | True            |               1 | Q1 2020          |       20200100 |              -6 | True               |             1 |            2 | January      | Jan              | J​               | Jan 2020       |     20200100 |           -20 | True             | 2020-01-31 00:00:00.000 |  20200102 |           4 | Thursday        | T​​​​                 | Weekday    | 2020-01       |    20200100 |          -90 | True            | 2020-01-05 00:00:00.000 | False          | True           | Unknown     | True            |   202001 | 2020-01-01 00:00:00.000 |
| 2020-01-03 00:00:00.000 |   2020 |           -1 | True            |               1 | Q1 2020          |       20200100 |              -6 | True               |             1 |            3 | January      | Jan              | J​               | Jan 2020       |     20200100 |           -20 | True             | 2020-01-31 00:00:00.000 |  20200103 |           5 | Friday          | F​​​​​                 | Weekday    | 2020-01       |    20200100 |          -90 | True            | 2020-01-05 00:00:00.000 | False          | True           | Unknown     | True            |   202001 | 2020-01-01 00:00:00.000 |
| 2020-01-06 00:00:00.000 |   2020 |           -1 | True            |               1 | Q1 2020          |       20200100 |              -6 | True               |             1 |            6 | January      | Jan              | J​               | Jan 2020       |     20200100 |           -20 | True             | 2020-01-31 00:00:00.000 |  20200106 |           1 | Monday          | M​                 | Weekday    | 2020-02       |    20200200 |          -89 | True            | 2020-01-12 00:00:00.000 | False          | True           | Unknown     | True            |   202001 | 2020-01-01 00:00:00.000 |
| 2020-01-07 00:00:00.000 |   2020 |           -1 | True            |               1 | Q1 2020          |       20200100 |              -6 | True               |             1 |            7 | January      | Jan              | J​               | Jan 2020       |     20200100 |           -20 | True             | 2020-01-31 00:00:00.000 |  20200107 |           2 | Tuesday         | T​​                 | Weekday    | 2020-02       |    20200200 |          -89 | True            | 2020-01-12 00:00:00.000 | False          | True           | Unknown     | True            |   202001 | 2020-01-01 00:00:00.000 |
| 2020-01-08 00:00:00.000 |   2020 |           -1 | True            |               1 | Q1 2020          |       20200100 |              -6 | True               |             1 |            8 | January      | Jan              | J​               | Jan 2020       |     20200100 |           -20 | True             | 2020-01-31 00:00:00.000 |  20200108 |           3 | Wednesday       | W​​​                 | Weekday    | 2020-02       |    20200200 |          -89 | True            | 2020-01-12 00:00:00.000 | False          | True           | Unknown     | True            |   202001 | 2020-01-01 00:00:00.000 |
| 2020-01-09 00:00:00.000 |   2020 |           -1 | True            |               1 | Q1 2020          |       20200100 |              -6 | True               |             1 |            9 | January      | Jan              | J​               | Jan 2020       |     20200100 |           -20 | True             | 2020-01-31 00:00:00.000 |  20200109 |           4 | Thursday        | T​​​​                 | Weekday    | 2020-02       |    20200200 |          -89 | True            | 2020-01-12 00:00:00.000 | False          | True           | Unknown     | True            |   202001 | 2020-01-01 00:00:00.000 |
| 2020-01-10 00:00:00.000 |   2020 |           -1 | True            |               1 | Q1 2020          |       20200100 |              -6 | True               |             1 |           10 | January      | Jan              | J​               | Jan 2020       |     20200100 |           -20 | True             | 2020-01-31 00:00:00.000 |  20200110 |           5 | Friday          | F​​​​​                 | Weekday    | 2020-02       |    20200200 |          -89 | True            | 2020-01-12 00:00:00.000 | False          | True           | Unknown     | True            |   202001 | 2020-01-01 00:00:00.000 |
| 2020-01-13 00:00:00.000 |   2020 |           -1 | True            |               1 | Q1 2020          |       20200100 |              -6 | True               |             1 |           13 | January      | Jan              | J​               | Jan 2020       |     20200100 |           -20 | True             | 2020-01-31 00:00:00.000 |  20200113 |           1 | Monday          | M​                 | Weekday    | 2020-03       |    20200300 |          -88 | True            | 2020-01-19 00:00:00.000 | False          | True           | Unknown     | True            |   202001 | 2020-01-01 00:00:00.000 |
| 2020-01-14 00:00:00.000 |   2020 |           -1 | True            |               1 | Q1 2020          |       20200100 |              -6 | True               |             1 |           14 | January      | Jan              | J​               | Jan 2020       |     20200100 |           -20 | True             | 2020-01-31 00:00:00.000 |  20200114 |           2 | Tuesday         | T​​                 | Weekday    | 2020-03       |    20200300 |          -88 | True            | 2020-01-19 00:00:00.000 | False          | True           | Unknown     | True            |   202001 | 2020-01-01 00:00:00.000 |


Table: Categories
|   S | Unit   | Cat_No   | Cat_Name   | Account   |
|----:|:-------|:---------|:-----------|:----------|
|   1 | WAS    | WAS01    | Supplies   | 4000-100  |
|   2 | WAS    | WAS02    | Finished   | 4000-110  |
|   3 | WAS    | WAS03    | Others     | 4000-120  |
|   4 | NY     | NY01     | Supplies   | 4000-100  |
|   5 | NY     | NY02     | Finished   | 4000-110  |
|   6 | NY     | NY03     | Others     | 4000-120  |


Table: Customers
|   s1 | Unit   | Cust_No   | Cust_Name   |
|-----:|:-------|:----------|:------------|
|    1 | WAS    | A001      | Atlas       |
|    2 | WAS    | B001      | Brauly      |
|    3 | WAS    | C001      | Costo       |
|    4 | NY     | A002      | Alpha       |
|    5 | NY     | B002      | Bibo        |
|    6 | NY     | C002      | Crane       |


Table: Sales
| Cust_No   | Cat_No   |   Period |   Sales |
|:----------|:---------|---------:|--------:|
| A001      | WAS01    |   202108 |    1000 |
| A001      | WAS01    |   202108 |     500 |
| A001      | WAS01    |   202108 |     300 |
| A001      | WAS01    |   202107 |     200 |
| A001      | WAS01    |   202107 |    1000 |
| A001      | WAS01    |   202106 |     765 |
| A001      | WAS01    |   202106 |     567 |
| A001      | WAS02    |   202108 |     200 |
| A001      | WAS02    |   202108 |     550 |
| A001      | WAS02    |   202107 |     335 |


Table: Unit
|   S2 | Unit   | Desc       |
|-----:|:-------|:-----------|
|    1 | WAS    | Washington |
|    2 | NY     | New York   |

 


tables: name: Accounts
data: Accounts.csv
name: Budget_Period
data: Budget_Period.csv
name: Calendar
data: Calendar.csv
name: Categories
data: Categories.csv
name: Customers
data: Customers.csv
name: Sales
data: Sales.csv
name: Unit
data: Unit.csv
label: Budget_Period
Period
Calendar
Period
Sales
Cust_No
Customers
Cust_No
Sales
Period
Calendar
Period
Categories
Account
Accounts
Account_No
Budget_Period
Account_No
Accounts
Account_No
Sales
Cat_No
Categories
Cat_No
Customers
Unit
Unit
Unit
output: {
    "joins": [
        {
            "from_table": "Budget_Period",
            "from_column": "Period",
            "to_table": "Calendar",
            "to_column": "Period"
        },
        {
            "from_table": "Sales",
            "from_column": "Cust_No",
            "to_table": "Customers",
            "to_column": "Cust_No"
        },
        {
            "from_table": "Sales",
            "from_column": "Period",
            "to_table": "Calendar",
            "to_column": "Period"
        },
        {
            "from_table": "Categories",
            "from_column": "Account",
            "to_table": "Accounts",
            "to_column": "Account_No"
        },
        {
            "from_table": "Budget_Period",
            "from_column": "Account_No",
            "to_table": "Accounts",
            "to_column": "Account_No"
        },
        {
            "from_table": "Sales",
            "from_column": "Cat_No",
            "to_table": "Categories",
            "to_column": "Cat_No"
        },
        {
            "from_table": "Customers",
            "from_column": "Unit",
            "to_table": "Unit",
            "to_column": "Unit"
        }
    ]
}