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 \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC 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 \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC 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 \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT T1.firstname , T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT T1.firstname , T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT count(*) FROM Rooms; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT count(*) FROM Rooms; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT count(*) FROM Rooms WHERE bedType = "King"; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT count(*) FROM Rooms WHERE bedType = "King"; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT bedType , count(*) FROM Rooms GROUP BY bedType; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT bedType , count(*) FROM Rooms GROUP BY bedType; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT roomName FROM Rooms ORDER BY maxOccupancy 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 \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT roomName FROM Rooms ORDER BY maxOccupancy 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 \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT RoomId , roomName FROM Rooms ORDER BY basePrice 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 \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT RoomId , roomName FROM Rooms ORDER BY basePrice 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 \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT roomName , bedType FROM Rooms WHERE decor = "traditional"; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT roomName , bedType FROM Rooms WHERE decor = "traditional"; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT decor , count(*) FROM Rooms WHERE bedType = "King" GROUP BY decor; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT decor , count(*) FROM Rooms WHERE bedType = "King" GROUP BY decor; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT decor , avg(basePrice) , min(basePrice) FROM Rooms GROUP BY decor; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT decor , avg(basePrice) , min(basePrice) FROM Rooms GROUP BY decor; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT roomName FROM Rooms ORDER BY basePrice; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT roomName FROM Rooms ORDER BY basePrice; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT decor , count(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT decor , count(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT roomName FROM Rooms WHERE bedType = "King" OR bedType = "Queen"; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT roomName FROM Rooms WHERE bedType = "King" OR bedType = "Queen"; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT count(DISTINCT bedType) FROM Rooms; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT count(DISTINCT bedType) FROM Rooms; |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT RoomId , roomName FROM Rooms ORDER BY basePrice 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 \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT RoomId , roomName FROM Rooms ORDER BY basePrice 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 \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT roomName FROM Rooms WHERE basePrice > ( SELECT avg(basePrice) FROM Rooms ); |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT roomName FROM Rooms WHERE basePrice > ( SELECT avg(basePrice) FROM Rooms ); |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations) |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations) |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT T2.roomName , count(*) , T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT T2.roomName , count(*) , T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING count(*) > 60 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING count(*) > 60 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "Rooms" (
"RoomId" TEXT PRIMARY KEY,
"roomName" TEXT,
"beds" INTEGER,
"bedType" TEXT,
"maxOccupancy" INTEGER,
"basePrice" INTEGER,
"decor" TEXT
)
CREATE TABLE "Reservations" (
"Code" INTEGER PRIMARY KEY,
"Room" TEXT,
"CheckIn" TEXT,
"CheckOut" TEXT,
"Rate" REAL,... | SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Customer_Master_Index (\nmaster_customer_id INTE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(255),
PRIMARY KEY (master_customer_id)
)
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(15) NOT NULL,
PRIMARY KEY (cmi_c... | SELECT T1.cmi_details FROM Customer_Master_Index AS T1 JOIN CMI_Cross_References AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T2.source_system_code = 'Tax' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Customer_Master_Index (\nmaster_customer_id INTE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(255),
PRIMARY KEY (master_customer_id)
)
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(15) NOT NULL,
PRIMARY KEY (cmi_c... | SELECT T1.cmi_cross_ref_id , T1.source_system_code FROM CMI_Cross_References AS T1 JOIN Council_Tax AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T1.cmi_cross_ref_id HAVING count(*) >= 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 Customer_Master_Index (\nmaster_customer_id INTE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(255),
PRIMARY KEY (master_customer_id)
)
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(15) NOT NULL,
PRIMARY KEY (cmi_c... | SELECT T2.cmi_cross_ref_id , T2.master_customer_id , count(*) FROM Business_Rates AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T2.cmi_cross_ref_id |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Customer_Master_Index (\nmaster_customer_id INTE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(255),
PRIMARY KEY (master_customer_id)
)
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(15) NOT NULL,
PRIMARY KEY (cmi_c... | SELECT T1.source_system_code , T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Benefits_Overpayments AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id ORDER BY T2.council_tax_id |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Customer_Master_Index (\nmaster_customer_id INTE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(255),
PRIMARY KEY (master_customer_id)
)
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(15) NOT NULL,
PRIMARY KEY (cmi_c... | SELECT T1.source_system_code , T1.master_customer_id , T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Parking_Fines AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Customer_Master_Index (\nmaster_customer_id INTE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(255),
PRIMARY KEY (master_customer_id)
)
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(15) NOT NULL,
PRIMARY KEY (cmi_c... | SELECT T1.council_tax_id FROM Rent_Arrears AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id JOIN Customer_Master_Index AS T3 ON T3.master_customer_id = T2.master_customer_id WHERE T3.cmi_details != 'Schmidt , Kertzmann and Lubowitz' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Customer_Master_Index (\nmaster_customer_id INTE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(255),
PRIMARY KEY (master_customer_id)
)
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(15) NOT NULL,
PRIMARY KEY (cmi_c... | SELECT T1.electoral_register_id FROM Electoral_Register AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id WHERE T2.source_system_code = 'Electoral' OR T2.source_system_code = 'Tax' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Customer_Master_Index (\nmaster_customer_id INTE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(255),
PRIMARY KEY (master_customer_id)
)
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(15) NOT NULL,
PRIMARY KEY (cmi_c... | SELECT count(DISTINCT source_system_code) FROM CMI_cross_references |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Customer_Master_Index (\nmaster_customer_id INTE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(255),
PRIMARY KEY (master_customer_id)
)
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(15) NOT NULL,
PRIMARY KEY (cmi_c... | SELECT * FROM customer_master_index ORDER BY cmi_details DESC |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Customer_Master_Index (\nmaster_customer_id INTE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(255),
PRIMARY KEY (master_customer_id)
)
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(15) NOT NULL,
PRIMARY KEY (cmi_c... | SELECT council_tax_id , cmi_cross_ref_id FROM parking_fines |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Customer_Master_Index (\nmaster_customer_id INTE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(255),
PRIMARY KEY (master_customer_id)
)
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(15) NOT NULL,
PRIMARY KEY (cmi_c... | SELECT count(*) FROM rent_arrears |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Customer_Master_Index (\nmaster_customer_id INTE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(255),
PRIMARY KEY (master_customer_id)
)
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(15) NOT NULL,
PRIMARY KEY (cmi_c... | SELECT DISTINCT T2.source_system_code FROM customer_master_index AS T1 JOIN cmi_cross_references AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T1.cmi_details = 'Gottlieb , Becker and Wyman' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Customer_Master_Index (\nmaster_customer_id INTE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(255),
PRIMARY KEY (master_customer_id)
)
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(15) NOT NULL,
PRIMARY KEY (cmi_c... | SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE Customer_Master_Index (\nmaster_customer_id INTE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE Customer_Master_Index (
master_customer_id INTEGER NOT NULL,
cmi_details VARCHAR(255),
PRIMARY KEY (master_customer_id)
)
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id INTEGER NOT NULL,
master_customer_id INTEGER NOT NULL,
source_system_code CHAR(15) NOT NULL,
PRIMARY KEY (cmi_c... | SELECT DISTINCT source_system_code FROM cmi_cross_references WHERE source_system_code LIKE '%en%' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT count(*) FROM party |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT count(*) FROM party |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT Party_Theme , LOCATION FROM party |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT Party_Theme , LOCATION FROM party |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT First_year , Last_year FROM party WHERE Party_Theme = "Spring" OR Party_Theme = "Teqnology" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT First_year , Last_year FROM party WHERE Party_Theme = "Spring" OR Party_Theme = "Teqnology" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT avg(Number_of_hosts) FROM party |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT avg(Number_of_hosts) FROM party |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT LOCATION FROM party ORDER BY Number_of_hosts 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 \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT LOCATION FROM party ORDER BY Number_of_hosts 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 \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT Nationality , COUNT(*) FROM HOST GROUP BY Nationality |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT Nationality , COUNT(*) FROM HOST GROUP BY Nationality |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT Nationality FROM HOST GROUP BY Nationality 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 \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT Nationality FROM HOST GROUP BY Nationality 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 \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT T3.Party_Theme , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT T3.Party_Theme , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 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 \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 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 \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT Name , Nationality FROM HOST ORDER BY Age 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 \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT Name , Nationality FROM HOST ORDER BY Age 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 \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host) |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" ... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE "party" (
"Party_ID" int,
"Party_Theme" text,
"Location" text,
"First_year" text,
"Last_year" text,
"Number_of_hosts" int,
PRIMARY KEY ("Party_ID")
)
CREATE TABLE "host" (
"Host_ID" int,
"Name" text,
"Nationality" text,
"Age" text,
PRIMARY KEY ("Host_ID")
)
CREATE TABLE "party_host" (... | SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host) |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\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 "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY ("Storm_ID")
)
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY ("Region_id")
)
CREATE TABLE `affected_... | SELECT count(*) FROM region |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\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 "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY ("Storm_ID")
)
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY ("Region_id")
)
CREATE TABLE `affected_... | SELECT count(*) FROM region |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\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 "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY ("Storm_ID")
)
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY ("Region_id")
)
CREATE TABLE `affected_... | SELECT region_code , region_name FROM region ORDER BY region_code |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\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 "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY ("Storm_ID")
)
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY ("Region_id")
)
CREATE TABLE `affected_... | SELECT region_code , region_name FROM region ORDER BY region_code |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\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 "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY ("Storm_ID")
)
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY ("Region_id")
)
CREATE TABLE `affected_... | SELECT region_name FROM region ORDER BY region_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 \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\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 "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY ("Storm_ID")
)
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY ("Region_id")
)
CREATE TABLE `affected_... | SELECT region_name FROM region ORDER BY region_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 \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\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 "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY ("Storm_ID")
)
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY ("Region_id")
)
CREATE TABLE `affected_... | SELECT region_name FROM region WHERE region_name != 'Denmark' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\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 "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY ("Storm_ID")
)
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY ("Region_id")
)
CREATE TABLE `affected_... | SELECT region_name FROM region WHERE region_name != 'Denmark' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\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 "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY ("Storm_ID")
)
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY ("Region_id")
)
CREATE TABLE `affected_... | SELECT count(*) FROM storm WHERE Number_Deaths > 0 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\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 "storm" (
"Storm_ID" int,
"Name" text,
"Dates_active" text,
"Max_speed" int,
"Damage_millions_USD" real,
"Number_Deaths" int,
PRIMARY KEY ("Storm_ID")
)
CREATE TABLE "region" (
`Region_id` int,
`Region_code` text,
`Region_name` text,
PRIMARY KEY ("Region_id")
)
CREATE TABLE `affected_... | SELECT count(*) FROM storm WHERE Number_Deaths > 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.