db_id
stringclasses 146
values | schema
stringclasses 146
values | question_en
stringlengths 3
224
| hardness
stringclasses 4
values | schema_llm
stringclasses 146
values | query_llm
stringlengths 18
631
| selector
stringlengths 18
266
| schema_llm_ct
stringclasses 147
values | schema_llm_columns_min
stringclasses 147
values | schema_llm_columns_min_ct
stringclasses 147
values | schema_llm_all_min
stringclasses 147
values | schema_llm_all_min_ct
stringclasses 147
values | schema_dict
stringclasses 146
values | selector_correct
stringlengths 20
266
| schema_llm_t
stringclasses 147
values | schema_llm_columns_min_t
stringclasses 147
values | schema_llm_all_min_t
stringclasses 147
values |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where is the best restaurant in bay area for american food ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "bay area" AND restaurant.food_type = "american" AND restaurant.rating = ( SELECT MAX ( restaurant.rating ) FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name WHERE geographic.region = "bay area" AND restaurant.food_type = "american" ); | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| what is the best restaurant in bay area for american food ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "bay area" AND restaurant.food_type = "american" AND restaurant.rating = ( SELECT MAX ( restaurant.rating ) FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name WHERE geographic.region = "bay area" AND restaurant.food_type = "american" ); | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| what is the best american restaurant in the bay area ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "bay area" AND restaurant.food_type = "american" AND restaurant.rating = ( SELECT MAX ( restaurant.rating ) FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name WHERE geographic.region = "bay area" AND restaurant.food_type = "american" ); | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where is the best american restaurant in the bay area ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "bay area" AND restaurant.food_type = "american" AND restaurant.rating = ( SELECT MAX ( restaurant.rating ) FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name WHERE geographic.region = "bay area" AND restaurant.food_type = "american" ); | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| what is the best american in the bay area ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "bay area" AND restaurant.food_type = "american" AND restaurant.rating = ( SELECT MAX ( restaurant.rating ) FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name WHERE geographic.region = "bay area" AND restaurant.food_type = "american" ); | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me the best restaurant in the bay area for american food ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "bay area" AND restaurant.food_type = "american" AND restaurant.rating = ( SELECT MAX ( restaurant.rating ) FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name WHERE geographic.region = "bay area" AND restaurant.food_type = "american" ); | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me the best restaurant in bay area for american food ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "bay area" AND restaurant.food_type = "american" AND restaurant.rating = ( SELECT MAX ( restaurant.rating ) FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name WHERE geographic.region = "bay area" AND restaurant.food_type = "american" ); | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| what is the best restaurant in the bay area for american food ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "bay area" AND restaurant.food_type = "american" AND restaurant.rating = ( SELECT MAX ( restaurant.rating ) FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name WHERE geographic.region = "bay area" AND restaurant.food_type = "american" ); | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where is the best american in the bay area ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "bay area" AND restaurant.food_type = "american" AND restaurant.rating = ( SELECT MAX ( restaurant.rating ) FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name WHERE geographic.region = "bay area" AND restaurant.food_type = "american" ); | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me the best american in the bay area ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "bay area" AND restaurant.food_type = "american" AND restaurant.rating = ( SELECT MAX ( restaurant.rating ) FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name WHERE geographic.region = "bay area" AND restaurant.food_type = "american" ); | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me the best american restaurant in the bay area ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "bay area" AND restaurant.food_type = "american" AND restaurant.rating = ( SELECT MAX ( restaurant.rating ) FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name WHERE geographic.region = "bay area" AND restaurant.food_type = "american" ); | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me some restaurants good for french food in the yosemite and mono lake area ? | hard | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "yosemite and mono lake area" AND restaurant.food_type = "french" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| what are some good places in the yosemite and mono lake area for french food ? | hard | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "yosemite and mono lake area" AND restaurant.food_type = "french" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me a good restaurant in the yosemite and mono lake area for french food ? | hard | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "yosemite and mono lake area" AND restaurant.food_type = "french" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me a good french restaurant in the yosemite and mono lake area ? | hard | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "yosemite and mono lake area" AND restaurant.food_type = "french" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where is a good place in the yosemite and mono lake area for french food ? | hard | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "yosemite and mono lake area" AND restaurant.food_type = "french" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where are some restaurants good for french food in the yosemite and mono lake area ? | hard | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "yosemite and mono lake area" AND restaurant.food_type = "french" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me a good place in the yosemite and mono lake area for french food ? | hard | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "yosemite and mono lake area" AND restaurant.food_type = "french" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where is a good restaurant in the yosemite and mono lake area for french food ? | hard | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "yosemite and mono lake area" AND restaurant.food_type = "french" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| what are some good restaurants in the yosemite and mono lake area for french food ? | hard | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "yosemite and mono lake area" AND restaurant.food_type = "french" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where is a good french restaurant in the yosemite and mono lake area ? | hard | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "yosemite and mono lake area" AND restaurant.food_type = "french" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where can i eat some good french food in the yosemite and mono lake area ? | hard | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t3.house_number , restaurant.name FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name JOIN LOCATION AS t3 ON restaurant.id = t3.restaurant_id WHERE geographic.region = "yosemite and mono lake area" AND restaurant.food_type = "french" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'geographic': ['city_name', 'region'],
'location': ['restaurant_id', 'house_number']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where are some restaurants good for arabic food in mountain view ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| what are some good places in mountain view for arabic food ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where are some good arabic restaurants in mountain view ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| show me a good arabic restaurant in mountain view ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me a good arabic in mountain view ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me a good arabic restaurant in mountain view ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me a good place in mountain view for arabic food ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where are some good arabics in mountain view ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where is a restaurant in mountain view that serves good arabic food ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| what are some good restaurants in mountain view for arabic food ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me some restaurants good for arabic food in mountain view ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where can i eat some good arabic food in mountain view ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me some good places for arabic in mountain view ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where is a good arabic in mountain view ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me a restaurant in mountain view that serves good arabic food ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me some good arabic restaurants in mountain view ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where are some good places for arabic in mountain view ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me some good arabics in mountain view ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me a good restaurant in mountain view for arabic food ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where is a good arabic restaurant in mountain view ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| what are some good places for arabic in mountain view ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where is a good restaurant in mountain view for arabic food ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where is a good place in mountain view for arabic food ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "mountain view" AND restaurant.food_type = "arabic" AND restaurant.rating > 2.5; | {
'restaurant': ['id', 'name', 'food_type', 'city_name', 'rating'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where can i find a jamerican cuisine in san francisco ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND restaurant.name = "jamerican cuisine"; | {
'restaurant': ['id', 'name', 'city_name'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'CITY_NAME'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where is jamerican cuisine in san francisco ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND restaurant.name = "jamerican cuisine"; | {
'restaurant': ['id', 'name', 'city_name'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'CITY_NAME'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where is a jamerican cuisine in san francisco ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM restaurant JOIN LOCATION AS t2 ON restaurant.id = t2.restaurant_id WHERE t2.city_name = "san francisco" AND restaurant.name = "jamerican cuisine"; | {
'restaurant': ['id', 'name', 'city_name'],
'location': ['restaurant_id', 'house_number', 'city_name']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'RESTAURANT': ['ID', 'NAME', 'CITY_NAME'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where can we find some restaurants in the bay area ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM LOCATION AS t2 JOIN restaurant ON restaurant.id = t2.restaurant_id WHERE restaurant.city_name IN ( SELECT city_name FROM geographic WHERE region = "bay area" ); | {
'location': ['restaurant_id', 'house_number', 'city_name'],
'restaurant': ['id', 'name', 'city_name'],
'geographic': ['city_name', 'region']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME'],
'RESTAURANT': ['ID', 'NAME', 'CITY_NAME'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me some restaurants in the bay area ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM LOCATION AS t2 JOIN restaurant ON restaurant.id = t2.restaurant_id WHERE restaurant.city_name IN ( SELECT city_name FROM geographic WHERE region = "bay area" ); | {
'location': ['restaurant_id', 'house_number', 'city_name'],
'restaurant': ['id', 'name', 'city_name'],
'geographic': ['city_name', 'region']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME'],
'RESTAURANT': ['ID', 'NAME', 'CITY_NAME'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me a restaurant in the bay area ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM LOCATION AS t2 JOIN restaurant ON restaurant.id = t2.restaurant_id WHERE restaurant.city_name IN ( SELECT city_name FROM geographic WHERE region = "bay area" ); | {
'location': ['restaurant_id', 'house_number', 'city_name'],
'restaurant': ['id', 'name', 'city_name'],
'geographic': ['city_name', 'region']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME'],
'RESTAURANT': ['ID', 'NAME', 'CITY_NAME'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| where can i find a restaurant in the bay area ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM LOCATION AS t2 JOIN restaurant ON restaurant.id = t2.restaurant_id WHERE restaurant.city_name IN ( SELECT city_name FROM geographic WHERE region = "bay area" ); | {
'location': ['restaurant_id', 'house_number', 'city_name'],
'restaurant': ['id', 'name', 'city_name'],
'geographic': ['city_name', 'region']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME'],
'RESTAURANT': ['ID', 'NAME', 'CITY_NAME'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me a good restaurant in the bay area ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM LOCATION AS t2 JOIN restaurant ON restaurant.id = t2.restaurant_id WHERE restaurant.city_name IN ( SELECT city_name FROM geographic WHERE region = "region0" ) AND restaurant.rating > 2.5; | {
'location': ['restaurant_id', 'house_number', 'city_name'],
'restaurant': ['id', 'name', 'city_name', 'rating'],
'geographic': ['city_name', 'region']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME'],
'RESTAURANT': ['ID', 'NAME', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| what are some good restaurants in the bay area ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM LOCATION AS t2 JOIN restaurant ON restaurant.id = t2.restaurant_id WHERE restaurant.city_name IN ( SELECT city_name FROM geographic WHERE region = "region0" ) AND restaurant.rating > 2.5; | {
'location': ['restaurant_id', 'house_number', 'city_name'],
'restaurant': ['id', 'name', 'city_name', 'rating'],
'geographic': ['city_name', 'region']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME'],
'RESTAURANT': ['ID', 'NAME', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| give me some good restaurants in the bay area ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM LOCATION AS t2 JOIN restaurant ON restaurant.id = t2.restaurant_id WHERE restaurant.city_name IN ( SELECT city_name FROM geographic WHERE region = "region0" ) AND restaurant.rating > 2.5; | {
'location': ['restaurant_id', 'house_number', 'city_name'],
'restaurant': ['id', 'name', 'city_name', 'rating'],
'geographic': ['city_name', 'region']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME'],
'RESTAURANT': ['ID', 'NAME', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|
restaurants |
CREATE TABLE "GEOGRAPHIC" (
"CITY_NAME" text,
"COUNTY" text,
"REGION" text,
primary key("CITY_NAME")
)
/*
0 rows from GEOGRAPHIC table:
CITY_NAME COUNTY REGION
*/
CREATE TABLE "RESTAURANT" (
"ID" int,
"NAME" text,
"FOOD_TYPE" text,
"CITY_NAME" text,
"RATING" real,
primary key("ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
)
/*
0 rows from RESTAURANT table:
ID NAME FOOD_TYPE CITY_NAME RATING
*/
CREATE TABLE "LOCATION" (
"RESTAURANT_ID" int,
"HOUSE_NUMBER" int,
"STREET_NAME" text,
"CITY_NAME" text,
primary key("RESTAURANT_ID"),
foreign key ("CITY_NAME") references `GEOGRAPHIC`("CITY_NAME")
foreign key ("RESTAURANT_ID") references `RESTAURANT`("RESTAURANT_ID")
)
/*
0 rows from LOCATION table:
RESTAURANT_ID HOUSE_NUMBER STREET_NAME CITY_NAME
*/
| what is a good restaurant in the bay area ? | extra | Table GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
Table LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
Table RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| SELECT t2.house_number , restaurant.name FROM LOCATION AS t2 JOIN restaurant ON restaurant.id = t2.restaurant_id WHERE restaurant.city_name IN ( SELECT city_name FROM geographic WHERE region = "region0" ) AND restaurant.rating > 2.5; | {
'location': ['restaurant_id', 'house_number', 'city_name'],
'restaurant': ['id', 'name', 'city_name', 'rating'],
'geographic': ['city_name', 'region']
} | CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| Table GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
Table LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
Table RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| CREATE TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
CREATE TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
CREATE TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| Table geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
Table location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
Table restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| CREATE TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
CREATE TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
CREATE TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
| {
'GEOGRAPHIC': ['CITY_NAME', 'COUNTY', 'REGION'],
'RESTAURANT': ['ID', 'NAME', 'FOOD_TYPE', 'CITY_NAME', 'RATING'],
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'STREET_NAME', 'CITY_NAME']
} | {
'LOCATION': ['RESTAURANT_ID', 'HOUSE_NUMBER', 'CITY_NAME'],
'RESTAURANT': ['ID', 'NAME', 'CITY_NAME', 'RATING'],
'GEOGRAPHIC': ['CITY_NAME', 'REGION']
} | TABLE GEOGRAPHIC (
GEOGRAPHIC.CITY_NAME (TEXT),
GEOGRAPHIC.COUNTY (TEXT),
GEOGRAPHIC.REGION (TEXT),
)
TABLE LOCATION (
LOCATION.RESTAURANT_ID (INT),
LOCATION.HOUSE_NUMBER (INT),
LOCATION.STREET_NAME (TEXT),
LOCATION.CITY_NAME (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.ID (INT),
RESTAURANT.NAME (TEXT),
RESTAURANT.FOOD_TYPE (TEXT),
RESTAURANT.CITY_NAME (TEXT),
RESTAURANT.RATING (REAL),
)
Possible JOINs:
LOCATION.RESTAURANT_ID = RESTAURANT.RESTAURANT_ID
LOCATION.CITY_NAME = GEOGRAPHIC.CITY_NAME
RESTAURANT.CITY_NAME = GEOGRAPHIC.CITY_NAME
| TABLE GEOGRAPHIC (
GEOGRAPHIC.city_name (TEXT),
GEOGRAPHIC.county (TEXT),
GEOGRAPHIC.region (TEXT),
)
TABLE LOCATION (
LOCATION.restaurant_id (INT),
LOCATION.house_number (INT),
LOCATION.street_name (TEXT),
LOCATION.city_name (TEXT),
)
TABLE RESTAURANT (
RESTAURANT.id (INT),
RESTAURANT.name (TEXT),
RESTAURANT.food_type (TEXT),
RESTAURANT.city_name (TEXT),
RESTAURANT.rating (REAL),
)
Possible JOINs:
LOCATION.restaurant_id = RESTAURANT.restaurant_id
LOCATION.city_name = GEOGRAPHIC.city_name
RESTAURANT.city_name = GEOGRAPHIC.city_name
| TABLE geographic (
geographic.city_name (TEXT),
geographic.county (TEXT),
geographic.region (TEXT),
)
TABLE location (
location.restaurant_id (INT),
location.house_number (INT),
location.street_name (TEXT),
location.city_name (TEXT),
)
TABLE restaurant (
restaurant.id (INT),
restaurant.name (TEXT),
restaurant.food_type (TEXT),
restaurant.city_name (TEXT),
restaurant.rating (REAL),
)
Possible JOINs:
location.restaurant_id = restaurant.restaurant_id
location.city_name = geographic.city_name
restaurant.city_name = geographic.city_name
|