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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT advisor , count(*) FROM Student GROUP BY advisor |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT advisor FROM Student GROUP BY advisor 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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT advisor FROM Student GROUP BY advisor 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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT count(*) FROM Has_allergy WHERE Allergy = "Cat" |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT count(*) FROM Has_allergy WHERE Allergy = "Cat" |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*) >= 2 |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*) >= 2 |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT count(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = "F" AND T1.allergy = "Milk" OR T1.allergy = "Eggs" |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT count(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = "F" AND T1.allergy = "Milk" OR T1.allergy = "Eggs" |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = "food" |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = "food" |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT Allergy FROM Has_allergy GROUP BY Allergy 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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT Allergy FROM Has_allergy GROUP BY Allergy 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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT Allergy , count(*) FROM Has_allergy GROUP BY Allergy |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT Allergy , count(*) FROM Has_allergy GROUP BY Allergy |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT T2.allergytype , count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT T2.allergytype , count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT lname , age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = "Milk" INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = "Cat") |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT lname , age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = "Milk" INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = "Cat") |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT T1.Allergy , T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = "Lisa" ORDER BY T1.Allergy |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT T1.Allergy , T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = "Lisa" ORDER BY T1.Allergy |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT fname , sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = "Milk" EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = "Cat") |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT fname , sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = "Milk" EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = "Cat") |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT avg(age) FROM Student WHERE StuID IN ( SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food" INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "animal") |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT avg(age) FROM Student WHERE StuID IN ( SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food" INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "animal") |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT fname , lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food") |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT fname , lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food") |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT count(*) FROM Student WHERE sex = "M" AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food") |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT count(*) FROM Student WHERE sex = "M" AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food") |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT DISTINCT T1.fname , T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = "Milk" OR T2.Allergy = "Cat" |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT DISTINCT T1.fname , T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = "Milk" OR T2.Allergy = "Cat" |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food" OR T2.allergytype = "animal") |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food" OR T2.allergytype = "animal") |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT fname , major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy = "Soy") |
[
{
"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 Allergy_Type (\n Allergy \t\t VARCHAR(20)... | You 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 Allergy_Type (
Allergy VARCHAR(20) PRIMARY KEY,
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20),
FOREIGN KEY(StuID) REFERENCES Student(StuID),
FOREIGN KEY(Allergy) REFERENCES Allergy_Type(All... | SELECT fname , major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy = "Soy") |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT billing_country , COUNT(*) FROM invoices GROUP BY billing_country ORDER BY count(*) DESC 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT billing_country , COUNT(*) FROM invoices GROUP BY billing_country ORDER BY count(*) DESC 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT billing_country , SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT billing_country , SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT billing_country , AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT billing_country , AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T1.first_name , T1.last_name , COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T1.first_name , T1.last_name , COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T1.first_name , T1.last_name , SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T1.first_name , T1.last_name , SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T1.name , COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY count(*) DESC 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T1.name , COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY count(*) DESC 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT title FROM albums; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT title FROM albums; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT title FROM albums ORDER BY title; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT title FROM albums ORDER BY title; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total LIMIT 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total LIMIT 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT sum(total) FROM invoices WHERE billing_city = "Chicago" AND billing_state = "IL"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT sum(total) FROM invoices WHERE billing_city = "Chicago" AND billing_state = "IL"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT COUNT(*) FROM invoices WHERE billing_city = "Chicago" AND billing_state = "IL"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT COUNT(*) FROM invoices WHERE billing_city = "Chicago" AND billing_state = "IL"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = "USA" GROUP BY billing_state; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = "USA" GROUP BY billing_state; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = "USA" GROUP BY billing_state 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = "USA" GROUP BY billing_state 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT billing_state , COUNT(*) , SUM(total) FROM invoices WHERE billing_state = "CA"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT billing_state , COUNT(*) , SUM(total) FROM invoices WHERE billing_state = "CA"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = "Aerosmith"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = "Aerosmith"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT count(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = "Billy Cobham"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT count(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = "Billy Cobham"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT company FROM customers WHERE first_name = "Eduardo" AND last_name = "Martins"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT company FROM customers WHERE first_name = "Eduardo" AND last_name = "Martins"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT email , phone FROM customers WHERE first_name = "Astrid" AND last_name = "Gruber"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT email , phone FROM customers WHERE first_name = "Astrid" AND last_name = "Gruber"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT count(*) FROM customers WHERE city = "Prague"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT count(*) FROM customers WHERE city = "Prague"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT count(*) FROM customers WHERE state = "CA"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT count(*) FROM customers WHERE state = "CA"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT country FROM customers WHERE first_name = "Roberto" AND last_name = "Almeida"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT country FROM customers WHERE first_name = "Roberto" AND last_name = "Almeida"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%' |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%' |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT count(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = "Steve" AND T1.last_name = "Johnson"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT count(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = "Steve" AND T1.last_name = "Johnson"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT title , phone , hire_date FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT title , phone , hire_date FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T2.first_name , T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = "Nancy" AND T1.last_name = "Edwards"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T2.first_name , T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = "Nancy" AND T1.last_name = "Edwards"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT address FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT address FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T1.first_name , T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT T1.first_name , T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id 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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT count(*) FROM employees WHERE country = "Canada"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT count(*) FROM employees WHERE country = "Canada"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT phone FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT phone FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards"; |
[
{
"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 artists\n(\n id INTEGER PRIMARY KEY AUTOINCRE... | You 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 artists
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(120)
)
CREATE TABLE sqlite_sequence(name,seq)
CREATE TABLE albums
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(160) NOT NULL,
artist_id INTEGER NOT NULL,
FOREIGN KEY (artist_id) REFERENCES ... | SELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.