Chinastark/bird_dataset huggingface dataset:
Database: movie_platform
Note: paying subscribers refers to user_has_payment_method = 1; rating a movie after the year 2014 refers to rating_date_utc>'2014%';
Question: What's the number of the paying subscribers when rating a movie after the year 2014?
SQL: SELECT count(user_subscriber) FROM ratings_users WHERE user_has_payment_method = 1 AND rating_date_utc > '2014%'
Database: movie_platform
Note: earliest user created a list refers to MIN(list_creation_date_utc); didn't get any followers refers to user_subscriber = 0;
Question: Who was the earliest user created a list but didn't get any followers? Give the user ID.
SQL: SELECT user_id FROM lists_users WHERE user_subscriber = 0 ORDER BY list_creation_date_utc LIMIT 1
Database: movie_platform
Note: number of followers refers to user_subscriber; posted the most lists refers to MAX(COUNT(list_id));
Question: Give the number of followers for the user who posted the most lists.
SQL: SELECT sum(LISTS.list_followers) FROM LISTS INNER JOIN lists_users ON LISTS.list_id = lists_users.list_id GROUP BY LISTS.user_id ORDER BY count(LISTS.list_id) DESC LIMIT 1
Database: movie_platform
Note: the list "Non-American Films about World War II" refers to list_title = 'Non-American Films about World War II';
Question: How many followers did the user who posted the list "Non-American Films about World War II" have?
SQL: SELECT sum(LISTS.list_followers) FROM lists_users INNER JOIN LISTS ON lists_users.list_id = LISTS.list_id WHERE LISTS.list_title LIKE 'Non-American Films about World War II'
Database: movie_platform
Note: movie "Downfall" refers to movie_title = 'Downfall'; rating of "4" refers to rating_score = 4;
Question: What's the number of users gave the movie "Downfall" a rating of "4"?
SQL: SELECT count(ratings.user_id) FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE movies.movie_title = 'Downfall' AND ratings.rating_score = 4
Database: movie_platform
Note: 5 ratings refers to rating_score = 5; name of the movie refers to movie_title;
Question: Give the name of the movie that got the most "5" ratings.
SQL: SELECT movies.movie_title FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE ratings.rating_score = 5
Database: movie_platform
Note: name of the movie refers to movie_title; most critic comments refers to MAX(critic_comments);
Question: Which movie got the most critic comments? Give the name of the movie.
SQL: SELECT movies.movie_title FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id GROUP BY movies.movie_title ORDER BY count(ratings.critic_comments) DESC LIMIT 1
Database: movie_platform
Note: at 2019/10/17 1:36:36 refers to rating_timestamp_utc = '2019/10/17 1:36:36'; avatar of the user refers to user_avatar_image_url;
Question: Show the avatar of the user who gave the rating at 2019/10/17 1:36:36.
SQL: SELECT lists_users.user_avatar_image_url FROM ratings INNER JOIN lists_users ON ratings.user_id = lists_users.user_id WHERE ratings.rating_timestamp_utc LIKE '2019-10-17 01:36:36'
Database: movie_platform
Note: the list "Vladimir Vladimirovich Nabokov" refers to list_title = 'Vladimir Vladimirovich Nabokov'; portrait picture refers to user_avatar_image_url;
Question: Show the portrait picture of the user who created the list "Vladimir Vladimirovich Nabokov".
SQL: SELECT lists_users.user_avatar_image_url FROM lists_users INNER JOIN LISTS ON lists_users.list_id = LISTS.list_id WHERE LISTS.list_title LIKE 'Vladimir Vladimirovich Nabokov'
Database: movie_platform
Note: 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;
Question: 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?
SQL: SELECT lists_users.user_has_payment_method FROM lists_users INNER JOIN LISTS ON lists_users.list_id = LISTS.list_id WHERE LISTS.list_movie_number = ( SELECT max(list_movie_number) FROM LISTS )
Database: movie_platform
Note: head portrait refers to user_avatar_image_url; "5" ratings refers to rating_score = 5;
Question: Show the head portrait of the user who gave the most "5" ratings.
SQL: SELECT lists_users.user_avatar_image_url FROM ratings INNER JOIN lists_users ON ratings.user_id = lists_users.user_id WHERE ratings.rating_score = 5
Database: movie_platform
Note: most movie popularity number refers to MAX(movie_popularity);
Question: How many critics were given to the movie that got the most movie popularity number.
SQL: SELECT count(ratings.critic) FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE movies.movie_popularity = ( SELECT max(movie_popularity) FROM movies )
Database: movie_platform
Note: 4 rating refers to rating_score = 4; the movie "Freaks" refers to movie_title = 'Freaks' ; at 2013/5/4 6:33:32 refers to rating_timestamp_utc = '2013-05-04 06:33:32';
Question: Who gave a "4" rating to the movie "Freaks" at 2013/5/4 6:33:32? Give his/her user id.
SQL: SELECT ratings.user_id FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE rating_score = 4 AND rating_timestamp_utc LIKE '2013-05-04 06:33:32' AND movies.movie_title LIKE 'Freaks'
Database: movie_platform
Note: rated 5 refers to rating_score = 5; on 2013/5/3 5:11:17 refers to rating_timestamp_utc = '2013-05-03 05:11:17';
Question: Give the url of movie which was rated 5 on 2013/5/3 5:11:17.
SQL: SELECT movies.movie_url FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE rating_score = 5 AND rating_timestamp_utc LIKE '2013-05-03 05:11:17'
Database: movie_platform
Note: 1998 movie refers to movie_release_year = '1998'; the highest popularity refers to MAX(movie_popularity) ; "4" rating refers to rating_score = 4;
Question: For the 1998 movie which got the highest popularity, how many "4" rating did the movie get?
SQL: SELECT count(movies.movie_title) FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE ratings.rating_score = 4 AND movies.movie_release_year = 1998 ORDER BY movies.movie_popularity DESC LIMIT 1
Database: movie_platform
Note: more than 13000 popularity number refers to movie_popularity > 13000; least ratings refers to MIN(rating_score);
Question: From all the movies that got more than 13000 popularity number, which one had the least ratings.
SQL: SELECT movies.movie_title FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE movies.movie_popularity > 13000 ORDER BY ratings.rating_score LIMIT 1
Database: movie_platform
Note: paying subscribers refer to user_has_payment_method = 1; movie "One Flew Over the Cuckoo's Nest" refers to movie_id = 'One Flew Over the Cuckoo''s Nest';
Question: How many paying subscribers gave a rating to the movie "One Flew Over the Cuckoo's Nest"?
SQL: SELECT count(ratings.user_id) FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id INNER JOIN ratings_users ON ratings.user_id = ratings_users.user_id WHERE movies.movie_title = 'One Flew Over the Cuckoo''s Nest' AND ratings_users.user_has_payment_method = 1
Database: movie_platform
Note: got more than 3000 followers refers to list_followers > 3000; paying subscribers refer to user_has_payment_method = 1;
Question: For the lists that got more than 3000 followers, how many did the users who created those lists are paying subscribers?
SQL: SELECT count(lists_users.user_id) FROM lists_users INNER JOIN LISTS ON lists_users.list_id = LISTS.list_id WHERE LISTS.list_followers > 3000 AND lists_users.user_has_payment_method = 1
Database: movie_platform
Note: 1988 movie refers to movie_release_year = '1998'; most ratings refers to MAX(rating_score);
Question: Which 1988 movie got the most ratings?
SQL: SELECT movies.movie_title FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE movies.movie_release_year = 1988 ORDER BY ratings.rating_score DESC LIMIT 1
Database: movie_platform
Note: released in 1995 refers to movie_release_year = '1995'; lower than 3 ratings refers to rating_score <3; most popularity movie refers to MAX(movie_popularity);
Question: For all the movies that were released in 1995, how many lower than 3 ratings did the most popularity movie had?
SQL: SELECT count(ratings.rating_score) FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE ratings.rating_score < 3 AND movies.movie_release_year = 1995 AND movies.movie_popularity = ( SELECT max(movie_popularity) FROM movies WHERE movie_release_year = 1995 )
Database: movie_platform
Note: movie "Go Go Tales" refers to movie_title = 'Go Go Tales'; gave "5" refers to rating_score = 5; percentage refers to DIVIDE(COUNT(rating_score = 5),COUNT(rating_score))*100;
Question: What is the percentage of users gave "5" to the movie "Go Go Tales"?
SQL: SELECT cast(sum(CASE WHEN ratings.rating_score = 5 THEN 1 ELSE 0 END) AS REAL) * 100 / count(ratings.user_id) FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE movies.movie_title = 'Go Go Tales'
Database: movie_platform
Note: movie "G.I. Jane" refers to movie_title = 'G.I. Jane'; subscribers refers to user_subscriber = 1; percentage refers to DIVIDE(COUNT(user_subscriber = 1),COUNT(user_subscriber))*100;
Question: Give the percentage of subscribers who rated who rated the movie "G.I. Jane".
SQL: SELECT cast(sum(CASE WHEN lists_users.user_subscriber = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / count(*) FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id INNER JOIN lists_users ON ratings.user_id = lists_users.user_id WHERE movies.movie_title = 'G.I. Jane'
Database: movie_platform
Note: "A Shot in the Dark" refers to movie_title = 'A Shot in the Dark'; paying subscriber refers to user_has_payment_method = 1; percentage refers to DIVIDE(COUNT(user_has_payment_method = 1),COUNT(user_has_payment_method))*100;
Question: For all the users who gave "A Shot in the Dark" a rating, how many percent of them is a paying subscriber?
SQL: SELECT cast(sum(CASE WHEN ratings.user_has_payment_method = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / count(*) FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id INNER JOIN lists_users ON ratings.user_id = lists_users.user_id WHERE movies.movie_title = 'A Shot in the Dark'
Database: movie_platform
Note: user 4208563 refers to user_id = 4208563;
Question: Name all the list titles created by user 4208563.
SQL: SELECT list_title FROM LISTS WHERE user_id LIKE 4208563
Database: movie_platform
Note: created in 2016 refers to list_creation_timestamp_utc like '2016%'; updated most recently refers to MAX(list_update_timestamp_utc);
Question: Among the lists created in 2016, which is the list that was updated most recently.
SQL: SELECT list_title FROM LISTS WHERE strftime('%Y', list_update_timestamp_utc) = '2016' ORDER BY list_update_timestamp_utc DESC LIMIT 1
Database: movie_platform
Note: was a subscriber refers to user_subscriber = 1; percentage refers to DIVIDE(COUNT(user_subscriber = 1),COUNT(list_id));
Question: What is the percentage of list created by user who was a subscriber when he created the list?
SQL: SELECT cast(sum(CASE WHEN user_subscriber = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / count(list_id) FROM lists_users
Database: movie_platform
Note: was a subscriber refers to user_subscriber = 1;
Question: Name all lists created by a user who was a subcriber when created the list.
SQL: SELECT DISTINCT LISTS.list_id FROM lists_users INNER JOIN LISTS ON lists_users.list_id = LISTS.list_id WHERE lists_users.user_subscriber = 1
Database: movie_platform
Note: eligible for trial refers to user_eligible_for_trial = 1;
Question: Provide list titles created by user who are eligible for trial when he created the list.
SQL: SELECT DISTINCT LISTS.list_title FROM lists_users INNER JOIN LISTS ON lists_users.list_id = LISTS.list_id WHERE lists_users.user_eligible_for_trial = 1
Database: movie_platform
Note: lists with at least one follower refers to list_followers >= 1; was a subscriber refers to user_subscriber = 1;
Question: Among the lists with at least one follower, how many were created by user who was subscriber when created the list?
SQL: SELECT count(lists_users.list_id) FROM lists_users INNER JOIN LISTS ON lists_users.list_id = LISTS.list_id WHERE LISTS.list_followers >= 1 AND lists_users.user_subscriber = 1
Database: movie_platform
Note: at least 200 movies in the list refers to list_movie_number > 200; average number of followers refers to avg(list_followers);
Question: For all list titles with at least 200 movies in the list, what is their average number of followers?
SQL: SELECT avg(list_followers) FROM LISTS WHERE list_movie_number > 200
Database: movie_platform
Note: have less than 50 movies in the list refers to list_movie_number <50; was a subscriber refers to user_subscriber = 1;
Question: 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.
SQL: SELECT DISTINCT LISTS.list_title FROM lists_users INNER JOIN LISTS ON lists_users.list_id = LISTS.list_id WHERE LISTS.list_movie_number < 50 AND lists_users.user_subscriber = 1
Database: movie_platform
Note: 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);
Question: Which title list has not been updated for the longest period of time? State how long it has not been updated?
SQL: SELECT list_title , datetime(CURRENT_TIMESTAMP, 'localtime') - datetime(list_update_timestamp_utc) FROM LISTS ORDER BY list_update_timestamp_utc LIMIT 1
Database: movie_platform
Note: 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;
Question: Who is the user who created the list titled 'Sound and Vision'? Was he a subcriber when he created the list?
SQL: SELECT lists_users.user_id, lists_users.user_subscriber FROM lists_users INNER JOIN LISTS ON lists_users.list_id = LISTS.list_id WHERE LISTS.list_title LIKE 'Sound and Vision'
Database: movie_platform
Note: 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);
Question: For the list with more than 200 followers, state the title and how long the list has been created?
SQL: 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
Database: movie_platform
Note: percentage of movies that were never been rated refers to DIVIDE(COUNT(main_movies.movie_id ! = main_ratings.movie_id),COUNT(movie_id));
Question: Among all movies in the list, calculate the percentage of movies that were never been rated?
SQL: SELECT cast(sum(CASE WHEN movies.movie_id IS NULL THEN 1 ELSE 0 END) AS REAL) * 100 / count(movies.movie_id) FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id
Database: movie_platform
Note: user 39115684 refers to user_id = 39115684; title refers to movie_title; rating date refers to rating_timestamp_utc;
Question: List all movies rated by user 39115684. State the title, rating date and rating score.
SQL: SELECT movies.movie_title, ratings.rating_timestamp_utc, ratings.rating_score FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE ratings.user_id = 39115684
Database: movie_platform
Note: Between 1970 to 1980 refers to movie_release_year between 1970 and 1980; popularity of more than 11,000 refers movie_popularity >11000;
Question: Between 1970 to 1980, how many movies with a popularity of more than 11,000 were released?
SQL: SELECT count(movie_id) FROM movies WHERE movie_release_year BETWEEN '1970' AND '1980' AND movie_popularity > 11000
Database: movie_platform
Note: directed by Felipe Cazals refers to director_name = 'Felipe Cazals' ; realeased on 1976 refers to movie_release_year = 1976;
Question: How many movies directed by Felipe Cazals was realeased on 1976?
SQL: SELECT count(movie_id) FROM movies WHERE movie_release_year = 1976 AND director_name LIKE 'Felipe Cazals'
Database: movie_platform
Note: movie titled "Red Blooded American Girl" refers to movie_title = 'Red Blooded American Girl';
Question: What is the URL to the movie director page on Mubi of the movie titled "Red Blooded American Girl"
SQL: SELECT director_url FROM movies WHERE movie_title LIKE 'Red Blooded American Girl'
Database: movie_platform
Note: updated most recently refers to MAX(list_update_date_utc);
Question: What is the name of the list that was updated most recently?
SQL: 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 )
Database: movie_platform
Note: list that has 142 comments refers to list_comments = 142;
Question: 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
SQL: SELECT user_id FROM LISTS WHERE list_comments = 142
Database: movie_platform
Note: Jeannot Szwarc's refers to director_name = 'Jeannot Szwarc'; most popular movie refers to MAX(movie_popularity); average rating score refers to avg(rating_score);
Question: What is Jeannot Szwarc's most popular movie and what is its average rating score?
SQL: SELECT movies.movie_title, avg(ratings.rating_score) FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE movies.director_name = 'Jeannot Szwarc' ORDER BY movies.movie_popularity DESC LIMIT 1
Database: movie_platform
Note: highest number of movies COUNT(T1.movie_id); in the 70s refers to movie_release_year between 1970 and 1979;
Question: Who is the director that directed the highest number of movies in the 70s? If there are multiple directors with the same amount of movies, list all of their names and indicate the highest rating score that those movies got from the users.
SQL: SELECT movies.director_name, ratings.rating_score FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE movies.movie_release_year BETWEEN 1970 AND 1979 GROUP BY movies.director_id ORDER BY count(movies.movie_id) DESC LIMIT 1
Database: movie_platform
Note: Between 1/1/2010 to 12/31/2020 refers to rating_timestamp_utc between '2010-01-01%' and '2020-12-31%'; a trialist refers to user_trialist = 1; movie "The Secret Life of Words" refers to movie_title = 'The Secret Life of Words'; rating score of 3 refers to rating_score = 3;
Question: Between 1/1/2010 to 12/31/2020, how many users, who were a trialist when they created the list, gave the movie "The Secret Life of Words" a rating score of 3?
SQL: SELECT count(ratings.user_id) FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE movies.movie_title = 'The Secret Life of Words' AND ratings.rating_score = 3 AND ratings.user_trialist = 0 AND ratings.rating_timestamp_utc BETWEEN '2010%' AND '2020%'
Database: movie_platform
Note: critic received the highest amount of likes refers to MAX(critic_likes);
Question: What is the name of the movie whose critic received the highest amount of likes? Indicate the URL to the rating on Mubi.
SQL: SELECT movies.movie_title, ratings.rating_url FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id ORDER BY ratings.critic_likes DESC LIMIT 1
Database: movie_platform
Note: most popular movies refers to MAX(movie_popularity); rating score of 5 refers to rating_score = 5; movies of the 21st century refers to movie_release_year>= 2000;
Question: What are the top 5 most popular movies of the 21st century? Indicate how many users gave it a rating score of 5.
SQL: SELECT DISTINCT movies.movie_id, sum(ratings.rating_score = 5) FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id ORDER BY movies.movie_popularity DESC LIMIT 5
Database: movie_platform
Note: average number of followers refers to AVG(list_followers); movie "Pavee Lackeen: The Traveller Girl" refers to movie_title = 'Pavee Lackeen: The Traveller Girl'; on 3/27/2011 at 2:06:34 AM refers to rating_timestamp_utc = '2011-03-27 02:06:34';
Question: What is the average number of followers of the lists created by the user who rated the movie "Pavee Lackeen: The Traveller Girl" on 3/27/2011 at 2:06:34 AM?
SQL: SELECT cast(sum(LISTS.list_followers) AS REAL) / count(lists_users.list_id) FROM ratings INNER JOIN lists_users ON ratings.user_id = lists_users.user_id INNER JOIN movies ON ratings.movie_id = movies.movie_id INNER JOIN LISTS ON lists_users.list_id = LISTS.list_id WHERE movies.movie_title LIKE 'Pavee Lackeen: The Traveller Girl' AND ratings.rating_timestamp_utc LIKE '2011-03-27 02:06:34'
Database: movie_platform
Note: Between 1/1/2017 to 12/31/2017 refers to rating_timestamp_utc between '2017-01-01 00:00:00' and '2017-12-31 00:00:00'; eligible for trial refers to user_eligible_for_trial = 1; movie "Patti Smith: Dream of Life" refers to movie_title = 'Patti Smith: Dream of Life';
Question: Between 1/1/2017 to 12/31/2017, how many users who were eligible for trial when they rated the movie "Patti Smith: Dream of Life"and what is the image URL to the movie on Mubi?
SQL: SELECT count(ratings.user_id), movies.movie_image_url FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE datetime(ratings.rating_timestamp_utc) BETWEEN '2017-01-01 00:00:00' AND '2017-12-31 00:00:00'
Database: movie_platform
Note: average number of number of movies refers to AVG(list_movie_number); user 8516503 refers to user_id = 8516503; rating score of 5 refers to rating_score = 5;
Question: What is the average number of number of movies added to the lists of user 8516503? Indicate how many movies did he/she give a rating score of 5.
SQL: SELECT avg(LISTS.list_movie_number) , sum(CASE WHEN ratings.rating_score = 5 THEN 1 ELSE 0 END) FROM ratings INNER JOIN lists_users ON ratings.user_id = lists_users.user_id INNER JOIN LISTS ON lists_users.user_id = LISTS.user_id WHERE ratings.user_id = 8516503
Database: movie_platform
Note: most popular movie of all time refers to MAX(movie_popularity); a trialist refers to user_trialist = 1; average rating score = AVG(rating_score);
Question: Who is the director of the most popular movie of all time and when was it released? Indicate the average rating score of the users who were on a trialist when they rated the movie.
SQL: SELECT movies.director_name, movies.movie_release_year , sum(ratings.rating_score) / count(ratings.user_id) FROM movies INNER JOIN ratings ON movies.movie_id = ratings.movie_id WHERE ratings.user_trialist = 1 ORDER BY movies.movie_popularity DESC LIMIT 1
Database: movie_platform
Note: user 57756708 refers to user_id = 57756708; rated recently refers to MAX(rating_timestamp_utc);
Question: What is the name of the movie that was rated recently by user 57756708?
SQL: SELECT movies.movie_title FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id WHERE ratings.user_id = 57756708 ORDER BY ratings.rating_timestamp_utc DESC LIMIT 1
Database: movie_platform
Note: the average rating score refers to AVG(T2.rating_score); oldest movies refers to MIN(rating_timestamp_utc);
Question: What are the top 10 oldest movies and what are the average rating score for each movie? Indicate the name of the director and when the movies were released.
SQL: SELECT movies.movie_id, avg(ratings.rating_score), movies.director_name, movies.movie_release_year FROM ratings INNER JOIN movies ON ratings.movie_id = movies.movie_id ORDER BY ratings.rating_timestamp_utc ASC LIMIT 10
Database: book_publishing_company
Note: total quantity refers to qty; most ordered quantity refers to order with the highest quantity where MAX(sum(qty));
Question: Which date has the most ordered quantity? What is the total order quantity on that day?
SQL: SELECT ord_date, sum(qty) FROM sales GROUP BY ord_date ORDER BY sum(qty) DESC LIMIT 1