Dataset Viewer
Auto-converted to Parquet
instruction
stringlengths
573
18.4k
db_id
stringlengths
4
75
source
stringclasses
2 values
sql_complexity
stringclasses
4 values
cnt_true
int64
0
10
question
stringlengths
24
2.03k
evidence
stringlengths
0
673
SQL
stringlengths
30
6.62k
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_popularity integer, movie_image_url text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: most popular movie refers to MAX(movie_popularity); when it was released refers to movie_release_year; director for the movie refers to director_name; State the most popular movie? When was it released and who is the director for the movie? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
State the most popular movie? When was it released and who is the director for the movie?
most popular movie refers to MAX(movie_popularity); when it was released refers to movie_release_year; director for the movie refers to director_name;
SELECT movie_title, movie_release_year, director_name FROM movies ORDER BY movie_popularity DESC LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists_users ( user_id integer, list_id integer, list_creation_date_utc text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE movies ( movie_id integer, movie_popularity integer, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings_users ( user_id integer, user_subscriber integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_description text, list_second_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, user_id integer, user_trialist integer, user_eligible_for_trial integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: average = AVG(movie_popularity); number of Mubi users who loves the movie refers to movie_popularity; What is the average number of Mubi users who love movies directed by Stanley Kubrick? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Moderate
7
What is the average number of Mubi users who love movies directed by Stanley Kubrick?
average = AVG(movie_popularity); number of Mubi users who loves the movie refers to movie_popularity;
SELECT AVG(movie_popularity) FROM movies WHERE director_name = 'Stanley Kubrick'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_description text, list_first_image_url text, list_second_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_image_url text, director_name text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: Sex, Drink and Bloodshed refers to movie title = 'Sex, Drink and Bloodshed'; Who is the director of the movie Sex, Drink and Bloodshed? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
Who is the director of the movie Sex, Drink and Bloodshed?
Sex, Drink and Bloodshed refers to movie title = 'Sex, Drink and Bloodshed';
SELECT director_name FROM movies WHERE movie_title = 'Sex, Drink and Bloodshed'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_title_language text, director_id text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_eligible_for_trial text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_timestamp_utc text, critic text, critic_likes integer, user_id integer, user_trialist integer, user_eligible_for_trial integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_creation_timestamp_utc text, list_followers integer, list_description text, list_first_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: most followed list refers to MAX(list_followers); What is the name of the most followed list? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
What is the name of the most followed list?
most followed list refers to MAX(list_followers);
SELECT list_title FROM lists ORDER BY list_followers DESC LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_avatar_image_url text, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_timestamp_utc text, critic text, user_id integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_release_year integer, movie_url text, movie_image_url text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_creation_date_utc text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_followers integer, list_url text, list_cover_image_url text, list_first_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: first created list refers to oldest list_creation_date_utc; What is the list ID that was first created by user 85981819? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
What is the list ID that was first created by user 85981819?
first created list refers to oldest list_creation_date_utc;
SELECT list_id FROM lists_users WHERE user_id = 85981819 ORDER BY list_creation_date_utc ASC LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings ( movie_id integer, user_id integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_title_language text, movie_popularity integer, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists ( user_id integer, list_id integer, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, user_avatar_image_url text, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: movie released in 2021 refers to movie_release_year = 2021; popularity refers to movie_popularity; What are the movie popularity of the movies released in 2021 that were directed by Steven Spielberg? List the names of the movies and their corresponding popularity. Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Moderate
8
What are the movie popularity of the movies released in 2021 that were directed by Steven Spielberg? List the names of the movies and their corresponding popularity.
movie released in 2021 refers to movie_release_year = 2021; popularity refers to movie_popularity;
SELECT movie_title, movie_popularity FROM movies WHERE movie_release_year = 2021 AND director_name = 'Steven Spielberg'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists_users ( user_id integer, list_id integer, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings_users ( user_id integer, user_avatar_image_url text, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_creation_timestamp_utc text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, user_id integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_release_year integer, movie_title_language text, director_name text, PRIMARY KEY (movie_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: first movie refers to oldest movie_release_year; When was the first movie released and who directed it? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Highly Complex
0
When was the first movie released and who directed it?
first movie refers to oldest movie_release_year;
SELECT movie_release_year, director_name FROM movies WHERE movie_release_year IS NOT NULL ORDER BY movie_release_year ASC LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_comments integer, list_description text, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_release_year integer, movie_url text, movie_title_language text, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: user was eligible for trial when he created the list refers to user_eligible_for_trial = 1; number of followers a list have refers to list_followers; Was the user who created the "World War 2 and Kids" list eligible for trial when he created the list? Indicate how many followers does the said list has. Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Moderate
8
Was the user who created the "World War 2 and Kids" list eligible for trial when he created the list? Indicate how many followers does the said list has.
user was eligible for trial when he created the list refers to user_eligible_for_trial = 1; number of followers a list have refers to list_followers;
SELECT T2.user_eligible_for_trial, T1.list_followers FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T1.user_id AND T1.list_id = T2.list_id WHERE T1.list_title = 'World War 2 and Kids'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, movie_popularity integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: list with the most number of movies refers to MAX(list_movie_number); user_has_payment_method = 1 means the user was a paying subscriber when he created the list; user_has_payment_method = 0 means the user was not a paying subscriber when he created the list; How many movies were added to the list with the most number of movies? Indicate whether the user was a paying subscriber or not when he created the list. Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Complex
3
How many movies were added to the list with the most number of movies? Indicate whether the user was a paying subscriber or not when he created the list.
list with the most number of movies refers to MAX(list_movie_number); user_has_payment_method = 1 means the user was a paying subscriber when he created the list; user_has_payment_method = 0 means the user was not a paying subscriber when he created the list;
SELECT T1.list_movie_number, T2.user_has_payment_method FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id ORDER BY T1.list_movie_number DESC LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings ( movie_id integer, rating_url text, rating_timestamp_utc text, user_id integer, user_subscriber integer, user_eligible_for_trial integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_release_year integer, movie_title_language text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_followers integer, list_url text, list_first_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_creation_date_utc text, user_trialist integer, user_avatar_image_url text, user_eligible_for_trial text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings_users ( user_id integer, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: user profile image URL refers to user_avatar_image_url; user 8516503 refers to user_id; Average refers to AVG(list_movie_number where user_id = 8516503) What is the average number of movies added to the lists of user 8516503? Give the user profile image URL on Mubi. Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Complex
4
What is the average number of movies added to the lists of user 8516503? Give the user profile image URL on Mubi.
user profile image URL refers to user_avatar_image_url; user 8516503 refers to user_id; Average refers to AVG(list_movie_number where user_id = 8516503)
SELECT AVG(T1.list_movie_number), T2.user_avatar_image_url FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T2.user_id = 8516503
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, movie_popularity integer, movie_image_url text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: Short and pretty damn sweet is list_title; description refers to list_description; What's the description for the movie list "Short and pretty damn sweet"? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
What's the description for the movie list "Short and pretty damn sweet"?
Short and pretty damn sweet is list_title; description refers to list_description;
SELECT list_description FROM lists WHERE list_title = 'Short and pretty damn sweet'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists_users ( user_id integer, list_id integer, list_creation_date_utc text, user_subscriber integer, user_avatar_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_image_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_subscriber integer, user_cover_image_url text, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_update_timestamp_utc text, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_first_image_url text, list_second_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_url text, user_id integer, user_trialist integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: Short and pretty damn sweet is list_title; location of the movie refers to list_url; Where can I find the movie list "Short and pretty damn sweet"? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
Where can I find the movie list "Short and pretty damn sweet"?
Short and pretty damn sweet is list_title; location of the movie refers to list_url;
SELECT list_url FROM lists WHERE list_title = 'Short and pretty damn sweet'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, movie_popularity integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: created after 2010/1/1 refers to list_update_timestamp_utc>'2010/1/1'; over 200 followers refers to list_followers>200; Among the movie lists created after 2010/1/1, how many of them have over 200 followers? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
Among the movie lists created after 2010/1/1, how many of them have over 200 followers?
created after 2010/1/1 refers to list_update_timestamp_utc>'2010/1/1'; over 200 followers refers to list_followers>200;
SELECT COUNT(*) FROM lists WHERE list_followers > 200 AND list_update_timestamp_utc > '2010-01-01'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE movies ( movie_id integer, movie_title_language text, PRIMARY KEY (movie_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_creation_timestamp_utc text, list_url text, list_description text, list_second_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_score integer, critic_likes integer, critic_comments integer, user_id integer, user_subscriber integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings_users ( user_id integer, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: the user was a subscriber when he created the list refers to user_subscriber = 1; user 83373278 refers to user_id = 83373278; How many movie lists were created by user 83373278 when he or she was a subscriber? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
How many movie lists were created by user 83373278 when he or she was a subscriber?
the user was a subscriber when he created the list refers to user_subscriber = 1; user 83373278 refers to user_id = 83373278;
SELECT COUNT(*) FROM lists_users WHERE user_id = 83373278 AND user_subscriber = 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_title_language text, movie_popularity integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_subscriber integer, user_eligible_for_trial integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_avatar_image_url text, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_first_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: movie La Antena refers to movie_title = 'La Antena'; which year refers to movie_release_year; In which year was the movie "La Antena" released? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
In which year was the movie "La Antena" released?
movie La Antena refers to movie_title = 'La Antena'; which year refers to movie_release_year;
SELECT movie_release_year FROM movies WHERE movie_title = 'La Antena'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists ( user_id integer, list_id integer, list_movie_number integer, list_update_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_cover_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_url text, movie_popularity integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_comments integer, user_id integer, user_trialist integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, user_avatar_image_url text, user_eligible_for_trial text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings_users ( user_id integer, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: movie La Antena refers to movie_title = 'La Antena'; url refers to movie_url; Please give me the url of the movie "La Antena". Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
Please give me the url of the movie "La Antena".
movie La Antena refers to movie_title = 'La Antena'; url refers to movie_url;
SELECT movie_url FROM movies WHERE movie_title = 'La Antena'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists_users ( user_id integer, list_id integer, list_creation_date_utc text, user_trialist integer, user_eligible_for_trial text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_url text, list_description text, list_cover_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, critic_comments integer, user_id integer, user_trialist integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_popularity integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: The General and Il grido are movie_title; more popular movie refers to higher (movie_popularity); Which movie is more popular, "The General" or "Il grido"? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Moderate
5
Which movie is more popular, "The General" or "Il grido"?
The General and Il grido are movie_title; more popular movie refers to higher (movie_popularity);
SELECT movie_title FROM movies WHERE movie_title = 'The General' OR movie_title = 'Il grido' ORDER BY movie_popularity DESC LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE movies ( movie_id integer, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_second_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_timestamp_utc text, critic_comments integer, user_id integer, user_trialist integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: Hong Sang-soo is the name of director; How many movies registered on Mubi are directed by Hong Sang-soo? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
How many movies registered on Mubi are directed by Hong Sang-soo?
Hong Sang-soo is the name of director;
SELECT COUNT(movie_id) FROM movies WHERE director_name = 'Hong Sang-soo'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings ( movie_id integer, user_id integer, user_trialist integer, user_subscriber integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, user_trialist integer, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings_users ( user_id integer, user_trialist integer, user_cover_image_url text, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, PRIMARY KEY (movie_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_update_timestamp_utc text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: the user was a trialist when he created the list refers to user_trailist = 1; 250 Favourite Films is list_title; Was the user who created the list "250 Favourite Films" a trialist when he or she created the list? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Moderate
6
Was the user who created the list "250 Favourite Films" a trialist when he or she created the list?
the user was a trialist when he created the list refers to user_trailist = 1; 250 Favourite Films is list_title;
SELECT T2.user_trialist FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.list_title = '250 Favourite Films'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_release_year integer, movie_popularity integer, movie_image_url text, director_id text, PRIMARY KEY (movie_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, user_trialist integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, user_id integer, user_subscriber integer, user_eligible_for_trial integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: the user was eligible for trail when he created the list refers to user_eligile_for_trail = 1; user 32172230 refers to user_id = 32172230; Please list the titles of the movie lists user 32172230 created when he or she was eligible for trial. Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Moderate
8
Please list the titles of the movie lists user 32172230 created when he or she was eligible for trial.
the user was eligible for trail when he created the list refers to user_eligile_for_trail = 1; user 32172230 refers to user_id = 32172230;
SELECT T1.list_title FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.user_id = 32172230 AND T2.user_eligible_for_trial = 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists_users ( user_id integer, list_id integer, list_creation_date_utc text, user_trialist integer, user_avatar_image_url text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_subscriber integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_url text, rating_timestamp_utc text, critic text, critic_comments integer, user_id integer, user_trialist integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_movie_number integer, list_url text, list_comments integer, list_cover_image_url text, list_first_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: the user was a paying subscriber when he created the list refers to user_has_payment_method = 1;  movie lists with over 100 refers to list_movie_number >100;  user 85981819 refers to user_id = 85981819; How many movie lists with over 100 movies had user 85981819 created when he or she was a paying subscriber? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Highly Complex
0
How many movie lists with over 100 movies had user 85981819 created when he or she was a paying subscriber?
the user was a paying subscriber when he created the list refers to user_has_payment_method = 1;  movie lists with over 100 refers to list_movie_number >100;  user 85981819 refers to user_id = 85981819;
SELECT COUNT(*) FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.user_id = 85981819 AND T1.list_movie_number > 100 AND T2.user_has_payment_method = 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_title_language text, movie_popularity integer, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_second_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: user 85981819 refers to user_id = 85981819; most followers refers to Max(list_followers); description refers to list_descriptions; What's the description of user 85981819's movie list with the most followers? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
9
What's the description of user 85981819's movie list with the most followers?
user 85981819 refers to user_id = 85981819; most followers refers to Max(list_followers); description refers to list_descriptions;
SELECT T1.list_description FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.user_id = 85981819 ORDER BY T1.list_followers DESC LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, critic_comments integer, user_id integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_creation_timestamp_utc text, list_comments integer, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, user_trialist integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_cover_image_url text, user_eligible_for_trial text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE movies ( movie_id integer, director_id text, director_url text, PRIMARY KEY (movie_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: 250 Favourite Films refers to list_title; last update refers to list_update_date_utc; When did the creator of the list "250 Favourite Films" last updated a movie list? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Complex
1
When did the creator of the list "250 Favourite Films" last updated a movie list?
250 Favourite Films refers to list_title; last update refers to list_update_date_utc;
SELECT T2.list_update_date_utc FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.list_title = '250 Favourite Films' ORDER BY T2.list_update_date_utc DESC LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, movie_popularity integer, movie_image_url text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_update_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: 250 Favourite Films refers to list_title; avatar image refers to user_avatar_image_url; What's the avatar image of the user who created the movie list "250 Favourite Films"? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Moderate
7
What's the avatar image of the user who created the movie list "250 Favourite Films"?
250 Favourite Films refers to list_title; avatar image refers to user_avatar_image_url;
SELECT T2.user_avatar_image_url FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.list_title = '250 Favourite Films'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_update_timestamp_utc text, list_comments integer, list_description text, list_cover_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_eligible_for_trial integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_subscriber integer, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_popularity integer, director_name text, director_url text, PRIMARY KEY (movie_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: 250 Favourite Films refers to list_title; How many more movie lists were created by the user who created the movie list "250 Favourite Films"? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
How many more movie lists were created by the user who created the movie list "250 Favourite Films"?
250 Favourite Films refers to list_title;
SELECT COUNT(list_id) FROM lists_users WHERE user_id = ( SELECT user_id FROM lists WHERE list_title = '250 Favourite Films' )
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, critic text, critic_comments integer, user_id integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: Tokyo Eyes' is movie_title, director refers to director_name; Who was the director of the movie "Tokyo Eyes"? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
Who was the director of the movie "Tokyo Eyes"?
Tokyo Eyes' is movie_title, director refers to director_name;
SELECT director_name FROM movies WHERE movie_title = 'Tokyo Eyes'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_url text, list_comments integer, list_cover_image_url text, list_second_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings_users ( user_id integer, user_trialist integer, user_subscriber integer, user_cover_image_url text, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_subscriber integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_release_year integer, movie_url text, movie_title_language text, movie_popularity integer, director_id text, director_name text, PRIMARY KEY (movie_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: film released in 2007 refers to movie_release_year = 2007; film refers to movie How many films were released in 2007? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
How many films were released in 2007?
film released in 2007 refers to movie_release_year = 2007; film refers to movie
SELECT COUNT(*) FROM movies WHERE movie_release_year = 2007
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings_users ( user_id integer, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, movie_popularity integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, user_trialist integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, critic text, critic_comments integer, user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: released in 2006 refers to movie_release_year = 2006; most popular refers to Max(movie_popularity); film refers to movie; Which of the films released in 2006 was the most popular among Mubi users? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
9
Which of the films released in 2006 was the most popular among Mubi users?
released in 2006 refers to movie_release_year = 2006; most popular refers to Max(movie_popularity); film refers to movie;
SELECT movie_title FROM movies WHERE movie_release_year = 2006 ORDER BY movie_popularity DESC LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_avatar_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: Ake Sandgren is the director name;  film refers to movie How many films did Åke Sandgren direct? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
How many films did Åke Sandgren direct?
Ake Sandgren is the director name;  film refers to movie
SELECT COUNT(movie_title) FROM movies WHERE director_name = 'Åke Sandgren'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, movie_popularity integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: Cops' is movie_title; released refers to movie_release_year; When was the movie Cops released? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
When was the movie Cops released?
Cops' is movie_title; released refers to movie_release_year;
SELECT movie_release_year FROM movies WHERE movie_title = 'Cops'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_url text, rating_timestamp_utc text, critic text, critic_likes integer, user_id integer, user_trialist integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_title_language text, movie_popularity integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: It's Winter' is movie_title; Please list the id of the director of the movie "It's Winter". Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
Please list the id of the director of the movie "It's Winter".
It's Winter' is movie_title;
SELECT director_id FROM movies WHERE movie_title = 'It''s Winter'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_comments integer, list_description text, list_first_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_title_language text, director_id text, director_name text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_score integer, critic text, critic_likes integer, critic_comments integer, user_id integer, user_subscriber integer, user_eligible_for_trial integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_avatar_image_url text, user_eligible_for_trial text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings_users ( user_id integer, user_subscriber integer, user_cover_image_url text, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: most followers refers to Max(list_followers); Please provide the ID of the user with the most followers on the list. Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
Please provide the ID of the user with the most followers on the list.
most followers refers to Max(list_followers);
SELECT user_id FROM lists ORDER BY list_followers DESC LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, movie_popularity integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: the most comments refers to Max(list_comments); Please provide the title of the list with the most comments on the list. Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Highly Complex
0
Please provide the title of the list with the most comments on the list.
the most comments refers to Max(list_comments);
SELECT list_title FROM lists GROUP BY list_title ORDER BY COUNT(list_comments) DESC LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists_users ( user_id integer, list_id integer, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_popularity integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings ( movie_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_cover_image_url text, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_comments integer, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: Play it cool' is list_title; cover image of user refers to user_cover_image_url; What's the cover image of the user who created the movie list 'Georgia related films'? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Moderate
7
What's the cover image of the user who created the movie list 'Georgia related films'?
Play it cool' is list_title; cover image of user refers to user_cover_image_url;
SELECT T1.user_cover_image_url FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_title LIKE 'Georgia related films'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE movies ( movie_id integer, movie_title_language text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, user_avatar_image_url text, user_cover_image_url text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_followers integer, list_url text, list_comments integer, list_description text, list_first_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, critic_likes integer, user_id integer, user_trialist integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: followers refers to list_followers; How many followers does the list created by the user whose user_avatar_image_url is https://assets.mubicdn.net/images/avatars/74983/images-w150.jpg?1523895214 have? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Complex
2
How many followers does the list created by the user whose user_avatar_image_url is https://assets.mubicdn.net/images/avatars/74983/images-w150.jpg?1523895214 have?
followers refers to list_followers;
SELECT SUM(T2.list_followers) FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T1.user_avatar_image_url = 'https://assets.mubicdn.net/images/avatars/74983/images-w150.jpg?1523895214'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings_users ( user_id integer, user_trialist integer, user_avatar_image_url text, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_release_year integer, movie_url text, movie_popularity integer, director_id text, director_name text, PRIMARY KEY (movie_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_first_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_avatar_image_url text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings ( movie_id integer, rating_url text, critic_likes integer, user_id integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: user 85981819 refers to user_id = 85981819;  first list created refers to Min (list_creation_date_utc); What was the title of the first list created by a user 85981819? And please provide the user_avatar_image_url. Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Complex
2
What was the title of the first list created by a user 85981819? And please provide the user_avatar_image_url.
user 85981819 refers to user_id = 85981819;  first list created refers to Min (list_creation_date_utc);
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
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_avatar_image_url text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_timestamp_utc text, critic text, user_id integer, user_trialist integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_release_year integer, movie_url text, movie_title_language text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings_users ( user_id integer, user_trialist integer, user_avatar_image_url text, user_cover_image_url text, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_comments integer, list_description text, list_first_image_url text, list_second_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: year refers to movie_release_year; most release films refers to MAX(COUNT(movie_id)) Which year had the most released films? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
Which year had the most released films?
year refers to movie_release_year; most release films refers to MAX(COUNT(movie_id))
SELECT movie_release_year FROM movies GROUP BY movie_release_year ORDER BY COUNT(movie_id) DESC LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings_users ( user_id integer, user_trialist integer, user_avatar_image_url text, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, user_subscriber integer, user_cover_image_url text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_url text, movie_title_language text, movie_popularity integer, movie_image_url text, director_id text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings ( movie_id integer, rating_url text, rating_score integer, user_id integer, user_subscriber integer, user_eligible_for_trial integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: director that made the most movies refers to MAX(COUNT(movie_id)) Who is the director that made the most movies? Give the director's id. Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
9
Who is the director that made the most movies? Give the director's id.
director that made the most movies refers to MAX(COUNT(movie_id))
SELECT director_id FROM movies GROUP BY director_id ORDER BY COUNT(movie_id) DESC LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, critic text, critic_comments integer, user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_avatar_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_movie_number integer, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_second_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_release_year integer, movie_popularity integer, movie_image_url text, director_id text, director_name text, PRIMARY KEY (movie_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: highest movie popularity refers to MAX(movie_popularity) How many movies did the director of the highest movie popularity make? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
How many movies did the director of the highest movie popularity make?
highest movie popularity refers to MAX(movie_popularity)
SELECT COUNT(movie_id) FROM movies WHERE director_id = ( SELECT director_id FROM movies ORDER BY movie_popularity DESC LIMIT 1 )
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_description text, list_first_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, movie_popularity integer, movie_image_url text, director_id text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: earliest user created a list refers to MIN(list_creation_date_utc); didn't get any followers refers to user_subscriber = 0 Who was the earliest user created a list but didn't get any followers? Give the user ID. Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Complex
2
Who was the earliest user created a list but didn't get any followers? Give the user ID.
earliest user created a list refers to MIN(list_creation_date_utc); didn't get any followers refers to user_subscriber = 0
SELECT user_id FROM lists_users WHERE user_subscriber = 0 ORDER BY list_creation_date_utc LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_title_language text, movie_popularity integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: the list "Vladimir Vladimirovich Nabokov" refers to list_title = 'Vladimir Vladimirovich Nabokov'; portrait picture refers to user_avatar_image_url Show the portrait picture of the user who created the list "Vladimir Vladimirovich Nabokov". Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Moderate
7
Show the portrait picture of the user who created the list "Vladimir Vladimirovich Nabokov".
the list "Vladimir Vladimirovich Nabokov" refers to list_title = 'Vladimir Vladimirovich Nabokov'; portrait picture refers to user_avatar_image_url
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'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings_users ( user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, user_trialist integer, user_avatar_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_url text, movie_title_language text, movie_image_url text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_movie_number integer, list_comments integer, list_description text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_url text, rating_score integer, critic text, user_id integer, user_trialist integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: the list that contained the most number of the movies refers to MAX(list_movie_number); user_has_payment_method = 1 means the user was a paying subscriber when he created the list ; user_has_payment_method = 0 means the user was not a paying subscriber when he created the list For the user who post the list that contained the most number of the movies, is he/she a paying subscriber when creating that list? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Complex
4
For the user who post the list that contained the most number of the movies, is he/she a paying subscriber when creating that list?
the list that contained the most number of the movies refers to MAX(list_movie_number); user_has_payment_method = 1 means the user was a paying subscriber when he created the list ; user_has_payment_method = 0 means the user was not a paying subscriber when he created the 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 )
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE movies ( movie_id integer, movie_title text, movie_url text, movie_title_language text, movie_image_url text, director_id text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_comments integer, list_description text, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: got more than 3000 followers refers to list_followers > 3000; paying subscribers refer to user_has_payment_method = 1 For the lists that got more than 3000 followers, how many did the users who created those lists are paying subscribers? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Moderate
6
For the lists that got more than 3000 followers, how many did the users who created those lists are paying subscribers?
got more than 3000 followers refers to list_followers > 3000; paying subscribers refer to user_has_payment_method = 1
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
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_url text, critic text, critic_comments integer, user_id integer, user_subscriber integer, user_eligible_for_trial integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_popularity integer, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_description text, list_first_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_subscriber integer, user_cover_image_url text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: was a subscriber refers to user_subscriber = 1; percentage refers to DIVIDE(COUNT(user_subscriber = 1),COUNT(list_id)) What is the percentage of list created by user who was a subscriber when he created the list? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Moderate
5
What is the percentage of list created by user who was a subscriber when he created the list?
was a subscriber refers to user_subscriber = 1; percentage refers to DIVIDE(COUNT(user_subscriber = 1),COUNT(list_id))
SELECT CAST(SUM(CASE WHEN user_subscriber = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(list_id) FROM lists_users
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_subscriber integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings_users ( user_id integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, movie_popularity integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_first_image_url text, list_second_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: was a subscriber refers to user_subscriber = 1 Name all lists created by a user who was a subcriber when created the list. Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Highly Complex
0
Name all lists created by a user who was a subcriber when created the list.
was a subscriber refers to user_subscriber = 1
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
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_avatar_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, movie_image_url text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_creation_timestamp_utc text, list_comments integer, list_description text, list_cover_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, critic text, critic_likes integer, user_id integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: eligible for trial refers to user_eligible_for_trial = 1 Provide list titles created by user who are eligible for trial when he created the list. Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Moderate
8
Provide list titles created by user who are eligible for trial when he created the list.
eligible for trial refers to user_eligible_for_trial = 1
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
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_score integer, rating_timestamp_utc text, critic_likes integer, critic_comments integer, user_id integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_first_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_title_language text, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: lists with at least one follower refers to list_followers > = 1; was a subscriber refers to user_subscriber = 1 Among the lists with at least one follower, how many were created by user who was subscriber when created the list? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Complex
4
Among the lists with at least one follower, how many were created by user who was subscriber when created the list?
lists with at least one follower refers to list_followers > = 1; was a subscriber refers to user_subscriber = 1
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
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_popularity integer, movie_image_url text, director_id text, PRIMARY KEY (movie_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_eligible_for_trial text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: at least 200 movies in the list refers to list_movie_number > 200; average number of followers refers to avg(list_followers) For all list titles with at least 200 movies in the list, what is their average number of followers? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
For all list titles with at least 200 movies in the list, what is their average number of followers?
at least 200 movies in the list refers to list_movie_number > 200; average number of followers refers to avg(list_followers)
SELECT AVG(list_followers) FROM lists WHERE list_movie_number > 200
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, movie_popularity integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: have less than 50 movies in the list refers to list_movie_number <50; was a subscriber refers to user_subscriber = 1 List all the titles created by user who was a subsriber when he created the list and have less than 50 movies in the list. Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Moderate
8
List all the titles created by user who was a subsriber when he created the list and have less than 50 movies in the list.
have less than 50 movies in the list refers to list_movie_number <50; was a subscriber refers to user_subscriber = 1
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
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_subscriber integer, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, movie_popularity integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: not been updated for the longest period of time refers to MIN(list_update_timestamp_utc); how long it has not been updated refers to SUBTRACT(CURRENT_TIMESTAMP, list_update_timestamp_utc) Which title list has not been updated for the longest period of time? State how long it has not been updated? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
Which title list has not been updated for the longest period of time? State how long it has not been updated?
not been updated for the longest period of time refers to MIN(list_update_timestamp_utc); how long it has not been updated refers to SUBTRACT(CURRENT_TIMESTAMP, list_update_timestamp_utc)
SELECT list_title , datetime(CURRENT_TIMESTAMP, 'localtime') - datetime(list_update_timestamp_utc) FROM lists ORDER BY list_update_timestamp_utc LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_creation_timestamp_utc text, list_comments integer, list_cover_image_url text, list_first_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, user_subscriber integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_url text, critic_likes integer, critic_comments integer, user_id integer, user_subscriber integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, PRIMARY KEY (movie_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_creation_date_utc text, user_subscriber integer, user_cover_image_url text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: list titled 'Sound and Vision' refers to list_title = 'Sound and Vision'; user_subscriber = 1 means the user was a subscriber when he rated the movie; user_subscriber = 0 means the user was not a subscriber when he rated the movie Who is the user who created the list titled 'Sound and Vision'? Was he a subcriber when he created the list? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
9
Who is the user who created the list titled 'Sound and Vision'? Was he a subcriber when he created the list?
list titled 'Sound and Vision' refers to list_title = 'Sound and Vision'; user_subscriber = 1 means the user was a subscriber when he rated the movie; user_subscriber = 0 means the user was not a subscriber when he rated the movie
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'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_creation_timestamp_utc text, list_followers integer, list_comments integer, list_cover_image_url text, list_first_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE movies ( movie_id integer, movie_release_year integer, movie_title_language text, movie_image_url text, director_name text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_timestamp_utc text, critic text, critic_likes integer, user_id integer, user_subscriber integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: more than 200 followers refers to list_followers >200; how long the list has been created refers to SUBTRACT(CURRENT_TIMESTAMP,list_creation_timestamp_utc) For the list with more than 200 followers, state the title and how long the list has been created? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Highly Complex
0
For the list with more than 200 followers, state the title and how long the list has been created?
more than 200 followers refers to list_followers >200; how long the list has been created refers to SUBTRACT(CURRENT_TIMESTAMP,list_creation_timestamp_utc)
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
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE lists_users ( user_id integer, list_id integer, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE movies ( movie_id integer, movie_release_year integer, movie_title_language text, movie_popularity integer, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE ratings ( movie_id integer, rating_url text, rating_timestamp_utc text, critic_likes integer, user_id integer, user_eligible_for_trial integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, user_avatar_image_url text, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: Between 1970 to 1980 refers to movie_release_year between 1970 and 1980; popularity of more than 11,000 refers movie_popularity >11000 Between 1970 to 1980, how many movies with a popularity of more than 11,000 were released? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
Between 1970 to 1980, how many movies with a popularity of more than 11,000 were released?
Between 1970 to 1980 refers to movie_release_year between 1970 and 1980; popularity of more than 11,000 refers movie_popularity >11000
SELECT COUNT(movie_id) FROM movies WHERE movie_release_year BETWEEN '1970' AND '1980' AND movie_popularity > 11000
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, movie_popularity integer, movie_image_url text, director_id text, director_name text, director_url text, PRIMARY KEY (movie_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_trialist integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_cover_image_url text, list_first_image_url text, list_second_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_subscriber integer, user_avatar_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: directed by Felipe Cazals refers to director_name = 'Felipe Cazals' ; realeased on 1976 refers to movie_release_year = 1976 How many movies directed by Felipe Cazals was realeased on 1976? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
How many movies directed by Felipe Cazals was realeased on 1976?
directed by Felipe Cazals refers to director_name = 'Felipe Cazals' ; realeased on 1976 refers to movie_release_year = 1976
SELECT COUNT(movie_id) FROM movies WHERE movie_release_year = 1976 AND director_name LIKE 'Felipe Cazals'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_cover_image_url text, user_eligible_for_trial text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_creation_timestamp_utc text, list_followers integer, list_url text, list_comments integer, list_description text, list_first_image_url text, list_third_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, critic_comments integer, user_id integer, user_subscriber integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, movie_popularity integer, movie_image_url text, director_id text, director_url text, PRIMARY KEY (movie_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: movie titled "Red Blooded American Girl" refers to movie_title = 'Red Blooded American Girl' What is the URL to the movie director page on Mubi of the movie titled "Red Blooded American Girl" Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Moderate
5
What is the URL to the movie director page on Mubi of the movie titled "Red Blooded American Girl"
movie titled "Red Blooded American Girl" refers to movie_title = 'Red Blooded American Girl'
SELECT director_url FROM movies WHERE movie_title LIKE 'Red Blooded American Girl'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_trialist integer, user_subscriber integer, user_avatar_image_url text, user_cover_image_url text, user_eligible_for_trial integer, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, list_creation_date_utc text, user_trialist integer, user_subscriber integer, user_cover_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_movie_number integer, list_update_timestamp_utc text, list_followers integer, list_url text, list_description text, list_cover_image_url text, list_first_image_url text, list_second_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings ( movie_id integer, rating_id integer, rating_url text, rating_score integer, rating_timestamp_utc text, critic text, critic_likes integer, user_id integer, user_trialist integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, movie_url text, movie_title_language text, movie_image_url text, director_name text, director_url text, PRIMARY KEY (movie_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: updated most recently refers to MAX(list_update_date_utc) What is the name of the list that was updated most recently? Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Highly Complex
0
What is the name of the list that was updated most recently?
updated most recently refers to MAX(list_update_date_utc)
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 )
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE ratings ( movie_id integer, rating_id integer, critic_likes integer, critic_comments integer, user_id integer, user_has_payment_method integer, CONSTRAINT fk_ratings_movie_id FOREIGN KEY (movie_id) REFERENCES movies (movie_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES ratings_users (user_id), CONSTRAINT fk_ratings_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE ratings_users ( user_id integer, rating_date_utc text, user_cover_image_url text, user_has_payment_method integer, CONSTRAINT fk_ratings_users_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); CREATE TABLE lists_users ( user_id integer, list_id integer, list_update_date_utc text, user_subscriber integer, user_avatar_image_url text, user_eligible_for_trial text, user_has_payment_method text, PRIMARY KEY (user_id, list_id), CONSTRAINT fk_lists_users_user_id FOREIGN KEY (user_id) REFERENCES lists (user_id), CONSTRAINT fk_lists_users_list_id FOREIGN KEY (list_id) REFERENCES lists (list_id) ); CREATE TABLE movies ( movie_id integer, movie_title text, movie_release_year integer, director_id text, PRIMARY KEY (movie_id) ); CREATE TABLE lists ( user_id integer, list_id integer, list_title text, list_comments integer, list_first_image_url text, list_second_image_url text, PRIMARY KEY (list_id), CONSTRAINT fk_lists_user_id FOREIGN KEY (user_id) REFERENCES lists_users (user_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: list that has 142 comments refers to list_comments = 142 Who created the list that has 142 comments? Indicate the user id of the user, if there are multiple lists with 142 comments, list the user id of the person who created the list Let's think step by step and output the final SQL query within ```sql and ```.
movie_platform
bird
Simple
10
Who created the list that has 142 comments? Indicate the user id of the user, if there are multiple lists with 142 comments, list the user id of the person who created the list
list that has 142 comments refers to list_comments = 142
SELECT user_id FROM lists WHERE list_comments = 142
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE titleauthor ( au_id text, title_id text, PRIMARY KEY (au_id, title_id), CONSTRAINT fk_titleauthor_au_id FOREIGN KEY (au_id) REFERENCES authors (au_id), CONSTRAINT fk_titleauthor_title_id FOREIGN KEY (title_id) REFERENCES titles (title_id) ); CREATE TABLE authors ( au_id text, address text, PRIMARY KEY (au_id) ); CREATE TABLE publishers ( pub_id text, PRIMARY KEY (pub_id) ); CREATE TABLE titles ( title_id text, pub_id text, royalty integer, PRIMARY KEY (title_id), CONSTRAINT fk_titles_pub_id FOREIGN KEY (pub_id) REFERENCES publishers (pub_id) ); CREATE TABLE jobs ( job_id integer, PRIMARY KEY (job_id) ); CREATE TABLE stores ( stor_id text, stor_address text, zip text, PRIMARY KEY (stor_id) ); CREATE TABLE pub_info ( pub_id text, PRIMARY KEY (pub_id), CONSTRAINT fk_pub_info_pub_id FOREIGN KEY (pub_id) REFERENCES publishers (pub_id) ); CREATE TABLE roysched ( title_id text, hirange integer, royalty integer, CONSTRAINT fk_roysched_title_id FOREIGN KEY (title_id) REFERENCES titles (title_id) ); CREATE TABLE sales ( stor_id text, ord_num text, ord_date datetime, qty integer, payterms text, title_id text, PRIMARY KEY (stor_id, ord_num, title_id), CONSTRAINT fk_sales_stor_id FOREIGN KEY (stor_id) REFERENCES stores (stor_id), CONSTRAINT fk_sales_title_id FOREIGN KEY (title_id) REFERENCES titles (title_id) ); CREATE TABLE employee ( emp_id text, lname text, job_id integer, pub_id text, PRIMARY KEY (emp_id), CONSTRAINT fk_employee_job_id FOREIGN KEY (job_id) REFERENCES jobs (job_id), CONSTRAINT fk_employee_pub_id FOREIGN KEY (pub_id) REFERENCES publishers (pub_id) ); CREATE TABLE discounts ( stor_id text, highqty integer, CONSTRAINT fk_discounts_stor_id FOREIGN KEY (stor_id) REFERENCES stores (stor_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: total quantity refers to qty; most ordered quantity refers to order with the highest quantity where MAX(sum(qty)) Which date has the most ordered quantity? What is the total order quantity on that day? Let's think step by step and output the final SQL query within ```sql and ```.
book_publishing_company
bird
Simple
10
Which date has the most ordered quantity? What is the total order quantity on that day?
total quantity refers to qty; most ordered quantity refers to order with the highest quantity where MAX(sum(qty))
SELECT ord_date, SUM(qty) FROM sales GROUP BY ord_date ORDER BY SUM(qty) DESC LIMIT 1
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE pub_info ( pub_id text, logo blob, pr_info text, PRIMARY KEY (pub_id), CONSTRAINT fk_pub_info_pub_id FOREIGN KEY (pub_id) REFERENCES publishers (pub_id) ); CREATE TABLE stores ( stor_id text, stor_name text, stor_address text, city text, state text, zip text, PRIMARY KEY (stor_id) ); CREATE TABLE discounts ( discounttype text, stor_id text, lowqty integer, highqty integer, discount real, CONSTRAINT fk_discounts_stor_id FOREIGN KEY (stor_id) REFERENCES stores (stor_id) ); CREATE TABLE titles ( title_id text, title text, type text, pub_id text, price real, advance real, royalty integer, ytd_sales integer, notes text, pubdate datetime, PRIMARY KEY (title_id), CONSTRAINT fk_titles_pub_id FOREIGN KEY (pub_id) REFERENCES publishers (pub_id) ); CREATE TABLE roysched ( title_id text, lorange integer, hirange integer, royalty integer, CONSTRAINT fk_roysched_title_id FOREIGN KEY (title_id) REFERENCES titles (title_id) ); CREATE TABLE employee ( emp_id text, fname text, minit text, lname text, job_id integer, job_lvl integer, pub_id text, hire_date datetime, PRIMARY KEY (emp_id), CONSTRAINT fk_employee_job_id FOREIGN KEY (job_id) REFERENCES jobs (job_id), CONSTRAINT fk_employee_pub_id FOREIGN KEY (pub_id) REFERENCES publishers (pub_id) ); CREATE TABLE authors ( au_id text, au_lname text, au_fname text, phone text, address text, city text, state text, zip text, contract text, PRIMARY KEY (au_id) ); CREATE TABLE jobs ( job_id integer, job_desc text, min_lvl integer, max_lvl integer, PRIMARY KEY (job_id) ); CREATE TABLE publishers ( pub_id text, pub_name text, city text, state text, country text, PRIMARY KEY (pub_id) ); CREATE TABLE titleauthor ( au_id text, title_id text, au_ord integer, royaltyper integer, PRIMARY KEY (au_id, title_id), CONSTRAINT fk_titleauthor_au_id FOREIGN KEY (au_id) REFERENCES authors (au_id), CONSTRAINT fk_titleauthor_title_id FOREIGN KEY (title_id) REFERENCES titles (title_id) ); CREATE TABLE sales ( stor_id text, ord_num text, ord_date datetime, qty integer, payterms text, title_id text, PRIMARY KEY (stor_id, ord_num, title_id), CONSTRAINT fk_sales_stor_id FOREIGN KEY (stor_id) REFERENCES stores (stor_id), CONSTRAINT fk_sales_title_id FOREIGN KEY (title_id) REFERENCES titles (title_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: total quantity refers to qty; most ordered quantity refers to order with the highest quantity where MAX(count(qty)); date refers to ord_date; year 1992 refers to YEAR(ord_date) = 1992 What is the title with the most ordered quantity in year 1992? Let's think step by step and output the final SQL query within ```sql and ```.
book_publishing_company
bird
Simple
9
What is the title with the most ordered quantity in year 1992?
total quantity refers to qty; most ordered quantity refers to order with the highest quantity where MAX(count(qty)); date refers to ord_date; year 1992 refers to YEAR(ord_date) = 1992
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
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE sales ( stor_id text, ord_num text, payterms text, title_id text, PRIMARY KEY (stor_id, ord_num, title_id), CONSTRAINT fk_sales_stor_id FOREIGN KEY (stor_id) REFERENCES stores (stor_id), CONSTRAINT fk_sales_title_id FOREIGN KEY (title_id) REFERENCES titles (title_id) ); CREATE TABLE stores ( stor_id text, stor_name text, state text, zip text, PRIMARY KEY (stor_id) ); CREATE TABLE employee ( emp_id text, fname text, minit text, job_id integer, job_lvl integer, pub_id text, hire_date datetime, PRIMARY KEY (emp_id), CONSTRAINT fk_employee_job_id FOREIGN KEY (job_id) REFERENCES jobs (job_id), CONSTRAINT fk_employee_pub_id FOREIGN KEY (pub_id) REFERENCES publishers (pub_id) ); CREATE TABLE jobs ( job_id integer, min_lvl integer, PRIMARY KEY (job_id) ); CREATE TABLE publishers ( pub_id text, city text, state text, country text, PRIMARY KEY (pub_id) ); CREATE TABLE roysched ( title_id text, lorange integer, hirange integer, royalty integer, CONSTRAINT fk_roysched_title_id FOREIGN KEY (title_id) REFERENCES titles (title_id) ); CREATE TABLE titles ( title_id text, title text, pub_id text, price real, advance real, notes text, pubdate datetime, PRIMARY KEY (title_id), CONSTRAINT fk_titles_pub_id FOREIGN KEY (pub_id) REFERENCES publishers (pub_id) ); CREATE TABLE pub_info ( pub_id text, logo blob, PRIMARY KEY (pub_id), CONSTRAINT fk_pub_info_pub_id FOREIGN KEY (pub_id) REFERENCES publishers (pub_id) ); CREATE TABLE authors ( au_id text, au_fname text, address text, city text, state text, PRIMARY KEY (au_id) ); CREATE TABLE discounts ( discounttype text, stor_id text, discount real, CONSTRAINT fk_discounts_stor_id FOREIGN KEY (stor_id) REFERENCES stores (stor_id) ); CREATE TABLE titleauthor ( au_id text, title_id text, au_ord integer, royaltyper integer, PRIMARY KEY (au_id, title_id), CONSTRAINT fk_titleauthor_au_id FOREIGN KEY (au_id) REFERENCES authors (au_id), CONSTRAINT fk_titleauthor_title_id FOREIGN KEY (title_id) REFERENCES titles (title_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: publication date refers to pubdate; payment terms refers to payterms; payterms = 'ON invoice' List the title, price and publication date for all sales with 'ON invoice' payment terms. Let's think step by step and output the final SQL query within ```sql and ```.
book_publishing_company
bird
Moderate
6
List the title, price and publication date for all sales with 'ON invoice' payment terms.
publication date refers to pubdate; payment terms refers to payterms; payterms = 'ON invoice'
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'
Task Overview: You are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question. Database Engine: SQLite Database Schema: CREATE TABLE titles ( title_id text, title text, pub_id text, price real, royalty integer, pubdate datetime, PRIMARY KEY (title_id), CONSTRAINT fk_titles_pub_id FOREIGN KEY (pub_id) REFERENCES publishers (pub_id) ); CREATE TABLE authors ( au_id text, address text, state text, PRIMARY KEY (au_id) ); CREATE TABLE stores ( stor_id text, state text, PRIMARY KEY (stor_id) ); CREATE TABLE sales ( stor_id text, ord_num text, ord_date datetime, title_id text, PRIMARY KEY (stor_id, ord_num, title_id), CONSTRAINT fk_sales_stor_id FOREIGN KEY (stor_id) REFERENCES stores (stor_id), CONSTRAINT fk_sales_title_id FOREIGN KEY (title_id) REFERENCES titles (title_id) ); CREATE TABLE jobs ( job_id integer, min_lvl integer, PRIMARY KEY (job_id) ); CREATE TABLE pub_info ( pub_id text, PRIMARY KEY (pub_id), CONSTRAINT fk_pub_info_pub_id FOREIGN KEY (pub_id) REFERENCES publishers (pub_id) ); CREATE TABLE employee ( emp_id text, job_id integer, job_lvl integer, pub_id text, PRIMARY KEY (emp_id), CONSTRAINT fk_employee_job_id FOREIGN KEY (job_id) REFERENCES jobs (job_id), CONSTRAINT fk_employee_pub_id FOREIGN KEY (pub_id) REFERENCES publishers (pub_id) ); CREATE TABLE titleauthor ( au_id text, title_id text, au_ord integer, PRIMARY KEY (au_id, title_id), CONSTRAINT fk_titleauthor_au_id FOREIGN KEY (au_id) REFERENCES authors (au_id), CONSTRAINT fk_titleauthor_title_id FOREIGN KEY (title_id) REFERENCES titles (title_id) ); CREATE TABLE publishers ( pub_id text, country text, PRIMARY KEY (pub_id) ); CREATE TABLE discounts ( discounttype text, stor_id text, lowqty integer, CONSTRAINT fk_discounts_stor_id FOREIGN KEY (stor_id) REFERENCES stores (stor_id) ); CREATE TABLE roysched ( title_id text, lorange integer, royalty integer, CONSTRAINT fk_roysched_title_id FOREIGN KEY (title_id) REFERENCES titles (title_id) ); This schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints. Question: at least 10% royalty refers to royalty > = 10; minimum range is synonym for low range which refers to lorange; without minimum range amount refers to lorange <> 0 What is the title that have at least 10% royalty without minimum range amount. Let's think step by step and output the final SQL query within ```sql and ```.
book_publishing_company
bird
Simple
10
What is the title that have at least 10% royalty without minimum range amount.
at least 10% royalty refers to royalty > = 10; minimum range is synonym for low range which refers to lorange; without minimum range amount refers to lorange <> 0
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
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
44