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: consumers
| Consumer_ID   | City            | State           | Country   |   Latitude |   Longitude | Smoker   | Drink_Level    | Transportation_Method   | Marital_Status   | Children    |   Age | Occupation   | Budget   | Age (groups)   |
|:--------------|:----------------|:----------------|:----------|-----------:|------------:|:---------|:---------------|:------------------------|:-----------------|:------------|------:|:-------------|:---------|:---------------|
| U1001         | San Luis Potosi | San Luis Potosi | Mexico    |    22.14   |   -100.979  | No       | Abstemious     | On Foot                 | Single           | Independent |    23 | Student      | Medium   | 22-25          |
| U1002         | San Luis Potosi | San Luis Potosi | Mexico    |    22.1501 |   -100.983  | No       | Abstemious     | Public                  | Single           | Independent |    22 | Student      | Low      | 22-25          |
| U1003         | San Luis Potosi | San Luis Potosi | Mexico    |    22.1198 |   -100.947  | No       | Social Drinker | Public                  | Single           | Independent |    23 | Student      | Low      | 22-25          |
| U1005         | San Luis Potosi | San Luis Potosi | Mexico    |    22.1835 |   -100.96   | No       | Abstemious     | Public                  | Single           | Independent |    20 | Student      | Medium   | 18-21          |
| U1006         | San Luis Potosi | San Luis Potosi | Mexico    |    22.15   |   -100.983  | Yes      | Social Drinker | Car                     | Single           | Independent |    23 | Student      | Medium   | 22-25          |
| U1007         | San Luis Potosi | San Luis Potosi | Mexico    |    22.1185 |   -100.938  | No       | Casual Drinker | Public                  | Single           | Independent |    23 | Student      | Low      | 22-25          |
| U1008         | San Luis Potosi | San Luis Potosi | Mexico    |    22.123  |   -100.924  | No       | Social Drinker | Public                  | Single           | Independent |    23 | Student      | Low      | 22-25          |
| U1011         | Ciudad Victoria | Tamaulipas      | Mexico    |    23.725  |    -99.1529 | No       | Abstemious     | Public                  | Single           | Independent |    23 | Student      | Medium   | 22-25          |
| U1012         | Cuernavaca      | Morelos         | Mexico    |    18.8133 |    -99.2437 | No       | Casual Drinker | Public                  | Single           | Independent |    24 | Student      | Medium   | 22-25          |
| U1014         | Ciudad Victoria | Tamaulipas      | Mexico    |    23.7516 |    -99.1701 | No       | Abstemious     | Public                  | Single           | Independent |    22 | Student      | Medium   | 22-25          |


Table: consumer_preferences
| Consumer_ID   | Preferred_Cuisine   |
|:--------------|:--------------------|
| U1135         | Organic             |
| U1135         | Steaks              |
| U1135         | Middle Eastern      |
| U1135         | Mediterranean       |
| U1135         | British             |
| U1135         | Austrian            |
| U1135         | Israeli             |
| U1135         | Doughnuts           |
| U1135         | Pizzeria            |
| U1135         | Seafood             |


Table: ratings
| Consumer_ID   |   Restaurant_ID |   Overall_Rating |   Food_Rating |   Service_Rating |
|:--------------|----------------:|-----------------:|--------------:|-----------------:|
| U1077         |          135085 |                2 |             2 |                2 |
| U1077         |          132825 |                2 |             2 |                2 |
| U1067         |          132584 |                2 |             2 |                2 |
| U1103         |          132613 |                2 |             2 |                2 |
| U1103         |          132733 |                2 |             2 |                2 |
| U1107         |          132584 |                2 |             2 |                2 |
| U1107         |          132733 |                2 |             2 |                2 |
| U1044         |          135088 |                2 |             2 |                2 |
| U1060         |          132564 |                2 |             2 |                2 |
| U1060         |          132717 |                2 |             2 |                2 |


Table: restaurants
|   Restaurant_ID | Name                               | City            | State           | Country   | Zip_Code   |   Latitude |   Longitude | Alcohol_Service   | Smoking_Allowed   | Price   | Franchise   | Area   | Parking   |
|----------------:|:-----------------------------------|:----------------|:----------------|:----------|:-----------|-----------:|------------:|:------------------|:------------------|:--------|:------------|:-------|:----------|
|          132560 | Puesto de Gorditas                 | Ciudad Victoria | Tamaulipas      | Mexico    |            |    23.7523 |    -99.1669 | None              | Yes               | Low     | No          | Open   | Public    |
|          132561 | Cafe Ambar                         | Ciudad Victoria | Tamaulipas      | Mexico    |            |    23.7268 |    -99.1265 | None              | No                | Low     | No          | Closed | None      |
|          132564 | Church's                           | Ciudad Victoria | Tamaulipas      | Mexico    |            |    23.7309 |    -99.1452 | None              | No                | Low     | No          | Closed | None      |
|          132572 | Cafe Chaires                       | San Luis Potosi | San Luis Potosi | Mexico    |            |    22.1416 |   -100.993  | None              | No                | Low     | No          | Closed | Yes       |
|          132584 | Gorditas Doña Tota                 | Ciudad Victoria | Tamaulipas      | Mexico    |            |    23.7524 |    -99.1653 | None              | No                | Medium  | Yes         | Closed | Yes       |
|          132594 | Tacos De Barbacoa Enfrente Del Tec | Ciudad Victoria | Tamaulipas      | Mexico    |            |    23.7522 |    -99.1657 | None              | No                | Low     | No          | Open   | Public    |
|          132608 | Hamburguesas La Perica             | Ciudad Victoria | Tamaulipas      | Mexico    |            |    23.7588 |    -99.1651 | None              | Yes               | Low     | Yes         | Open   | Public    |
|          132609 | Pollo Frito Buenos Aires           | Ciudad Victoria | Tamaulipas      | Mexico    |            |    23.7603 |    -99.1659 | None              | No                | Low     | Yes         | Closed | Yes       |
|          132613 | Carnitas Mata                      | Ciudad Victoria | Tamaulipas      | Mexico    |            |    23.7529 |    -99.1651 | None              | Yes               | Medium  | Yes         | Closed | Yes       |
|          132626 | La Perica Hamburguesa              | Ciudad Victoria | Tamaulipas      | Mexico    |            |    23.7376 |    -99.1351 | None              | No                | Medium  | Yes         | Closed | Yes       |


Table: restaurant_cuisines
|   Restaurant_ID | Cuisine   |
|----------------:|:----------|
|          132560 | Regional  |
|          132572 | Cafeteria |
|          132583 | American  |
|          132584 | Mexican   |
|          132594 | Mexican   |
|          132608 | Mexican   |
|          132609 | Fast Food |
|          132613 | Mexican   |
|          132626 | Italian   |
|          132630 | Mexican   |

 


tables: name: consumers
data: consumers.csv
name: consumer_preferences
data: consumer_preferences.csv
name: ratings
data: ratings.csv
name: restaurants
data: restaurants.csv
name: restaurant_cuisines
data: restaurant_cuisines.csv
label: consumer_preferences
Consumer_ID
consumers
Consumer_ID
ratings
Consumer_ID
consumers
Consumer_ID
ratings
Restaurant_ID
restaurants
Restaurant_ID
restaurant_cuisines
Restaurant_ID
restaurants
Restaurant_ID
output: {
    "joins": [
        {
            "from_table": "consumer_preferences",
            "from_column": "Consumer_ID",
            "to_table": "consumers",
            "to_column": "Consumer_ID"
        },
        {
            "from_table": "ratings",
            "from_column": "Consumer_ID",
            "to_table": "consumers",
            "to_column": "Consumer_ID"
        },
        {
            "from_table": "ratings",
            "from_column": "Restaurant_ID",
            "to_table": "restaurants",
            "to_column": "Restaurant_ID"
        },
        {
            "from_table": "restaurant_cuisines",
            "from_column": "Restaurant_ID",
            "to_table": "restaurants",
            "to_column": "Restaurant_ID"
        }
    ]
}