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: public commune
| adm2code   | adm1code   | adm2_en        | adm2_fr        | adm2_ht   |   IHSI_UNFPA_2019 |   IHSI_UNFPA_2019_female |   IHSI_UNFPA_2019_male |
|:-----------|:-----------|:---------------|:---------------|:----------|------------------:|-------------------------:|-----------------------:|
| HT0111     | HT01       | Port-au-Prince | Port-au-Prince |           |           1227541 |                   648353 |                 579188 |
| HT0112     | HT01       | Delmas         | Delmas         |           |            491434 |                   258526 |                 232908 |
| HT0113     | HT01       | Carrefour      | Carrefour      |           |            635763 |                   333500 |                 302263 |
| HT0114     | HT01       | Petion-Ville   | Pétion-Ville   |           |            468525 |                   241407 |                 227118 |
| HT0115     | HT01       | Kenscoff       | Kenscoff       |           |             71408 |                    35608 |                  35800 |
| HT0116     | HT01       | Gressier       | Gressier       |           |             45323 |                    22541 |                  22782 |
| HT0117     | HT01       | Cite Soleil    | Cité Soleil    |           |            329569 |                   168078 |                 161491 |
| HT0118     | HT01       | Tabarre        | Tabarre        |           |            161983 |                    85544 |                  76439 |
| HT0121     | HT01       | Leogane        | Léogâne        |           |            248433 |                   125081 |                 123352 |
| HT0122     | HT01       | Petit-Goave    | Petit-Goâve    |           |            215052 |                   106311 |                 108741 |


Table: public covid_cases
|   index |   cas_suspects |   cas_confirmes |   deces |   taux_de_letalite |   date_Id | adm1code   |
|--------:|---------------:|----------------:|--------:|-------------------:|----------:|:-----------|
|       0 |             47 |               4 |       0 |                  0 |  20200415 | HT05       |
|       1 |             14 |               1 |       0 |                  0 |  20200415 | HT06       |
|       2 |              2 |               0 |       0 |                  0 |  20200415 | HT08       |
|       3 |             16 |               2 |       0 |                  0 |  20200415 | HT10       |
|       4 |             28 |               0 |       0 |                  0 |  20200415 | HT03       |
|       6 |              7 |               1 |       0 |                  0 |  20200415 | HT09       |
|       8 |              8 |               0 |       0 |                  0 |  20200415 | HT07       |
|       9 |             22 |               4 |       0 |                  0 |  20200415 | HT02       |
|      11 |             47 |               4 |       0 |                  0 |  20200416 | HT05       |
|      13 |             24 |               4 |       0 |                  0 |  20200416 | HT02       |


Table: public date_table
|   date_Id | document_date           |   year |   month | quarter   |   sem |
|----------:|:------------------------|-------:|--------:|:----------|------:|
|  20200701 | 2020-07-01 00:00:00.000 |   2020 |       7 | Quarter3  |    27 |
|  20200702 | 2020-07-02 00:00:00.000 |   2020 |       7 | Quarter3  |    27 |
|  20200703 | 2020-07-03 00:00:00.000 |   2020 |       7 | Quarter3  |    27 |
|  20200704 | 2020-07-04 00:00:00.000 |   2020 |       7 | Quarter3  |    27 |
|  20200705 | 2020-07-05 00:00:00.000 |   2020 |       7 | Quarter3  |    27 |
|  20200706 | 2020-07-06 00:00:00.000 |   2020 |       7 | Quarter3  |    28 |
|  20200707 | 2020-07-07 00:00:00.000 |   2020 |       7 | Quarter3  |    28 |
|  20200708 | 2020-07-08 00:00:00.000 |   2020 |       7 | Quarter3  |    28 |
|  20200709 | 2020-07-09 00:00:00.000 |   2020 |       7 | Quarter3  |    28 |
|  20200710 | 2020-07-10 00:00:00.000 |   2020 |       7 | Quarter3  |    28 |


Table: public department
| adm1code   | adm1_en     | adm1_fr     | adm1_ht   |   IHSI_UNFPA_2019 |   IHSI_UNFPA_Total |
|:-----------|:------------|:------------|:----------|------------------:|-------------------:|
| HT01       | West        | Ouest       | Lwès      |       5.01021e+06 |            5010206 |
| HT02       | South-East  | Sud-Est     | Sidès     |  893901           |             893901 |
| HT03       | North       | Nord        | Nò        |       1.15976e+06 |            1159757 |
| HT04       | North-East  | Nord-Est    | Nòdès     |  444463           |             444467 |
| HT05       | Artibonite  | Artibonite  | Latibonit |       2.04715e+06 |            2047150 |
| HT06       | Centre      | Centre      | Sant      |  845594           |             845596 |
| HT07       | South       | Sud         | Sid       |  791085           |             791084 |
| HT08       | Grande'Anse | Grande'Anse | Grandans  |  481065           |             481066 |
| HT09       | North-West  | Nord-Ouest  | Nòdwès    |  868581           |             868580 |
| HT10       | Nippes      | Nippes      | Nip       |  351593           |             351594 |


Table: public facdesc_table
|   index | facdesc                  |
|--------:|:-------------------------|
|       1 | DISPENSAIRE              |
|       2 | HOPITAL                  |
|       3 | CENTRE DE SANTE SANS LIT |
|       4 | CENTRE DE SANTE AVEC LIT |


Table: public mga_table
|   index | mga_name            |
|--------:|:--------------------|
|       1 | public              |
|       2 | private non profit  |
|       3 | private with profit |
|       4 | private and public  |


Table: public spa
|   index |   factype |   facdesc_1 |   mga |   service_laboratory |   num_beds |   ambulance |   full_time | commune_id   |
|--------:|----------:|------------:|------:|---------------------:|-----------:|------------:|------------:|:-------------|
|       0 |         7 |           1 |     3 |                    1 |          0 |           3 |           5 | HT0111       |
|     117 |         7 |           1 |     2 |                    1 |          0 |           3 |          19 | HT0113       |
|     124 |         7 |           1 |     1 |                    2 |          0 |           3 |           2 | HT0113       |
|     143 |         7 |           1 |     4 |                    1 |          0 |           3 |           8 | HT0114       |
|     150 |         7 |           1 |     3 |                    2 |          0 |           3 |           8 | HT0115       |
|     152 |         7 |           1 |     1 |                    2 |          0 |           3 |           6 | HT0115       |
|     154 |         7 |           1 |     2 |                    2 |          0 |           3 |           4 | HT0115       |
|     155 |         7 |           1 |     4 |                    2 |          0 |           3 |           6 | HT0115       |
|     156 |         7 |           1 |     3 |                    2 |          0 |           3 |          10 | HT0115       |
|     157 |         7 |           1 |     3 |                    2 |          0 |           3 |           6 | HT0115       |

 


tables: name: public commune
data: public commune.csv
name: public covid_cases
data: public covid_cases.csv
name: public date_table
data: public date_table.csv
name: public department
data: public department.csv
name: public facdesc_table
data: public facdesc_table.csv
name: public mga_table
data: public mga_table.csv
name: public spa
data: public spa.csv
label: public commune
adm1code
public department
adm1code
public covid_cases
adm1code
public department
adm1code
public covid_cases
date_Id
public date_table
date_Id
public spa
commune_id
public commune
adm2code
public spa
facdesc_1
public facdesc_table
index
public spa
mga
public mga_table
index
output: {
    "joins": [
        {
            "from_table": "public commune",
            "from_column": "adm1code",
            "to_table": "public department",
            "to_column": "adm1code"
        },
        {
            "from_table": "public covid_cases",
            "from_column": "adm1code",
            "to_table": "public department",
            "to_column": "adm1code"
        },
        {
            "from_table": "public covid_cases",
            "from_column": "date_Id",
            "to_table": "public date_table",
            "to_column": "date_Id"
        },
        {
            "from_table": "public spa",
            "from_column": "commune_id",
            "to_table": "public commune",
            "to_column": "adm2code"
        },
        {
            "from_table": "public spa",
            "from_column": "facdesc_1",
            "to_table": "public facdesc_table",
            "to_column": "index"
        },
        {
            "from_table": "public spa",
            "from_column": "mga",
            "to_table": "public mga_table",
            "to_column": "index"
        }
    ]
}