messages listlengths 3 3 | system stringclasses 1
value | user stringlengths 326 8.38k | assistant stringlengths 18 577 |
|---|---|---|---|
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT count(*) , T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects) |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects) |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo) |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo) |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo) |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo) |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo) |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo) |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects) |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects) |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT T1.Name , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name , T1.Name |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT T1.Name , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name , T1.Name |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT T2.name , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT min(hours) FROM projects) |
[
{
"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 Scientists (\n SSN int,\n Name Char(30) not nu... | 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 Scientists (
SSN int,
Name Char(30) not null,
Primary Key (SSN)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50) not null,
Hours int,
Primary Key (Code)
)
CREATE TABLE AssignedTo (
Scientist int not null,
Project char(4) not null,
Primary Key (Scientist, Proje... | SELECT T2.name , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT min(hours) FROM projects) |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Name FROM WINE ORDER BY Score 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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Name FROM WINE ORDER BY Score 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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Winery FROM WINE ORDER BY SCORE 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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Winery FROM WINE ORDER BY SCORE 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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Name FROM WINE WHERE YEAR = "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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Name FROM WINE WHERE YEAR = "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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Grape , Appelation FROM WINE |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Grape , Appelation FROM WINE |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Name , Score FROM WINE |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Name , Score FROM WINE |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Area , County FROM APPELLATIONS |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Area , County FROM APPELLATIONS |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Price FROM WINE WHERE YEAR < 2010 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Price FROM WINE WHERE YEAR < 2010 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Name FROM WINE WHERE score > 90 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Name FROM WINE WHERE score > 90 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "North Coast" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "North Coast" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT count(*) FROM WINE WHERE Winery = "Robert Biale" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT count(*) FROM WINE WHERE Winery = "Robert Biale" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT count(*) FROM APPELLATIONS WHERE County = "Napa" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT count(*) FROM APPELLATIONS WHERE County = "Napa" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Sonoma" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Sonoma" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T2.Name , T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T2.Name , T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT max(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "Central Coast" AND T2.year < 2005 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT max(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "Central Coast" AND T2.year < 2005 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White" AND T2.score > 90 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White" AND T2.score > 90 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" AND T2.price > 50 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" AND T2.price > 50 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Monterey" AND T2.price < 50 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Monterey" AND T2.price < 50 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT count(*) , Grape FROM WINE GROUP BY Grape |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT count(*) , Grape FROM WINE GROUP BY Grape |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT avg(Price) , YEAR FROM WINE GROUP BY YEAR |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT avg(Price) , YEAR FROM WINE GROUP BY YEAR |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT min(Price) FROM wine WHERE Winery = "John Anthony") |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT min(Price) FROM wine WHERE Winery = "John Anthony") |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT Name FROM WINE ORDER BY Name |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT Name FROM WINE ORDER BY Name |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT Name FROM WINE ORDER BY price |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT Name FROM WINE ORDER BY price |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING T2.year < 2010 ORDER BY count(*) 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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING T2.year < 2010 ORDER BY count(*) 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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) 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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) 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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100 |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT AVG(Price) , AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = "Zinfandel" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT AVG(Price) , AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = "Zinfandel" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT max(Price) , max(Score) FROM WINE WHERE Appelation = "St. Helena" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT max(Price) , max(Score) FROM WINE WHERE Appelation = "St. Helena" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT max(Price) , max(Score) , YEAR FROM WINE GROUP BY YEAR |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT max(Price) , max(Score) , YEAR FROM WINE GROUP BY YEAR |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT avg(Price) , avg(Score) , Appelation FROM WINE GROUP BY Appelation |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT avg(Price) , avg(Score) , Appelation FROM WINE GROUP BY Appelation |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Winery FROM WINE GROUP BY Winery HAVING count(*) >= 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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Winery FROM WINE GROUP BY Winery HAVING count(*) >= 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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING count(*) <= 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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING count(*) <= 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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Name FROM WINE WHERE YEAR < (SELECT min(YEAR) FROM WINE WHERE Winery = "Brander") |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Name FROM WINE WHERE YEAR < (SELECT min(YEAR) FROM WINE WHERE Winery = "Brander") |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Name FROM WINE WHERE Price > (SELECT max(Price) FROM WINE WHERE YEAR = 2006) |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Name FROM WINE WHERE Price > (SELECT max(Price) FROM WINE WHERE YEAR = 2006) |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE = T2.GRAPE WHERE T1.Color = "White" GROUP BY T2.Winery ORDER BY count(*) DESC 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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE = T2.GRAPE WHERE T1.Color = "White" GROUP BY T2.Winery ORDER BY count(*) DESC 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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Grape , Winery , YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Grape , Winery , YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Grape , Appelation , Name FROM WINE WHERE Score > 93 ORDER BY Name |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Grape , Appelation , Name FROM WINE WHERE Score > 93 ORDER BY Name |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = "Central Coast" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = "Central Coast" |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma') |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma') |
[
{
"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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T2.Score > 90 GROUP BY T1.County ORDER BY count(*) 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 \"grapes\" ( \n\t\"ID\" INTEGER PRIMARY KEY, \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 "grapes" (
"ID" INTEGER PRIMARY KEY,
"Grape" TEXT UNIQUE,
"Color" TEXT
)
CREATE TABLE "appellations" (
"No" INTEGER PRIMARY KEY,
"Appelation" TEXT UNIQUE,
"County" TEXT,
"State" TEXT,
"Area" TEXT,
"isAVA" TEXT
)
CREATE TABLE "wine" (
"No" INTEGER,
"Grape" TEXT, ... | SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T2.Score > 90 GROUP BY T1.County ORDER BY count(*) 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 \"station\" (\n\"Station_ID\" int,\n\"Name\" tex... | 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 "station" (
"Station_ID" int,
"Name" text,
"Annual_entry_exit" real,
"Annual_interchanges" real,
"Total_Passengers" real,
"Location" text,
"Main_Services" text,
"Number_of_Platforms" int,
PRIMARY KEY ("Station_ID")
)
CREATE TABLE "train" (
"Train_ID" int,
"Name" text,
"Time" text,
"Ser... | SELECT count(*) FROM station |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.