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 integ... | 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... | 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... | 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,
ratin... | 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,
ratin... | 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 in... | 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... | 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,
ratin... | 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... | 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... | 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 ... | 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... | 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,
ratin... | 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... | 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... | 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 integ... | 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... | 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... | 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 in... | 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 integ... | 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... | 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... | 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 ... | 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... | 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 integ... | 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... | 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 integ... | 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_... | 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 integ... | 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... | 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... | 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 integ... | 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 integ... | 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... | 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... | 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_... | 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... | 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_... | 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,
ratin... | 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 integ... | 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... | 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_... | 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... | 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,
ratin... | 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 ... | 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... | 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 ... | 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 integ... | 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... | 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 ... | 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 integ... | 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 integ... | 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... | 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... | 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,
ratin... | 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,
ratin... | 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 ... | 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 tex... | 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,
... | 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,
... | 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,
... | 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
- 6