Chinastark/bird_dataset huggingface dataset:
Database: movie_platform
Question: Give the number of followers for the user who posted the most lists.
Evidence: number of followers refers to user_subscriber; posted the most lists refers to MAX(COUNT(list_id))
SQL: SELECT SUM(T1.list_followers) FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id GROUP BY T1.user_id ORDER BY COUNT(T1.list_id) DESC LIMIT 1
Database: movie_platform
Question: How many followers did the user who posted the list "Non-American Films about World War II" have?
Evidence: the list "Non-American Films about World War II" refers to list_title = 'Non-American Films about World War II'
SQL: SELECT SUM(T2.list_followers) FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_title LIKE 'Non-American Films about World War II'
Database: movie_platform
Question: What's the number of users gave the movie "Downfall" a rating of "4"?
Evidence: movie "Downfall" refers to movie_title = 'Downfall'; rating of "4" refers to rating_score = 4
SQL: SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'Downfall' AND T1.rating_score = 4
Database: movie_platform
Question: Give the name of the movie that got the most "5" ratings.
Evidence: 5 ratings refers to rating_score = 5; name of the movie refers to movie_title
SQL: SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score = 5
Database: movie_platform
Question: Which movie got the most critic comments? Give the name of the movie.
Evidence: name of the movie refers to movie_title; most critic comments refers to MAX(critic_comments)
SQL: SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id GROUP BY T2.movie_title ORDER BY COUNT(T1.critic_comments) DESC LIMIT 1
Database: movie_platform
Question: Show the avatar of the user who gave the rating at 2019/10/17 1:36:36.
Evidence: 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


SQL: SELECT T2.user_avatar_image_url FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id WHERE T1.rating_timestamp_utc LIKE '2019-10-17 01:36:36'
Database: movie_platform
Question: Show the portrait picture of the user who created the list "Vladimir Vladimirovich Nabokov".
Evidence: the list "Vladimir Vladimirovich Nabokov" refers to list_title = 'Vladimir Vladimirovich Nabokov'; portrait picture refers to user_avatar_image_url
SQL: 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'
Database: movie_platform
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?
Evidence: 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 


SQL: 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 )
Database: movie_platform
Question: Show the head portrait of the user who gave the most "5" ratings.
Evidence: head portrait refers to user_avatar_image_url; "5" ratings refers to rating_score = 5
SQL: SELECT T2.user_avatar_image_url FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id WHERE T1.rating_score = 5
Database: movie_platform
Question: How many critics were given to the movie that got the most movie popularity number.
Evidence: most movie popularity number refers to MAX(movie_popularity)
SQL: SELECT COUNT(T1.critic) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_popularity = ( SELECT MAX(movie_popularity) FROM movies )
Database: movie_platform
Question: Who gave a "4" rating to the movie "Freaks" at 2013/5/4 6:33:32? Give his/her user id.
Evidence: 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'
SQL: SELECT T1.user_id FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE rating_score = 4 AND rating_timestamp_utc LIKE '2013-05-04 06:33:32' AND T2.movie_title LIKE 'Freaks'
Database: movie_platform
Question: Give the url of movie which was rated 5 on 2013/5/3 5:11:17.
Evidence: 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'
SQL: SELECT T2.movie_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE rating_score = 5 AND rating_timestamp_utc LIKE '2013-05-03 05:11:17'
Database: movie_platform
Question: For the 1998 movie which got the highest popularity, how many "4" rating did the movie get?
Evidence: 1998 movie refers to movie_release_year = '1998'; the highest popularity refers to MAX(movie_popularity) ; "4" rating refers to rating_score = 4
SQL: SELECT COUNT(T2.movie_title) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score = 4 AND T2.movie_release_year = 1998 ORDER BY T2.movie_popularity DESC LIMIT 1
Database: movie_platform
Question: From all the movies that got more than 13000 popularity number, which one had the least ratings.
Evidence: more than 13000 popularity number refers to movie_popularity > 13000; least ratings refers to MIN(rating_score)
SQL: SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_popularity > 13000 ORDER BY T1.rating_score LIMIT 1
Database: movie_platform
Question: How many paying subscribers gave a rating to the movie "One Flew Over the Cuckoo's Nest"?
Evidence: 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'
SQL: SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN ratings_users AS T3 ON T1.user_id = T3.user_id WHERE T2.movie_title = 'One Flew Over the Cuckoo''s Nest' AND T3.user_has_payment_method = 1
Database: movie_platform
Question: For the lists that got more than 3000 followers, how many did the users who created those lists are paying subscribers?
Evidence: got more than 3000 followers refers to list_followers > 3000; paying subscribers refer to user_has_payment_method = 1
SQL: 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
Database: movie_platform
Question: Which 1988 movie got the most ratings?
Evidence: 1988 movie refers to movie_release_year = '1998'; most ratings refers to MAX(rating_score)
SQL: SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year = 1988 ORDER BY T1.rating_score DESC LIMIT 1
Database: movie_platform
Question: For all the movies that were released in 1995, how many lower than 3 ratings did the most popularity movie had?
Evidence: 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)
SQL: SELECT COUNT(T1.rating_score) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score < 3 AND T2.movie_release_year = 1995 AND T2.movie_popularity = ( SELECT MAX(movie_popularity) FROM movies WHERE movie_release_year = 1995 )
Database: movie_platform
Question: What is the percentage of users gave "5" to the movie "Go Go Tales"?
Evidence: 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
SQL: SELECT CAST(SUM(CASE WHEN T1.rating_score = 5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'Go Go Tales'
Database: movie_platform
Question: Give the percentage of subscribers who rated who rated the movie "G.I. Jane".
Evidence: 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
SQL: SELECT CAST(SUM(CASE WHEN T3.user_subscriber = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists_users AS T3 ON T1.user_id = T3.user_id WHERE T2.movie_title = 'G.I. Jane'
Database: movie_platform
Question: For all the users who gave "A Shot in the Dark" a rating, how many percent of them is a paying subscriber?
Evidence: "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
SQL: SELECT CAST(SUM(CASE WHEN T1.user_has_payment_method = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists_users AS T3 ON T1.user_id = T3.user_id WHERE T2.movie_title = 'A Shot in the Dark'
Database: movie_platform
Question: Name all the list titles created by user 4208563.
Evidence: user 4208563 refers to user_id = 4208563
SQL: SELECT list_title FROM lists WHERE user_id LIKE 4208563
Database: movie_platform
Question: Among the lists created in 2016, which is the list that was updated most recently.
Evidence: created in 2016 refers to list_creation_timestamp_utc like '2016%'; updated most recently refers to MAX(list_update_timestamp_utc)
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
Question: What is the percentage of list created by user who was a subscriber when he created the list?
Evidence: was a subscriber refers to user_subscriber = 1; percentage refers to DIVIDE(COUNT(user_subscriber = 1),COUNT(list_id))
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
Question: Name all lists created by a user who was a subcriber when created the list.
Evidence: was a subscriber refers to user_subscriber = 1
SQL: 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
Database: movie_platform
Question: Provide list titles created by user who are eligible for trial when he created the list.
Evidence: eligible for trial refers to user_eligible_for_trial = 1
SQL: 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
Database: movie_platform
Question: Among the lists with at least one follower, how many were created by user who was subscriber when created the list?
Evidence: lists with at least one follower refers to list_followers > = 1; was a subscriber refers to user_subscriber = 1
SQL: 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
Database: movie_platform
Question: For all list titles with at least 200 movies in the list, what is their average number of followers?
Evidence: at least 200 movies in the list refers to list_movie_number > 200; average number of followers refers to avg(list_followers)
SQL: SELECT AVG(list_followers) FROM lists WHERE list_movie_number > 200
Database: movie_platform
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.
Evidence: have less than 50 movies in the list refers to list_movie_number <50; was a subscriber refers to user_subscriber = 1
SQL: 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
Database: movie_platform
Question: Which title list has not been updated for the longest period of time? State how long it has not been updated?
Evidence: 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)
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
Question: Who is the user who created the list titled 'Sound and Vision'? Was he a subcriber when he created the list?
Evidence: 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




SQL: 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'
Database: movie_platform
Question: For the list with more than 200 followers, state the title and how long the list has been created?
Evidence: 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)
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
Question: Among all movies in the list, calculate the percentage of movies that were never been rated?
Evidence: percentage of movies that were never been rated refers to DIVIDE(COUNT(main_movies.movie_id ! = main_ratings.movie_id),COUNT(movie_id))
SQL: SELECT CAST(SUM(CASE WHEN T2.movie_id IS NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.movie_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id
Database: movie_platform
Question: List all movies rated by user 39115684. State the title, rating date and rating score.
Evidence: user 39115684 refers to user_id = 39115684; title refers to movie_title; rating date refers to rating_timestamp_utc

SQL: SELECT T2.movie_title, T1.rating_timestamp_utc, T1.rating_score FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.user_id = 39115684
Database: movie_platform
Question: Between 1970 to 1980, how many movies with a popularity of more than 11,000 were released?
Evidence: Between 1970 to 1980 refers to movie_release_year between 1970 and 1980; popularity of more than 11,000 refers movie_popularity >11000
SQL: SELECT COUNT(movie_id) FROM movies WHERE movie_release_year BETWEEN '1970' AND '1980' AND movie_popularity > 11000
Database: movie_platform
Question: How many movies directed by Felipe Cazals was realeased on 1976?
Evidence: directed by Felipe Cazals refers to director_name = 'Felipe Cazals' ; realeased on 1976 refers to movie_release_year = 1976
SQL: SELECT COUNT(movie_id) FROM movies WHERE movie_release_year = 1976 AND director_name LIKE 'Felipe Cazals'
Database: movie_platform
Question: What is the URL to the movie director page on Mubi of the movie titled "Red Blooded American Girl"
Evidence: movie titled "Red Blooded American Girl" refers to movie_title = 'Red Blooded American Girl'
SQL: SELECT director_url FROM movies WHERE movie_title LIKE 'Red Blooded American Girl'
Database: movie_platform
Question: What is the name of the list that was updated most recently?
Evidence: updated most recently refers to MAX(list_update_date_utc)
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
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
Evidence: list that has 142 comments refers to list_comments = 142
SQL: SELECT user_id FROM lists WHERE list_comments = 142
Database: movie_platform
Question: What is Jeannot Szwarc's most popular movie and what is its average rating score?
Evidence: 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)
SQL: SELECT T2.movie_title, AVG(T1.rating_score) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.director_name = 'Jeannot Szwarc' ORDER BY T2.movie_popularity DESC LIMIT 1
Database: movie_platform
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.
Evidence: highest number of movies COUNT(T1.movie_id); in the 70s refers to movie_release_year between 1970 and 1979
SQL: SELECT T2.director_name, T1.rating_score FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year BETWEEN 1970 AND 1979 GROUP BY T2.director_id ORDER BY COUNT(T2.movie_id) DESC LIMIT 1
Database: movie_platform
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?
Evidence: 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
SQL: SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'The Secret Life of Words' AND T1.rating_score = 3 AND T1.user_trialist = 0 AND T1.rating_timestamp_utc BETWEEN '2010%' AND '2020%'
Database: movie_platform
Question: What is the name of the movie whose critic received the highest amount of likes? Indicate the URL to the rating on Mubi.
Evidence: critic received the highest amount of likes refers to MAX(critic_likes);
SQL: SELECT T2.movie_title, T1.rating_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.critic_likes DESC LIMIT 1
Database: movie_platform
Question: What are the top 5 most popular movies of the 21st century? Indicate how many users gave it a rating score of 5.
Evidence: 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
SQL: SELECT DISTINCT T2.movie_id, SUM(T1.rating_score = 5) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T2.movie_popularity DESC LIMIT 5
Database: movie_platform
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?
Evidence: 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'
SQL: SELECT CAST(SUM(T4.list_followers) AS REAL) / COUNT(T2.list_id) FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id INNER JOIN movies AS T3 ON T1.movie_id = T3.movie_id INNER JOIN lists AS T4 ON T2.list_id = T4.list_id WHERE T3.movie_title LIKE 'Pavee Lackeen: The Traveller Girl' AND T1.rating_timestamp_utc LIKE '2011-03-27 02:06:34'
Database: movie_platform
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?
Evidence: 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'
SQL: SELECT COUNT(T1.user_id), T2.movie_image_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE datetime(T1.rating_timestamp_utc) BETWEEN '2017-01-01 00:00:00' AND '2017-12-31 00:00:00'
Database: movie_platform
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.
Evidence: 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
SQL: SELECT AVG(T3.list_movie_number) , SUM(CASE WHEN T1.rating_score = 5 THEN 1 ELSE 0 END) FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id INNER JOIN lists AS T3 ON T2.user_id = T3.user_id WHERE T1.user_id = 8516503
Database: movie_platform
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.
Evidence: most popular movie of all time refers to MAX(movie_popularity); a trialist refers to user_trialist = 1; average rating score = AVG(rating_score)
SQL: SELECT T1.director_name, T1.movie_release_year , SUM(T2.rating_score) / COUNT(T2.user_id) FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T2.user_trialist = 1 ORDER BY T1.movie_popularity DESC LIMIT 1
Database: movie_platform
Question: What is the name of the movie that was rated recently by user 57756708?
Evidence: user 57756708 refers to user_id = 57756708; rated recently refers to MAX(rating_timestamp_utc)
SQL: SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.user_id = 57756708 ORDER BY T1.rating_timestamp_utc DESC LIMIT 1
Database: movie_platform
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.
Evidence: the average rating score refers to AVG(T2.rating_score); oldest movies refers to MIN(rating_timestamp_utc)
SQL: SELECT T2.movie_id, AVG(T1.rating_score), T2.director_name, T2.movie_release_year FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.rating_timestamp_utc ASC LIMIT 10
Database: book_publishing_company
Question: Which date has the most ordered quantity? What is the total order quantity on that day?
Evidence: total quantity refers to qty; most ordered quantity refers to order with the highest quantity where MAX(sum(qty))
SQL: SELECT ord_date, SUM(qty) FROM sales GROUP BY ord_date ORDER BY SUM(qty) DESC LIMIT 1
Database: book_publishing_company
Question: What is the title with the most ordered quantity in year 1992?
Evidence: 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
SQL: 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
Database: book_publishing_company
Question: List the title, price and publication date for all sales with 'ON invoice' payment terms.
Evidence: publication date refers to pubdate; payment terms refers to payterms; payterms = 'ON invoice'
SQL: 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'