messages listlengths 3 3 | system stringclasses 1
value | user stringlengths 473 37.6k | assistant stringlengths 23 804 |
|---|---|---|---|
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT label FROM generalinfo WHERE food_type = 'european' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT city FROM geographic WHERE region = 'northern california' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT label FROM generalinfo WHERE food_type = '24 hour diner' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT city FROM geographic WHERE county = 'unknown' AND region = 'unknown' LIMIT 5 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT county, region FROM geographic WHERE city = 'Davis' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT street_name FROM location WHERE city = 'Clayton' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT id_restaurant, label FROM generalinfo WHERE city = 'San Francisco' AND review = ( SELECT MAX(review) FROM generalinfo WHERE city = 'San Francisco' ) |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'american' AND city = 'carmel' AND review = ( SELECT MIN(review) FROM generalinfo WHERE food_type = 'american' AND city = 'carmel' ) |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT CAST(SUM(IIF(food_type = 'american food', 1, 0)) AS REAL) * 100 / COUNT(id_restaurant) FROM generalinfo WHERE city = 'dublin' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.street_num, T2.street_name, T1.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.label = 'Albert''s Café' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T1.id_restaurant FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'Oakland' AND T2.street_name = '19th St' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T1.food_type FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_num = 106 AND T2.street_name = 'e 25th ave' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant INNER JOIN geographic AS T3 ON T2.city = T3.city WHERE T3.region = 'unknown' LIMIT 3 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T1.label FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_num = 104 AND T1.city = 'campbell' AND T2.street_name = 'san tomas aquino road' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.food_type = 'thai' AND T1.city = 'albany' AND T2.street_name = 'san pablo ave' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T1.county, T1.region, T2.label FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.label = 'plearn-thai cuisine' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.label FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'lake tahoe' AND T1.county = 'el dorado county' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT DISTINCT T2.county, T2.region FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.street_name = 'E. El Camino Real' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T1.id_restaurant FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'berkeley' AND T2.street_name = 'shattuck ave' AND T1.food_type = 'Indian restaurant' ORDER BY T1.review LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT CAST(SUM(IIF(T2.review > 4, 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 RIGHT JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'bay area' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT city FROM geographic WHERE county = 'san mateo county' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(id_restaurant) AS cnt FROM generalinfo WHERE review > 4 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT street_name FROM location GROUP BY street_name ORDER BY COUNT(street_name) DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT label FROM generalinfo WHERE food_type = 'chicken' ORDER BY review DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT county FROM geographic WHERE city = 'el cerrito' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(id_restaurant) FROM location WHERE street_name = 'irving' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T1.label FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'marin county' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.label = 'peking duck restaurant' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.street_name FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.county = 'alameda county' GROUP BY T2.street_name HAVING COUNT(T2.id_restaurant) > 10 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT DISTINCT T1.region FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'greek' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.street_name FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.region = 'unknown' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.review FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'murray ave' AND T1.street_num = 8440 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.food_type FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.county = 'Monterey' GROUP BY T2.food_type ORDER BY COUNT(T2.food_type) DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.food_type = 'burgers' GROUP BY T2.street_name ORDER BY COUNT(T2.id_restaurant) DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.region FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.street_num = 1149 AND T1.street_name = 'el camino real' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.label = 'sankee' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(T1.city) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.region = 'northern california' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'park st' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT CAST(SUM(IIF(T1.region = 'bay area', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT AVG(T1.review) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type = 'chinese' GROUP BY T1.id_restaurant ORDER BY AVG(T1.review) DESC |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT street_name FROM location WHERE city = 'San Francisco' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT id_restaurant FROM location WHERE city = 'Danville' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(city) FROM geographic WHERE region = 'bay area' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(T1.label) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'unknown' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'American' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T1.label FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'Santa Cruz county' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T1.review FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'Broadway' AND T2.street_num = 430 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.street_num, T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant ORDER BY T1.review DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type = 'Italian' GROUP BY T2.county ORDER BY COUNT(T1.id_restaurant) DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT CAST(SUM(IIF(region = 'Napa Valley', 1, 0)) AS REAL) * 100 / COUNT(region) FROM geographic |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(city) FROM geographic WHERE region = 'bay area' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT city FROM geographic WHERE county = 'unknown' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT city FROM geographic WHERE region = 'bay area' AND county = 'santa clara county' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT id_restaurant FROM location WHERE city = 'sunnyvale' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(city) FROM location WHERE street_name = 'railroad' AND street_num < 1000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT label FROM generalinfo WHERE food_type = '24 hour diner' AND city = 'san francisco' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.review FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'santa cruz' AND T1.street_name = 'ocean st' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.street_num FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.review = 2.7 AND T2.city = 'oakland' AND T1.food_type = 'bar' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.food_type = 'bakery' AND T2.city = 'palo alto' AND T1.street_name = 'university ave.' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T1.street_num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'Tulocay winery' AND T2.food_type = 'winery' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.review, T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'hayward' AND T1.street_name = 'mission blvd' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'castro st' AND T1.city = 'mountain view' AND T2.food_type = 'indian' AND T2.label LIKE '%cookhouse%' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.review = 2 AND T1.street_num < 500 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(T1.id_restaurant) AS num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'milpitas' AND T2.food_type = 'asian' AND T1.street_name = 'n milpitas blvd' AND T1.id_restaurant > 385 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.label, T1.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.street_name = 'ocean avenue' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.city, T1.street_num, T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'sanuki restaurant' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.food_type FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_num = 22779 AND T1.street_name = '6th St' AND T2.city = 'hayward' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(T2.food_type = 'american') FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.street_name = 'front' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T1.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.food_type = 'american' AND T1.street_num > 2000 GROUP BY T1.id_restaurant ORDER BY AVG(T2.review) * 0.7 DESC |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT CAST(SUM(IIF(T2.food_type = 'afghani', 1, 0)) AS REAL) * 100 / COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE 1000 <= T1.street_num <= 2000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT label FROM generalinfo WHERE food_type = 'asian' AND city = 'san francisco' AND review = ( SELECT MAX(review) FROM generalinfo WHERE food_type = 'asian' AND city = 'san francisco' ) |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(DISTINCT city) FROM geographic WHERE region = 'monterey' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(id_restaurant) FROM generalinfo WHERE city = 'belmont' AND review > 2 AND food_type = 'deli' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT county FROM geographic WHERE region = 'northern california' GROUP BY county ORDER BY COUNT(city) DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(id_restaurant) FROM location WHERE city = 'concord' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city ORDER BY T1.review DESC LIMIT 4 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'livermore' AND T1.food_type = 'chinese' AND T2.street_name = '1st st' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(T1.city) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'indian' AND T1.region = 'los angeles area' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.food_type FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'bay area' GROUP BY T2.food_type ORDER BY COUNT(T2.food_type) DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.street_name = 'broadway' AND T2.review < 3 AND T1.city = 'oakland' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.region AS num FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.label = 'baskin robbins' GROUP BY T2.region ORDER BY COUNT(T1.city) DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'pizza' AND T1.city = 'san jose' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT COUNT(T2.food_type) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'yosemite and mono lake area' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.street_name, T2.street_num, T2.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant ORDER BY T1.review DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city GROUP BY T2.county ORDER BY COUNT(T1.label) DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T1.region FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city GROUP BY T1.region ORDER BY COUNT(T2.id_restaurant) DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE geographic\n(\n city TEXT not null\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE geographic
(
city TEXT not null
primary key,
county TEXT null,
region TEXT null
)
CREATE TABLE generalinfo
(
id_restaurant INTEGER not null
primary key,
label TEXT null,
food_type TEXT null,
city TEXT null,
... | SELECT T1.street_num, T1.street_name, T1.city FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.review >= 4 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Batting_Style\n(\n Batting_Id INTEGER\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
... | SELECT COUNT(Player_Id) FROM Player WHERE SUBSTR(DOB, 1, 4) > 1985 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Batting_Style\n(\n Batting_Id INTEGER\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
... | SELECT COUNT(Match_Id) FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2008' AND SUBSTR(Match_Date, 7, 1) = '5' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Batting_Style\n(\n Batting_Id INTEGER\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
... | SELECT COUNT(Match_Id) FROM `Match` WHERE Man_of_the_Match = 41 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Batting_Style\n(\n Batting_Id INTEGER\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
... | SELECT Match_Id FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2008' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Batting_Style\n(\n Batting_Id INTEGER\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
... | SELECT COUNT(CASE WHEN T2.Country_Name = 'Australia' THEN T1.Player_Id ELSE NULL END) FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_Id |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Batting_Style\n(\n Batting_Id INTEGER\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
... | SELECT T1.Country_Name FROM Country AS T1 INNER JOIN Player AS T2 ON T2.Country_Name = T1.Country_Id WHERE T2.Country_Name IS NOT NULL ORDER BY T2.DOB LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Batting_Style\n(\n Batting_Id INTEGER\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
... | SELECT T1.Bowling_Skill FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T2.Bowling_skill = T1.Bowling_Id WHERE T2.Player_Name = 'SC Ganguly' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Batting_Style\n(\n Batting_Id INTEGER\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
... | SELECT SUM(CASE WHEN SUBSTR(T1.DOB, 1, 4) > 1985 THEN 1 ELSE 0 END) FROM Player AS T1 INNER JOIN Batting_Style AS T2 ON T1.Batting_hand = T2.Batting_Id WHERE T2.Batting_Hand = 'Right-hand bat' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Batting_Style\n(\n Batting_Id INTEGER\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
... | SELECT T2.Player_Name FROM Country AS T1 INNER JOIN Player AS T2 ON T2.Country_Name = T1.Country_id INNER JOIN Batting_Style AS T3 ON T2.Batting_hand = T3.Batting_Id WHERE T1.Country_Name = 'Australia' AND T3.Batting_Hand = 'Right-hand bat' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Batting_Style\n(\n Batting_Id INTEGER\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
... | SELECT T2.Bowling_Skill FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id INNER JOIN Country AS T3 ON T1.Country_Name = T3.Country_Id WHERE T3.Country_Name = 'Australia' GROUP BY T2.Bowling_Skill |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Batting_Style\n(\n Batting_Id INTEGER\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
... | SELECT MIN(T1.DOB) FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id WHERE T2.Bowling_Skill = 'Legbreak' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Batting_Style\n(\n Batting_Id INTEGER\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
... | SELECT T1.Bowling_Skill FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T2.Bowling_skill = T1.Bowling_Id GROUP BY T1.Bowling_Skill ORDER BY COUNT(T1.Bowling_Skill) DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Batting_Style\n(\n Batting_Id INTEGER\n ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Batting_Style
(
Batting_Id INTEGER
primary key,
Batting_hand TEXT
)
CREATE TABLE Bowling_Style
(
Bowling_Id INTEGER
primary key,
Bowling_skill TEXT
)
CREATE TABLE City
(
City_Id INTEGER
primary key,
City_Name TEXT,
... | SELECT T2.Player_Name FROM Match AS T1 INNER JOIN Player AS T2 ON T2.Player_Id = T1.Man_of_the_Match WHERE T1.Match_Date = '2008-04-18' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.