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
| Account          | Balance Sheet Hier   |   Account PK |
|:-----------------|:---------------------|-------------:|
| 111 - Bank 1     | Cash                 |          111 |
| 112 - Bank 2     | Cash                 |          112 |
| 113 - Bank 3     | Cash                 |          113 |
| 211 - Customer 1 | AR - foreign         |          211 |
| 212 - Customer 2 | AR - domestic        |          212 |
| 213 - Customer 3 | AR - domestic        |          213 |
| 311 - Vendor 1   | AP - domestic        |          311 |
| 312 - Vendor 2   | AP - foreign         |          312 |
| 313 - Vendor 3   | AP - foreign         |          313 |
| 411 - Loan       | Short-term loan      |          411 |


Table: Balance Sheet Hierarchy
| Lev1        | Lev2                      | Lev3                  |
|:------------|:--------------------------|:----------------------|
| Assets      | Cash and Cash equivalents | Cash                  |
| Assets      | Cash and Cash equivalents | Deposits              |
| Assets      | Accounts Receivable       | AR - domestic         |
| Assets      | Accounts Receivable       | AR - foreign          |
| Assets      | Accounts Receivable       | Advances to suppliers |
| Assets      | Equipment                 | Equipment             |
| Liabilities | Accounts Payable          | AP - domestic         |
| Liabilities | Accounts Payable          | AP - foreign          |
| Liabilities | Loan                      | Short-term loan       |
| Equity      | Equity                    | Equity                |


Table: Calendar
| Date                    |   YearMonth |
|:------------------------|------------:|
| 2020-01-01 00:00:00.000 |      202001 |
| 2020-01-02 00:00:00.000 |      202001 |
| 2020-01-03 00:00:00.000 |      202001 |
| 2020-01-04 00:00:00.000 |      202001 |
| 2020-01-05 00:00:00.000 |      202001 |
| 2020-01-06 00:00:00.000 |      202001 |
| 2020-01-07 00:00:00.000 |      202001 |
| 2020-01-08 00:00:00.000 |      202001 |
| 2020-01-09 00:00:00.000 |      202001 |
| 2020-01-10 00:00:00.000 |      202001 |


Table: Imke
| Lev1        | Lev2                      | Lev3                  |   Key | Tipping   |
|:------------|:--------------------------|:----------------------|------:|:----------|
| Assets      | Cash and Cash equivalents | Cash                  |   111 |           |
| Assets      | Cash and Cash equivalents | Cash                  |   112 |           |
| Assets      | Cash and Cash equivalents | Cash                  |   113 |           |
| Assets      | Accounts Receivable       | AR - domestic         |   212 |           |
| Assets      | Accounts Receivable       | AR - domestic         |   213 |           |
| Assets      | Accounts Receivable       | AR - foreign          |   211 |           |
| Assets      | Accounts Receivable       | Advances to suppliers |   313 | -1        |
| Assets      | Accounts Receivable       | Advances to suppliers |   312 | -1        |
| Liabilities | Accounts Payable          | AP - foreign          |   312 | 1         |
| Liabilities | Accounts Payable          | AP - foreign          |   313 | 1         |


Table: Transactions
| Date                    |   Account |   Amt |
|:------------------------|----------:|------:|
| 2020-01-01 00:00:00.000 |       111 |   100 |
| 2020-01-01 00:00:00.000 |       113 |  1000 |
| 2020-01-01 00:00:00.000 |       112 |   100 |
| 2020-02-01 00:00:00.000 |       111 |   -20 |
| 2020-02-01 00:00:00.000 |       113 |    50 |
| 2020-01-01 00:00:00.000 |       211 |   100 |
| 2020-02-01 00:00:00.000 |       212 |    50 |
| 2020-02-01 00:00:00.000 |       213 |    30 |
| 2020-02-02 00:00:00.000 |       511 |   110 |
| 2020-01-01 00:00:00.000 |       511 | -1300 |

 


tables: name: Accounts
data: Accounts.csv
name: Balance Sheet Hierarchy
data: Balance Sheet Hierarchy.csv
name: Calendar
data: Calendar.csv
name: Imke
data: Imke.csv
name: Transactions
data: Transactions.csv
label: Accounts
Balance Sheet Hier
Balance Sheet Hierarchy
Lev3
Transactions
Account
Accounts
Account PK
Imke
Key
Accounts
Account PK
output: {
    "joins": [
        {
            "from_table": "Accounts",
            "from_column": "Balance Sheet Hier",
            "to_table": "Balance Sheet Hierarchy",
            "to_column": "Lev3"
        },
        {
            "from_table": "Transactions",
            "from_column": "Account",
            "to_table": "Accounts",
            "to_column": "Account PK"
        },
        {
            "from_table": "Imke",
            "from_column": "Key",
            "to_table": "Accounts",
            "to_column": "Account PK"
        }
    ]
}