messages
listlengths
3
3
system
stringclasses
1 value
user
stringlengths
473
37.6k
assistant
stringlengths
23
804
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year = 2003 AND T1.user_id = 2941
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'Patti Smith: Dream of Life' AND T1.user_trialist = 0
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id GROUP BY T2.movie_title ORDER BY SUM(T1.rating_score) / COUNT(T1.rating_id) 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.critic_comments DESC LIMIT 3
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.list_title, T1.user_avatar_image_url FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T1.user_id = 85981819 ORDER BY T2.list_creation_timestamp_utc 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_timestamp_utc LIKE '2020%' GROUP BY T2.movie_title ORDER BY COUNT(T2.movie_title) 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT AVG(T1.rating_score) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title LIKE 'Versailles Rive-Gauche'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.user_id = 59988436 AND T1.critic_comments = 21
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.critic_likes > 20
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT SUM(T1.rating_score) / COUNT(T1.rating_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_timestamp_utc LIKE '2019%' AND T2.movie_title LIKE 'The Fall of Berlin'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT CAST(SUM(CASE WHEN T1.rating_score > 3 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.rating_score) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title LIKE 'Patti Smith: Dream of Life'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.director_name = 'Abbas Kiarostami' GROUP BY T2.movie_title ORDER BY SUM(T1.rating_score) / COUNT(T1.rating_id) 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT movie_release_year FROM movies GROUP BY movie_release_year ORDER BY COUNT(movie_id) 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT director_id FROM movies GROUP BY director_id ORDER BY COUNT(movie_id) 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT COUNT(movie_id) FROM movies WHERE director_id = ( SELECT director_id FROM movies ORDER BY movie_popularity 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT COUNT(user_subscriber) FROM ratings_users WHERE user_has_payment_method = 1 AND rating_date_utc > '2014%'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT user_id FROM lists_users WHERE user_subscriber = 0 ORDER BY list_creation_date_utc 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT SUM(T1.list_followers) FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id GROUP BY T1.user_id ORDER BY COUNT(T1.list_id) 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT SUM(T2.list_followers) FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_title LIKE 'Non-American Films about World War II'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'Downfall' AND T1.rating_score = 4
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score = 5
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id GROUP BY T2.movie_title ORDER BY COUNT(T1.critic_comments) 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.user_avatar_image_url FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id WHERE T1.rating_timestamp_utc LIKE '2019-10-17 01:36:36'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T1.user_avatar_image_url FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_title LIKE 'Vladimir Vladimirovich Nabokov'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T1.user_has_payment_method FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_movie_number = ( SELECT MAX(list_movie_number) FROM lists )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.user_avatar_image_url FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id WHERE T1.rating_score = 5
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT COUNT(T1.critic) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_popularity = ( SELECT MAX(movie_popularity) FROM movies )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T1.user_id FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE rating_score = 4 AND rating_timestamp_utc LIKE '2013-05-04 06:33:32' AND T2.movie_title LIKE 'Freaks'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE rating_score = 5 AND rating_timestamp_utc LIKE '2013-05-03 05:11:17'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT COUNT(T2.movie_title) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score = 4 AND T2.movie_release_year = 1998 ORDER BY T2.movie_popularity 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_popularity > 13000 ORDER BY T1.rating_score 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN ratings_users AS T3 ON T1.user_id = T3.user_id WHERE T2.movie_title = 'One Flew Over the Cuckoo''s Nest' AND T3.user_has_payment_method = 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT COUNT(T1.user_id) FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_followers > 3000 AND T1.user_has_payment_method = 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year = 1988 ORDER BY T1.rating_score 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT COUNT(T1.rating_score) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score < 3 AND T2.movie_release_year = 1995 AND T2.movie_popularity = ( SELECT MAX(movie_popularity) FROM movies WHERE movie_release_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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT CAST(SUM(CASE WHEN T1.rating_score = 5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'Go Go Tales'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT CAST(SUM(CASE WHEN T3.user_subscriber = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists_users AS T3 ON T1.user_id = T3.user_id WHERE T2.movie_title = 'G.I. Jane'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT CAST(SUM(CASE WHEN T1.user_has_payment_method = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists_users AS T3 ON T1.user_id = T3.user_id WHERE T2.movie_title = 'A Shot in the Dark'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT list_title FROM lists WHERE user_id LIKE 4208563
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT list_title FROM lists WHERE strftime('%Y', list_update_timestamp_utc) = '2016' ORDER BY list_update_timestamp_utc 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT CAST(SUM(CASE WHEN user_subscriber = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(list_id) FROM lists_users
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT DISTINCT T2.list_id FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T1.user_subscriber = 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT DISTINCT T2.list_title FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T1.user_eligible_for_trial = 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT COUNT(T1.list_id) FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_followers >= 1 AND T1.user_subscriber = 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT AVG(list_followers) FROM lists WHERE list_movie_number > 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT DISTINCT T2.list_title FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_movie_number < 50 AND T1.user_subscriber = 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT list_title , datetime(CURRENT_TIMESTAMP, 'localtime') - datetime(list_update_timestamp_utc) FROM lists ORDER BY list_update_timestamp_utc 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T1.user_id, T1.user_subscriber FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_title LIKE 'Sound and Vision'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT list_title , 365 * (strftime('%Y', 'now') - strftime('%Y', list_creation_timestamp_utc)) + 30 * (strftime('%m', 'now') - strftime('%m', list_creation_timestamp_utc)) + strftime('%d', 'now') - strftime('%d', list_creation_timestamp_utc) FROM lists WHERE list_followers > 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT CAST(SUM(CASE WHEN T2.movie_id IS NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.movie_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_title, T1.rating_timestamp_utc, T1.rating_score FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.user_id = 39115684
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT COUNT(movie_id) FROM movies WHERE movie_release_year BETWEEN '1970' AND '1980' AND movie_popularity > 11000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT COUNT(movie_id) FROM movies WHERE movie_release_year = 1976 AND director_name LIKE 'Felipe Cazals'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT director_url FROM movies WHERE movie_title LIKE 'Red Blooded American Girl'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT list_title FROM lists WHERE list_update_timestamp_utc = ( SELECT list_update_timestamp_utc FROM lists ORDER BY list_update_timestamp_utc 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT user_id FROM lists WHERE list_comments = 142
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_title, AVG(T1.rating_score) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.director_name = 'Jeannot Szwarc' ORDER BY T2.movie_popularity 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.director_name, T1.rating_score FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year BETWEEN 1970 AND 1979 GROUP BY T2.director_id ORDER BY COUNT(T2.movie_id) 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'The Secret Life of Words' AND T1.rating_score = 3 AND T1.user_trialist = 0 AND T1.rating_timestamp_utc BETWEEN '2010%' AND '2020%'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_title, T1.rating_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.critic_likes 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT DISTINCT T2.movie_id, SUM(T1.rating_score = 5) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T2.movie_popularity DESC LIMIT 5
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT CAST(SUM(T4.list_followers) AS REAL) / COUNT(T2.list_id) FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id INNER JOIN movies AS T3 ON T1.movie_id = T3.movie_id INNER JOIN lists AS T4 ON T2.list_id = T4.list_id WHERE T3.movie_title LIKE 'Pavee Lackeen: The Traveller Girl' AND T1.rating_ti...
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT COUNT(T1.user_id), T2.movie_image_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE datetime(T1.rating_timestamp_utc) BETWEEN '2017-01-01 00:00:00' AND '2017-12-31 00:00:00'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT AVG(T3.list_movie_number) , SUM(CASE WHEN T1.rating_score = 5 THEN 1 ELSE 0 END) FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id INNER JOIN lists AS T3 ON T2.user_id = T3.user_id WHERE T1.user_id = 8516503
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T1.director_name, T1.movie_release_year , SUM(T2.rating_score) / COUNT(T2.user_id) FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T2.user_trialist = 1 ORDER BY T1.movie_popularity 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.user_id = 57756708 ORDER BY T1.rating_timestamp_utc 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 \"lists\"\n(\n user_id IN...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE "lists" ( user_id INTEGER references lists_users (user_id), list_id INTEGER not null primary key, list_title TEXT, list_movie_number INTEGER, list_update_timestamp_utc TEXT, list...
SELECT T2.movie_id, AVG(T1.rating_score), T2.director_name, T2.movie_release_year FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.rating_timestamp_utc ASC LIMIT 10
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT ord_date, SUM(qty) FROM sales GROUP BY ord_date ORDER BY SUM(qty) 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 authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T2.title FROM sales AS T1 INNER JOIN titles AS T2 ON T1.title_id = T2.title_id WHERE STRFTIME('%Y', T1.ord_date) = '1992' ORDER BY T1.qty 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 authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T2.title, T2.price, T2.pubdate FROM sales AS T1 INNER JOIN titles AS T2 ON T1.title_id = T2.title_id WHERE T1.payterms = 'ON invoice'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.title FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.lorange = 0 AND T2.royalty >= 10
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.title, T2.royalty FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.lorange > 10000 AND T2.hirange < 50000 AND T1.title_ID = 'BU2075'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.title, T2.lorange FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id ORDER BY T2.royalty 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 authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.title, T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.country = 'USA'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT MAX(T1.ytd_sales) FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.lorange > 20000 AND T2.hirange < 20000
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.title, T1.notes, T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE STRFTIME('%Y', T1.pubdate) = '1991'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.title, T2.qty FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id INNER JOIN stores AS T3 ON T2.stor_id = T3.stor_id WHERE T2.qty > 20 AND T3.state = 'CA'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T3.stor_id, T2.title FROM sales AS T1 INNER JOIN titles AS T2 ON T1.title_id = T2.title_id INNER JOIN stores AS T3 ON T3.stor_id = T1.stor_id WHERE T3.stor_id = ( SELECT stor_id FROM sales GROUP BY stor_id ORDER BY SUM(qty) DESC LIMIT 1 ) GROUP BY T3.stor_id, T2.title ORDER BY SUM(T1.qty) 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 authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.title, T3.pub_name, T2.lorange, T2.hirange, T2.royalty FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id INNER JOIN publishers AS T3 ON T1.pub_id = T3.pub_id WHERE T1.title_id = 'BU2075'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T2.stor_name , CAST(SUM(CASE WHEN payterms = 'Net 30' THEN qty ELSE 0 END) AS REAL) * 100 / SUM(qty) FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id WHERE T1.stor_id = '7066' GROUP BY T2.stor_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 authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T2.pub_name, AVG(T1.ytd_sales) FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.pub_id = '0877' GROUP BY T2.pub_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 authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT fname, lname FROM employee WHERE STRFTIME('%Y', hire_date) < '1990'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT fname, lname, hire_date FROM employee ORDER BY job_lvl 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 authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT STRFTIME('%Y', hire_date) FROM employee GROUP BY STRFTIME('%Y', hire_date) ORDER BY COUNT(emp_id) 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 authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.fname, T1.lname FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.job_lvl = T2.max_lvl
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.fname, T1.lname, T1.hire_date FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T2.job_desc = 'Chief Financial Officier'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.fname, T1.lname, T2.pub_name FROM employee AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.country != 'USA'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.fname, T1.lname, T3.job_desc FROM employee AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id INNER JOIN jobs AS T3 ON T1.job_id = T3.job_id WHERE T2.pub_name = 'GGG&G'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT DISTINCT T2.pub_name, T1.type FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id ORDER BY T2.pub_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 authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE STRFTIME('%Y', T1.pubdate) = '1991' GROUP BY T1.pub_id, T2.pub_name ORDER BY COUNT(T1.title_id) 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 authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.title FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.pub_name = 'Binnet & Hardley' ORDER BY T1.price DESC LIMIT 1
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.fname, T1.lname, T2.job_desc FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.job_lvl > 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 authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T3.au_fname, T3.au_lname FROM titles AS T1 INNER JOIN titleauthor AS T2 ON T1.title_id = T2.title_id INNER JOIN authors AS T3 ON T2.au_id = T3.au_id WHERE T1.type = 'business'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.title_id, T1.ytd_sales FROM titles AS T1 INNER JOIN titleauthor AS T2 ON T1.title_id = T2.title_id INNER JOIN authors AS T3 ON T2.au_id = T3.au_id WHERE T3.contract = 0
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.title FROM titles AS T1 INNER JOIN titleauthor AS T2 ON T1.title_id = T2.title_id INNER JOIN authors AS T3 ON T2.au_id = T3.au_id WHERE T3.contract = 0 AND T3.state = 'CA' ORDER BY T1.ytd_sales 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 authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T3.au_fname, T3.au_lname FROM titles AS T1 INNER JOIN titleauthor AS T2 ON T1.title_id = T2.title_id INNER JOIN authors AS T3 ON T2.au_id = T3.au_id WHERE T1.title = 'Sushi, Anyone?'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT CAST(SUM(CASE WHEN T2.job_desc IN ('Editor', 'Designer') THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.job_id) FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_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 authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.title FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.ytd_sales > ( SELECT AVG(ytd_sales) FROM titles )
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT COUNT(pub_id) FROM publishers WHERE country = 'USA'
[ { "role": "system", "content": "You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE authors\n(\n au_id TEXT\n primary k...
You are an expert SQL assistant. Given a database schema and a question, generate the correct SQL query. Output only the SQL query, no explanation.
### Database Schema CREATE TABLE authors ( au_id TEXT primary key, au_lname TEXT not null, au_fname TEXT not null, phone TEXT not null, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT not null ) CREATE TABLE jobs ( job_id INTEGER ...
SELECT T1.pr_info FROM pub_info AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.pub_name = 'New Moon Books'