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 \"people\" (\n \"People_ID\" int,\n \"Age\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT max(Market_Value_in_Billion) , min(Market_Value_in_Billion) FROM company
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT Headquarters FROM company ORDER BY Sales_in_Billion 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 \"people\" (\n \"People_ID\" int,\n \"Age\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT Headquarters , COUNT(*) FROM company GROUP BY Headquarters
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT Headquarters FROM company GROUP BY Headquarters 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 \"people\" (\n \"People_ID\" int,\n \"Age\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT Headquarters FROM company GROUP BY Headquarters 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 \"people\" (\n \"People_ID\" int,\n \"Age\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT Headquarters FROM company WHERE Industry = "Banking" INTERSECT SELECT Headquarters FROM company WHERE Industry = "Oil and gas"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_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 \"people\" (\n \"People_ID\" int,\n \"Age\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T3.Sales_in_Billion > 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 \"people\" (\n \"People_ID\" int,\n \"Age\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT T3.Name , COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID GROUP BY T3.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 \"people\" (\n \"People_ID\" int,\n \"Age\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM employment)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"people\" (\n \"People_ID\" int,\n \"Age\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "people" ( "People_ID" int, "Age" int, "Name" text, "Nationality" text, "Graduation_College" text, PRIMARY KEY ("People_ID") ) CREATE TABLE "company" ( "Company_ID" real, "Name" text, "Headquarters" text, "Industry" text, "Sales_in_Billion" r...
SELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion , Profits_in_Billion 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 \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT count(*) FROM film
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT count(*) FROM film
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT DISTINCT Director FROM film
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT DISTINCT Director FROM film
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT avg(Gross_in_dollar) FROM film
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT avg(Gross_in_dollar) FROM film
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Low_Estimate , High_Estimate FROM film_market_estimation
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Low_Estimate , High_Estimate FROM film_market_estimation
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT max(Number_cities) , min(Number_cities) FROM market
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT max(Number_cities) , min(Number_cities) FROM market
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT count(*) FROM market WHERE Number_cities < 300
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT count(*) FROM market WHERE Number_cities < 300
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Country FROM market ORDER BY Country ASC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Country FROM market ORDER BY Country ASC
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Country FROM market ORDER BY Number_cities 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 \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Country FROM market ORDER BY Number_cities 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 \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT T1.Title , T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_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 \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT T1.Title , T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_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 \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID WHERE T2.Year = 1995
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID WHERE T2.Year = 1995
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT avg(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T1.Low_Estimate > 10000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT avg(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T1.Low_Estimate > 10000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT T2.Country , T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_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 \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT T2.Country , T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_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 \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = "Japan" ORDER BY T1.Year 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 \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = "Japan" ORDER BY T1.Year 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 \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Studio , COUNT(*) FROM film GROUP BY Studio
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Studio , COUNT(*) FROM film GROUP BY Studio
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Studio FROM film GROUP BY Studio 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 \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Studio FROM film GROUP BY Studio 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 \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Studio FROM film GROUP BY Studio 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 \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Studio FROM film GROUP BY Studio 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 \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation)
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Studio FROM film WHERE Director = "Nicholas Meyer" INTERSECT SELECT Studio FROM film WHERE Director = "Walter Hill"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Studio FROM film WHERE Director = "Nicholas Meyer" INTERSECT SELECT Studio FROM film WHERE Director = "Walter Hill"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT title , Studio FROM film WHERE Studio LIKE "%Universal%"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT title , Studio FROM film WHERE Studio LIKE "%Universal%"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = "Walter Hill"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = "Walter Hill"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Studio FROM film GROUP BY Studio HAVING avg(Gross_in_dollar) >= 4500000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT Studio FROM film GROUP BY Studio HAVING avg(Gross_in_dollar) >= 4500000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID ORDER BY high_estimate 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 \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID ORDER BY high_estimate 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 \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT title , director FROM film WHERE film_id NOT IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China')
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film\" (\n\"Film_ID\" int,\n\"Title\" text,\n\...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "film" ( "Film_ID" int, "Title" text, "Studio" text, "Director" text, "Gross_in_dollar" int, PRIMARY KEY ("Film_ID") ) CREATE TABLE "market" ( "Market_ID" int, "Country" text, "Number_cities" int, PRIMARY KEY ("Market_ID") ) CREATE TABLE "film_market_estimation" ( "Estimation_ID" int,...
SELECT title , director FROM film WHERE film_id NOT IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China')
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT count(*) FROM Ref_calendar
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT count(*) FROM Ref_calendar
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT calendar_date , day_Number FROM Ref_calendar
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT calendar_date , day_Number FROM Ref_calendar
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT count(*) FROM Ref_document_types
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT count(*) FROM Ref_document_types
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT document_type_code , document_type_name FROM Ref_document_types
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT document_type_code , document_type_name FROM Ref_document_types
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT document_type_name , document_type_description FROM Ref_document_types WHERE document_type_code = "RV"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT document_type_name , document_type_description FROM Ref_document_types WHERE document_type_code = "RV"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT document_type_code FROM Ref_document_types WHERE document_type_name = "Paper"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT document_type_code FROM Ref_document_types WHERE document_type_name = "Paper"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT count(*) FROM All_documents WHERE document_type_code = "CV" OR document_type_code = "BK"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT count(*) FROM All_documents WHERE document_type_code = "CV" OR document_type_code = "BK"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT date_stored FROM All_documents WHERE Document_name = "Marry CV"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT date_stored FROM All_documents WHERE Document_name = "Marry CV"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT T2.day_Number , T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT T2.day_Number , T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE Ref_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = "How to read a book"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = "How to read a book"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT count(*) FROM Ref_locations
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT count(*) FROM Ref_locations
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT location_code , location_name FROM Ref_locations
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT location_code , location_name FROM Ref_locations
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT location_name , location_description FROM Ref_locations WHERE location_code = "x"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT location_name , location_description FROM Ref_locations WHERE location_code = "x"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT location_code FROM Ref_locations WHERE location_name = "Canada"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT location_code FROM Ref_locations WHERE location_name = "Canada"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT count(*) FROM ROLES
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT count(*) FROM ROLES
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT role_code , role_name , role_description FROM ROLES
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT role_code , role_name , role_description FROM ROLES
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT role_name , role_description FROM ROLES WHERE role_code = "MG"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT role_name , role_description FROM ROLES WHERE role_code = "MG"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT role_description FROM ROLES WHERE role_name = "Proof Reader"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT role_description FROM ROLES WHERE role_name = "Proof Reader"
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT count(*) 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 Ref_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT count(*) 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 Ref_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT employee_name , role_code , date_of_birth FROM Employees WHERE employee_Name = 'Armani'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a 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_Document_Types (\nDocument_Type_Code CHAR(15...
You are an expert SQL 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_Document_Types ( Document_Type_Code CHAR(15) NOT NULL, Document_Type_Name VARCHAR(255) NOT NULL, Document_Type_Description VARCHAR(255) NOT NULL, PRIMARY KEY (Document_Type_Code) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME NOT NULL, Day_Number INTEGER, PRIMARY KEY (Calenda...
SELECT employee_name , role_code , date_of_birth FROM Employees WHERE employee_Name = 'Armani'