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 Student (\n StuID INTEGER PRIMARY ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Fac...
SELECT avg(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = "Smith"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Fac...
SELECT max(T2.gradepoint) , min(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = "NYC"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Fac...
SELECT max(T2.gradepoint) , min(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = "NYC"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Fac...
SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Fac...
SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Fac...
SELECT DName FROM DEPARTMENT WHERE Division = "AS" UNION SELECT DName FROM DEPARTMENT WHERE Division = "EN" AND Building = "NEB"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Fac...
SELECT DName FROM DEPARTMENT WHERE Division = "AS" UNION SELECT DName FROM DEPARTMENT WHERE Division = "EN" AND Building = "NEB"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Fac...
SELECT Fname FROM STUDENT WHERE StuID NOT IN (SELECT StuID FROM ENROLLED_IN)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Student (\n StuID INTEGER PRIMARY ...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE Student ( StuID INTEGER PRIMARY KEY, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Fac...
SELECT Fname FROM STUDENT WHERE StuID NOT IN (SELECT StuID FROM ENROLLED_IN)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_id , product_type_code FROM products ORDER BY product_price 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_id , product_type_code FROM products ORDER BY product_price 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT count(DISTINCT product_type_code) FROM products
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT count(DISTINCT product_type_code) FROM products
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.staff_id , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Department Manager"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.staff_id , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Department Manager"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT payment_method_code , count(*) FROM customers GROUP BY payment_method_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT payment_method_code , count(*) FROM customers GROUP BY payment_method_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_id FROM order_items GROUP BY product_id ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_id FROM order_items GROUP BY product_id ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.customer_name , T1.customer_phone , T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.customer_name , T1.customer_phone , T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY count(*) DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_type_code , avg(product_price) FROM products GROUP BY product_type_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_type_code , avg(product_price) FROM products GROUP BY product_type_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT count(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = "South"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT count(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = "South"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.staff_name , T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.staff_name , T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T2.product_type_code , T2.product_name , T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T2.product_type_code , T2.product_name , T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = "Pending" ORDER BY T2.customer_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = "Pending" ORDER BY T2.customer_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = "New" INTERSECT SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2....
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = "New" INTERSECT SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2....
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT avg(product_price) FROM products)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT avg(product_price) FROM products)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = "marketing" INTERSECT SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id W...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = "marketing" INTERSECT SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id W...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY count(*) DESC LIMIT 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY count(*) DESC LIMIT 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_type_code , max(product_price) , min(product_price) FROM products GROUP BY product_type_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_type_code , max(product_price) , min(product_price) FROM products GROUP BY product_type_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_type_code FROM products GROUP BY product_type_code HAVING avg(product_price) > (SELECT avg(product_price) FROM products)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_type_code FROM products GROUP BY product_type_code HAVING avg(product_price) > (SELECT avg(product_price) FROM products)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.staff_id , T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.staff_id , T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_name , product_id FROM products WHERE product_price BETWEEN 600 AND 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_name , product_id FROM products WHERE product_price BETWEEN 600 AND 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT min(order_date) FROM Customer_Orders WHERE order_status_code = "Cancelled")
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT min(order_date) FROM Customer_Orders WHERE order_status_code = "Cancelled")
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT max(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT max(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT customer_name , customer_id FROM customers WHERE customer_address LIKE "%TN%"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT customer_name , customer_id FROM customers WHERE customer_address LIKE "%TN%"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE "2016%"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE "2016%"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.supplier_name , T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.supplier_name , T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_id FROM Order_Items GROUP BY product_id HAVING count(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING sum(total_amount_purchased) > 80000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_id FROM Order_Items GROUP BY product_id HAVING count(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING sum(total_amount_purchased) > 80000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_id , product_name FROM products WHERE product_price < 600 OR product_price > 900
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_id , product_name FROM products WHERE product_price < 600 OR product_price > 900
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased) > 50000 OR avg(total_amount_purchased) < 30000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased) > 50000 OR avg(total_amount_purchased) < 30000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT avg(total_amount_purchased) , avg(total_value_purchased) FROM Product_Suppliers WHERE supplier_id = (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY count(*) DESC LIMIT 1)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT avg(total_amount_purchased) , avg(total_value_purchased) FROM Product_Suppliers WHERE supplier_id = (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY count(*) DESC LIMIT 1)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT max(customer_code) , min(customer_code) FROM Customers
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT max(customer_code) , min(customer_code) FROM Customers
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = "keyboard"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = "keyboard"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT DISTINCT T1.supplier_name , T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = "red jeans"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT DISTINCT T1.supplier_name , T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = "red jeans"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT max(product_price) , min(product_price) , product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT max(product_price) , min(product_price) , product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT order_id , customer_id FROM customer_orders WHERE order_status_code = "Cancelled" ORDER BY order_date
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT order_id , customer_id FROM customer_orders WHERE order_status_code = "Cancelled" ORDER BY order_date
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id) >= 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id) >= 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id) >= 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id) >= 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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Sales Person" EXCEPT SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_t...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Sales Person" EXCEPT SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_t...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT customer_id , customer_name FROM customers WHERE customer_address LIKE "%WY%" AND payment_method_code != "Credit Card"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT customer_id , customer_name FROM customers WHERE customer_address LIKE "%WY%" AND payment_method_code != "Credit Card"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT avg(product_price) FROM products WHERE product_type_code = 'Clothes'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT avg(product_price) FROM products WHERE product_type_code = 'Clothes'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_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 `Addresses` (\n`address_id` INTEGER PRIMARY KEY,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `address_details` VARCHAR(255) ) CREATE TABLE `Staff` ( `staff_id` INTEGER PRIMARY KEY, `staff_gender` VARCHAR(1), `staff_name` VARCHAR(80) ) CREATE TABLE `Suppliers` ( `supplier_id` INTEGER PRIMARY KEY, `supplier_name` VARCHAR(80), `sup...
SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
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 `pilot` (\n `Pilot_Id` int(11) NOT NULL,\n `Na...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `pilot` ( `Pilot_Id` int(11) NOT NULL, `Name` varchar(50) NOT NULL, `Age` int(11) NOT NULL, PRIMARY KEY (`Pilot_Id`) ) CREATE TABLE `aircraft` ( "Aircraft_ID" int(11) NOT NULL, "Aircraft" varchar(50) NOT NULL, "Description" varchar(50) NOT NULL, "Max_Gross_Weight" varch...
SELECT Description FROM aircraft