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 Vot... | SELECT Advisor , count(*) FROM STUDENT GROUP BY Advisor |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE 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 Vot... | SELECT Advisor , count(*) FROM STUDENT GROUP BY Advisor |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE 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 Vot... | SELECT Advisor FROM STUDENT GROUP BY Advisor 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 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 Vot... | SELECT Advisor FROM STUDENT GROUP BY Advisor 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 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 Vot... | SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE 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 Vot... | SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE 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 Vot... | SELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a 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 Vot... | SELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a 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 Vot... | SELECT Major FROM STUDENT GROUP BY major 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 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 Vot... | SELECT Major FROM STUDENT GROUP BY major 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 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 Vot... | SELECT Major FROM STUDENT WHERE Sex = "F" GROUP BY major 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 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 Vot... | SELECT Major FROM STUDENT WHERE Sex = "F" GROUP BY major 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 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 Vot... | SELECT city_code FROM STUDENT GROUP BY city_code 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 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 Vot... | SELECT city_code FROM STUDENT GROUP BY city_code 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 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 Vot... | SELECT Advisor FROM STUDENT GROUP BY Advisor 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 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 Vot... | SELECT Advisor FROM STUDENT GROUP BY Advisor 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 `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) 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 `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) 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 `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM ref_colors |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM ref_colors |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM CHARACTERISTICS |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM CHARACTERISTICS |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT product_name , typical_buying_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 `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT product_name , typical_buying_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 `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT color_description FROM ref_colors |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT color_description FROM ref_colors |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT DISTINCT characteristic_name FROM CHARACTERISTICS |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT DISTINCT characteristic_name FROM CHARACTERISTICS |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT product_name FROM products WHERE product_category_code = "Spices" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT product_name FROM products WHERE product_category_code = "Spices" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT T1.product_name , T2.color_description , T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = "Herbs" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT T1.product_name , T2.color_description , T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = "Herbs" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products WHERE product_category_code = "Seeds" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products WHERE product_category_code = "Seeds" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT product_category_code , typical_buying_price FROM products WHERE product_name = "cumin" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT product_category_code , typical_buying_price FROM products WHERE product_name = "cumin" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT product_category_code FROM products WHERE product_name = "flax" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT product_category_code FROM products WHERE product_name = "flax" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow' |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%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 `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%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 `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "catnip" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "catnip" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t1.color_code , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "chervil" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t1.color_code , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "chervil" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t1.product_id , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_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 `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t1.product_id , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_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 `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = "white" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = "white" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t1.product_name , t1.typical_buying_price , t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = "yellow" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t1.product_name , t1.typical_buying_price , t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = "yellow" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = "sesame" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = "sesame" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t3.characteristic_name , t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "cumin" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t3.characteristic_name , t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "cumin" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame" AND t3.characteristic_type_code = "Grade" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame" AND t3.characteristic_type_code = "Grade" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "laurel" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "laurel" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "flax" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "flax" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "red" AND t3.characteristic_name = "fast" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "red" AND t3.characteristic_name = "fast" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = "hot" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = "hot" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = "warm" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = "warm" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "red" AND t3.characteristic_name = "slow" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "red" AND t3.characteristic_name = "slow" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "white" OR t3.characteristic_name = "hot" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "white" OR t3.characteristic_name = "hot" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT product_category_description FROM ref_product_categories WHERE product_category_code = "Spices" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT product_category_description FROM ref_product_categories WHERE product_category_code = "Spices" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT product_category_description , unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT product_category_description , unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = "cumin" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = "cumin" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t2.unit_of_measure , t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = "chervil" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t2.unit_of_measure , t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = "chervil" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = "white" AND t2.unit_of_measure != "Handful" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = "white" AND t2.unit_of_measure != "Handful" |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description 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 `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description 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 `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1 |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name 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 `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name 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 `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT characteristic_name , other_characteristic_details , characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name , t1.other_characteristic_details , t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_i... |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT characteristic_name , other_characteristic_details , characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name , t1.other_characteristic_details , t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_i... |
[
{
"role": "system",
"content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name 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 `Ref_Characteristic_Types` (\n`characteristic_ty... | You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation. | ### Database Schema
CREATE TABLE `Ref_Characteristic_Types` (
`characteristic_type_code` VARCHAR(15) PRIMARY KEY,
`characteristic_type_description` VARCHAR(80)
)
CREATE TABLE `Ref_Colors` (
`color_code` VARCHAR(15) PRIMARY KEY,
`color_description` VARCHAR(80)
)
CREATE TABLE `Ref_Product_Categories` (
`product_categor... | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*) >= 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.