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 \"manufacturer\" (\n \"Manufacturer_ID\" int,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "manufacturer" ( "Manufacturer_ID" int, "Open_Year" real, "Name" text, "Num_of_Factories" int, "Num_of_Shops" int, PRIMARY KEY ("Manufacturer_ID") ) CREATE TABLE "furniture" ( "Furniture_ID" int, "Name" text, "Num_of_Component" int, "Market_Rate"...
SELECT t1.manufacturer_id , t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar 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 \"manufacturer\" (\n \"Manufacturer_ID\" int,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "manufacturer" ( "Manufacturer_ID" int, "Open_Year" real, "Name" text, "Num_of_Factories" int, "Num_of_Shops" int, PRIMARY KEY ("Manufacturer_ID") ) CREATE TABLE "furniture" ( "Furniture_ID" int, "Name" text, "Num_of_Component" int, "Market_Rate"...
SELECT count(*) , t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id GROUP BY t1.manufacturer_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 \"manufacturer\" (\n \"Manufacturer_ID\" int,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "manufacturer" ( "Manufacturer_ID" int, "Open_Year" real, "Name" text, "Num_of_Factories" int, "Num_of_Shops" int, PRIMARY KEY ("Manufacturer_ID") ) CREATE TABLE "furniture" ( "Furniture_ID" int, "Name" text, "Num_of_Component" int, "Market_Rate"...
SELECT t1.name , t2.price_in_dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_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 \"manufacturer\" (\n \"Manufacturer_ID\" int,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "manufacturer" ( "Manufacturer_ID" int, "Open_Year" real, "Name" text, "Num_of_Factories" int, "Num_of_Shops" int, PRIMARY KEY ("Manufacturer_ID") ) CREATE TABLE "furniture" ( "Furniture_ID" int, "Name" text, "Num_of_Component" int, "Market_Rate"...
SELECT Market_Rate , name FROM furniture WHERE Furniture_ID NOT IN (SELECT Furniture_ID FROM furniture_manufacte)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"manufacturer\" (\n \"Manufacturer_ID\" int,...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "manufacturer" ( "Manufacturer_ID" int, "Open_Year" real, "Name" text, "Num_of_Factories" int, "Num_of_Shops" int, PRIMARY KEY ("Manufacturer_ID") ) CREATE TABLE "furniture" ( "Furniture_ID" int, "Name" text, "Num_of_Component" int, "Market_Rate"...
SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id = t3.manufacturer_id WHERE t1.num_of_component < 6 INTERSECT SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT T1.first_name , T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT T1.first_name , T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name , salary FROM employees WHERE salary < 6000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name , salary FROM employees WHERE salary < 6000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , department_id FROM employees WHERE last_name = 'McEwen'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , department_id FROM employees WHERE last_name = 'McEwen'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM employees WHERE department_id = "null"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM employees WHERE department_id = "null"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM departments WHERE department_name = 'Marketing'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM departments WHERE department_name = 'Marketing'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT hire_date FROM employees WHERE first_name NOT LIKE '%M%'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT hire_date FROM employees WHERE first_name NOT LIKE '%M%'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%' ORDER BY department_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%' ORDER BY department_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct != "null" OR department_id != 40
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct != "null" OR department_id != 40
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name , salary FROM employees WHERE commission_pct = "null"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name , salary FROM employees WHERE commission_pct = "null"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name , salary FROM employees WHERE first_name LIKE '%m'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name , salary FROM employees WHERE first_name LIKE '%m'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT job_id , hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT job_id , hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name FROM employees WHERE department_id = 70 OR department_id = 90
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name FROM employees WHERE department_id = 70 OR department_id = 90
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT salary , manager_id FROM employees WHERE manager_id != "null"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT salary , manager_id FROM employees WHERE manager_id != "null"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM employees WHERE hire_date < '2002-06-21'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM employees WHERE hire_date < '2002-06-21'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM employees WHERE hire_date > '1987-09-07'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM employees WHERE hire_date > '1987-09-07'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT job_title FROM jobs WHERE min_salary > 9000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT job_title FROM jobs WHERE min_salary > 9000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT job_title , max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT job_title , max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT email FROM employees WHERE commission_pct = "null" AND salary BETWEEN 7000 AND 12000 AND department_id = 50
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT email FROM employees WHERE commission_pct = "null" AND salary BETWEEN 7000 AND 12000 AND department_id = 50
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT employee_id , MAX(end_date) FROM job_history GROUP BY employee_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT employee_id , MAX(end_date) FROM job_history GROUP BY employee_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT department_id , AVG(salary) FROM employees WHERE commission_pct != "null" GROUP BY department_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT department_id , AVG(salary) FROM employees WHERE commission_pct != "null" GROUP BY department_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT country_id , COUNT(*) FROM locations GROUP BY country_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT country_id , COUNT(*) FROM locations GROUP BY country_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT T1.employee_id , T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT T1.employee_id , T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT T2.department_name , COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_name
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT T2.department_name , COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_name
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT job_title , AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT job_title , AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163 )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163 )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT MIN(salary) , department_id FROM employees GROUP BY department_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT MIN(salary) , department_id FROM employees GROUP BY department_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name , department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name , department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT employee_id , salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam' )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT employee_id , salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam' )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM departments WHERE department_name = 'Marketing'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM departments WHERE department_name = 'Marketing'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 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 `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT T1.employee_id , T2.job_title FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.department_id = 80
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT T1.employee_id , T2.job_title FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.department_id = 80
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT T1.first_name , T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = 'Finance'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT T1.first_name , T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = 'Finance'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM employees WHERE department_id NOT IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT * FROM employees WHERE department_id NOT IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE `regions` (\n `REGION_ID` decimal(5,0) NOT NULL...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE `regions` ( `REGION_ID` decimal(5,0) NOT NULL, `REGION_NAME` varchar(25) DEFAULT NULL, PRIMARY KEY (`REGION_ID`) ) CREATE TABLE `countries` ( `COUNTRY_ID` varchar(2) NOT NULL, `COUNTRY_NAME` varchar(40) DEFAULT NULL, `REGION_ID` decimal(10,0) DEFAULT NULL, PRIMARY KEY (`C...
SELECT first_name , last_name , hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = "Clara")