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 `follows` (\n `f1` int(11) NOT NULL,\n `f2` in... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `follows` (
`f1` int(11) NOT NULL,
`f2` int(11) NOT NULL,
PRIMARY KEY (`f1`,`f2`),
FOREIGN KEY (`f1`) REFERENCES `user_profiles`(`uid`),
FOREIGN KEY (`f2`) REFERENCES `user_profiles`(`uid`)
)
CREATE TABLE `tweets` (
`id` bigint(20) NOT NULL,
`uid` int(11) NOT NULL,
`te... | SELECT max(followers) , sum(followers) FROM user_profiles |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT distinct(catalog_entry_name) FROM catalog_contents |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT distinct(catalog_entry_name) FROM catalog_contents |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING count(*) > 3 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING count(*) > 3 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = "Green" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = "Green" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_level_name , catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_level_name , catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT distinct(catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE "%Murray%" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT distinct(catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE "%Murray%" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT t1.catalog_name , t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT t1.catalog_name , t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT avg(price_in_euros) , min(price_in_euros) FROM catalog_contents |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT avg(price_in_euros) , min(price_in_euros) FROM catalog_contents |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_entry_name FROM catalog_contents ORDER BY height 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_entry_name FROM catalog_contents ORDER BY height 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE "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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE "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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT t1.attribute_name , t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT t1.attribute_name , t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_entry_name , capacity FROM Catalog_Contents WHERE price_in_dollars > 700 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_entry_name , capacity FROM Catalog_Contents WHERE price_in_dollars > 700 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT count(*) FROM catalog_contents |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT count(*) FROM catalog_contents |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 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 `Attribute_Definitions` (\n`attribute_id` INTEGE... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Attribute_Definitions` (
`attribute_id` INTEGER PRIMARY KEY,
`attribute_name` VARCHAR(30),
`attribute_data_type` VARCHAR(10)
)
CREATE TABLE `Catalogs` (
`catalog_id` INTEGER PRIMARY KEY,
`catalog_name` VARCHAR(50),
`catalog_publisher` VARCHAR(80),
`date_of_publication` DATETIME,
`date... | SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 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 flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT count(*) FROM Aircraft |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT count(*) FROM Aircraft |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name , distance FROM Aircraft |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name , distance FROM Aircraft |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT aid FROM Aircraft WHERE distance > 1000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT aid FROM Aircraft WHERE distance > 1000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT count(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT count(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name , distance FROM Aircraft WHERE aid = 12 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name , distance FROM Aircraft WHERE aid = 12 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT min(distance) , avg(distance) , max(distance) FROM Aircraft |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT min(distance) , avg(distance) , max(distance) FROM Aircraft |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT aid , name FROM Aircraft ORDER BY distance 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 flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT aid , name FROM Aircraft ORDER BY distance 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 flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name FROM Aircraft ORDER BY distance 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 flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name FROM Aircraft ORDER BY distance 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 flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name FROM Aircraft WHERE distance > (SELECT avg(distance) FROM Aircraft) |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name FROM Aircraft WHERE distance > (SELECT avg(distance) FROM Aircraft) |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT count(*) FROM Employee |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT count(*) FROM Employee |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name , salary FROM Employee ORDER BY salary |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name , salary FROM Employee ORDER BY salary |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT eid FROM Employee WHERE salary > 100000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT eid FROM Employee WHERE salary > 100000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT count(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT count(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name , salary FROM Employee WHERE eid = 242518965 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name , salary FROM Employee WHERE eid = 242518965 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT avg(salary) , max(salary) FROM Employee |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT avg(salary) , max(salary) FROM Employee |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT eid , name FROM Employee ORDER BY salary 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 flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT eid , name FROM Employee ORDER BY salary 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 flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name FROM Employee ORDER BY salary ASC 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 flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name FROM Employee ORDER BY salary ASC 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 flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name FROM Employee WHERE salary > (SELECT avg(salary) FROM Employee) |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT name FROM Employee WHERE salary > (SELECT avg(salary) FROM Employee) |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT eid , salary FROM Employee WHERE name = 'Mark Young' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT eid , salary FROM Employee WHERE name = 'Mark Young' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT count(*) FROM Flight |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT count(*) FROM Flight |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT flno , origin , destination FROM Flight ORDER BY origin |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT flno , origin , destination FROM Flight ORDER BY origin |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT flno FROM Flight WHERE origin = "Los Angeles" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT flno FROM Flight WHERE origin = "Los Angeles" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT origin FROM Flight WHERE destination = "Honolulu" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT origin FROM Flight WHERE destination = "Honolulu" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT departure_date , arrival_date FROM Flight WHERE origin = "Los Angeles" AND destination = "Honolulu" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT departure_date , arrival_date FROM Flight WHERE origin = "Los Angeles" AND destination = "Honolulu" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT flno FROM Flight WHERE distance > 2000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT flno FROM Flight WHERE distance > 2000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT avg(price) FROM Flight WHERE origin = "Los Angeles" AND destination = "Honolulu" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT avg(price) FROM Flight WHERE origin = "Los Angeles" AND destination = "Honolulu" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT origin , destination FROM Flight WHERE price > 300 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT origin , destination FROM Flight WHERE price > 300 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT flno , distance FROM Flight ORDER BY price DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT flno , distance FROM Flight ORDER BY price DESC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE flight(\n\tflno number(4,0) primary key,\n\torig... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE flight(
flno number(4,0) primary key,
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0),
foreign key("aid") references `aircraft`("aid"))
CREATE TABLE aircraft(
aid number(9,0)... | SELECT flno FROM Flight ORDER BY distance ASC LIMIT 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.