db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
movie_platform
select t2.movie_title from ratings as t1 inner join movies as t2 on t1.movie_id = t2.movie_id where t2.movie_release_year = 2003 and t1.user_id = 2941
Question: please list the names of the films released in 2003 among the films scored by user 2941 . | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_imag...
please list the names of the films released in 2003 among the films scored by user 2941 .
movie_platform
select count(t1.user_id) from ratings as t1 inner join movies as t2 on t1.movie_id = t2.movie_id where t2.movie_title = 'patti smith: dream of life' and t1.user_trialist = 0
Question: how many users were not trialists when they rated the movie 'patti smith: dream of life'? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_imag...
how many users were not trialists when they rated the movie 'patti smith: dream of life'?
movie_platform
select t2.movie_title from ratings as t1 inner join movies as t2 on t1.movie_id = t2.movie_id group by t2.movie_title order by sum(t1.rating_score) / count(t1.rating_id) desc limit 1
Question: which movie has the highest average score in mubi? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_image_url, list_thir...
which movie has the highest average score in mubi?
movie_platform
select t2.movie_title from ratings as t1 inner join movies as t2 on t1.movie_id = t2.movie_id order by t1.critic_comments desc limit 3
Question: please list the names of the top three movies in the number comments related to the critic made by the user rating the movie. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, l...
please list the names of the top three movies in the number comments related to the critic made by the user rating the movie.
movie_platform
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
Question: what was the title of the first list created by a user 85981819? and please provide the user_avatar_image_url. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image...
what was the title of the first list created by a user 85981819? and please provide the user_avatar_image_url.
movie_platform
select t2.movie_title from ratings as t1 inner join movies as t2 on t1.movie_id = t2.movie_id where t1.rating_timestamp_utc like '2020%' group by t2.movie_title order by count(t2.movie_title) desc limit 1
Question: please list the names of the movies that have been rated the most times in 2020. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, li...
please list the names of the movies that have been rated the most times in 2020.
movie_platform
select avg(t1.rating_score) from ratings as t1 inner join movies as t2 on t1.movie_id = t2.movie_id where t2.movie_title like 'versailles rive-gauche'
Question: what is the average score for the movie versailles rive-gauche? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_image_u...
what is the average score for the movie versailles rive-gauche?
movie_platform
select t2.movie_title from ratings as t1 inner join movies as t2 on t1.movie_id = t2.movie_id where t1.user_id = 59988436 and t1.critic_comments = 21
Question: which film rated by user 59988436 that received 21 comments? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_image_url,...
which film rated by user 59988436 that received 21 comments?
movie_platform
select t2.movie_title from ratings as t1 inner join movies as t2 on t1.movie_id = t2.movie_id where t1.critic_likes > 20
Question: please list the names of the movies that received more than 20 likes? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_i...
please list the names of the movies that received more than 20 likes?
movie_platform
select sum(t1.rating_score) / count(t1.rating_id) from ratings as t1 inner join movies as t2 on t1.movie_id = t2.movie_id where t1.rating_timestamp_utc like '2019%' and t2.movie_title like 'the fall of berlin'
Question: what is the average score of the movie 'the fall of berlin' in 2019? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_im...
what is the average score of the movie 'the fall of berlin' in 2019?
movie_platform
select cast(sum(case when t1.rating_score > 3 then 1 else 0 end) as real) * 100 / count(t1.rating_score) from ratings as t1 inner join movies as t2 on t1.movie_id = t2.movie_id where t2.movie_title like 'patti smith: dream of life'
Question: what percentage of users rated the movie 'patti smith: dream of life' by more than 3? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_ur...
what percentage of users rated the movie 'patti smith: dream of life' by more than 3?
movie_platform
select t2.movie_title from ratings as t1 inner join movies as t2 on t1.movie_id = t2.movie_id where t2.director_name = 'abbas kiarostami' group by t2.movie_title order by sum(t1.rating_score) / count(t1.rating_id) desc limit 1
Question: which of the film directed by director abbas kiarostami has the highest average score? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_u...
which of the film directed by director abbas kiarostami has the highest average score?
movie_platform
select movie_release_year from movies group by movie_release_year order by count(movie_id) desc limit 1
Question: which year had the most released films? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_image_url, list_third_image_url...
which year had the most released films?
movie_platform
select director_id from movies group by director_id order by count(movie_id) desc limit 1
Question: who is the director that made the most movies? give the director's id. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_...
who is the director that made the most movies? give the director's id.
movie_platform
select count(movie_id) from movies where director_id = ( select director_id from movies order by movie_popularity desc limit 1 )
Question: how many movies did the director of the highest movie popularity make? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_...
how many movies did the director of the highest movie popularity make?
movie_platform
select count(user_subscriber) from ratings_users where user_has_payment_method = 1 and rating_date_utc > '2014%'
Question: what's the number of the paying subscribers when rating a movie after the year 2014? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url...
what's the number of the paying subscribers when rating a movie after the year 2014?
movie_platform
select user_id from lists_users where user_subscriber = 0 order by list_creation_date_utc limit 1
Question: who was the earliest user created a list but didn't get any followers? give the user id. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image...
who was the earliest user created a list but didn't get any followers? give the user id.
movie_platform
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
Question: give the number of followers for the user who posted the most lists. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_im...
give the number of followers for the user who posted the most lists.
movie_platform
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'
Question: how many followers did the user who posted the list 'non-american films about world war ii' have? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_fi...
how many followers did the user who posted the list 'non-american films about world war ii' have?
movie_platform
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
Question: what's the number of users gave the movie 'downfall' a rating of '4'? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_i...
what's the number of users gave the movie 'downfall' a rating of '4'?
movie_platform
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
Question: give the name of the movie that got the most '5' ratings. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_image_url, li...
give the name of the movie that got the most '5' ratings.
movie_platform
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
Question: which movie got the most critic comments? give the name of the movie. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_i...
which movie got the most critic comments? give the name of the movie.
movie_platform
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'
Question: show the avatar of the user who gave the rating at 2019/10/17 1:36:36. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_...
show the avatar of the user who gave the rating at 2019/10/17 1:36:36.
movie_platform
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'
Question: show the portrait picture of the user who created the list 'vladimir vladimirovich nabokov'. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_i...
show the portrait picture of the user who created the list 'vladimir vladimirovich nabokov'.
movie_platform
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 )
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? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_descript...
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?
movie_platform
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
Question: show the head portrait of the user who gave the most '5' ratings. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_image...
show the head portrait of the user who gave the most '5' ratings.
movie_platform
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 )
Question: how many critics were given to the movie that got the most movie popularity number. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url,...
how many critics were given to the movie that got the most movie popularity number.
movie_platform
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'
Question: who gave a '4' rating to the movie 'freaks' at 2013/5/4 6:33:32? give his/her user id. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_u...
who gave a '4' rating to the movie 'freaks' at 2013/5/4 6:33:32? give his/her user id.
movie_platform
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'
Question: give the url of movie which was rated 5 on 2013/5/3 5:11:17. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_image_url,...
give the url of movie which was rated 5 on 2013/5/3 5:11:17.
movie_platform
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
Question: for the 1998 movie which got the highest popularity, how many '4' rating did the movie get? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_im...
for the 1998 movie which got the highest popularity, how many '4' rating did the movie get?
movie_platform
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
Question: from all the movies that got more than 13000 popularity number, which one had the least ratings. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_fir...
from all the movies that got more than 13000 popularity number, which one had the least ratings.
movie_platform
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
Question: how many paying subscribers gave a rating to the movie 'one flew over the cuckoo's nest'? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_imag...
how many paying subscribers gave a rating to the movie 'one flew over the cuckoo's nest'?
movie_platform
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
Question: for the lists that got more than 3000 followers, how many did the users who created those lists are paying subscribers? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_co...
for the lists that got more than 3000 followers, how many did the users who created those lists are paying subscribers?
movie_platform
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
Question: which 1988 movie got the most ratings? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_image_url, list_third_image_url....
which 1988 movie got the most ratings?
movie_platform
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 )
Question: for all the movies that were released in 1995, how many lower than 3 ratings did the most popularity movie had? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_imag...
for all the movies that were released in 1995, how many lower than 3 ratings did the most popularity movie had?
movie_platform
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'
Question: what is the percentage of users gave '5' to the movie 'go go tales'? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_im...
what is the percentage of users gave '5' to the movie 'go go tales'?
movie_platform
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'
Question: give the percentage of subscribers who rated who rated the movie 'g.i. jane'. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_...
give the percentage of subscribers who rated who rated the movie 'g.i. jane'.
movie_platform
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'
Question: for all the users who gave 'a shot in the dark' a rating, how many percent of them is a paying subscriber? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url...
for all the users who gave 'a shot in the dark' a rating, how many percent of them is a paying subscriber?
movie_platform
select list_title from lists where user_id like 4208563
Question: name all the list titles created by user 4208563. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_image_url, list_third...
name all the list titles created by user 4208563.
movie_platform
select list_title from lists where strftime('%y', list_update_timestamp_utc) = '2016' order by list_update_timestamp_utc desc limit 1
Question: among the lists created in 2016, which is the list that was updated most recently. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, ...
among the lists created in 2016, which is the list that was updated most recently.
movie_platform
select cast(sum(case when user_subscriber = 1 then 1 else 0 end) as real) * 100 / count(list_id) from lists_users
Question: what is the percentage of list created by user who was a subscriber when he created the list? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_...
what is the percentage of list created by user who was a subscriber when he created the list?
movie_platform
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
Question: name all lists created by a user who was a subcriber when created the list. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_se...
name all lists created by a user who was a subcriber when created the list.
movie_platform
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
Question: provide list titles created by user who are eligible for trial when he created the list. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image...
provide list titles created by user who are eligible for trial when he created the list.
movie_platform
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
Question: among the lists with at least one follower, how many were created by user who was subscriber when created the list? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_...
among the lists with at least one follower, how many were created by user who was subscriber when created the list?
movie_platform
select avg(list_followers) from lists where list_movie_number > 200
Question: for all list titles with at least 200 movies in the list, what is their average number of followers? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list...
for all list titles with at least 200 movies in the list, what is their average number of followers?
movie_platform
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
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. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list...
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.
movie_platform
select list_title , datetime(current_timestamp, 'localtime') - datetime(list_update_timestamp_utc) from lists order by list_update_timestamp_utc limit 1
Question: which title list has not been updated for the longest period of time? state how long it has not been updated? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_...
which title list has not been updated for the longest period of time? state how long it has not been updated?
movie_platform
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'
Question: who is the user who created the list titled 'sound and vision'? was he a subcriber when he created the list? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_u...
who is the user who created the list titled 'sound and vision'? was he a subcriber when he created the list?
movie_platform
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
Question: for the list with more than 200 followers, state the title and how long the list has been created? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_f...
for the list with more than 200 followers, state the title and how long the list has been created?
movie_platform
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
Question: among all movies in the list, calculate the percentage of movies that were never been rated? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_i...
among all movies in the list, calculate the percentage of movies that were never been rated?
movie_platform
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
Question: list all movies rated by user 39115684. state the title, rating date and rating score. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_u...
list all movies rated by user 39115684. state the title, rating date and rating score.
movie_platform
select count(movie_id) from movies where movie_release_year between '1970' and '1980' and movie_popularity > 11000
Question: between 1970 to 1980, how many movies with a popularity of more than 11,000 were released? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_ima...
between 1970 to 1980, how many movies with a popularity of more than 11,000 were released?
movie_platform
select count(movie_id) from movies where movie_release_year = 1976 and director_name like 'felipe cazals'
Question: how many movies directed by felipe cazals was realeased on 1976? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_image_...
how many movies directed by felipe cazals was realeased on 1976?
movie_platform
select director_url from movies where movie_title like 'red blooded american girl'
Question: what is the url to the movie director page on mubi of the movie titled 'red blooded american girl' | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_f...
what is the url to the movie director page on mubi of the movie titled 'red blooded american girl'
movie_platform
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 )
Question: what is the name of the list that was updated most recently? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second_image_url,...
what is the name of the list that was updated most recently?
movie_platform
select user_id from lists where 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 | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_foll...
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
movie_platform
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
Question: what is jeannot szwarc's most popular movie and what is its average rating score? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, l...
what is jeannot szwarc's most popular movie and what is its average rating score?
movie_platform
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
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. | Tables: lists -> user_id, list_id, list_title, list_movie_number, lis...
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.
movie_platform
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%'
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? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, l...
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?
movie_platform
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
Question: what is the name of the movie whose critic received the highest amount of likes? indicate the url to the rating on mubi. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_c...
what is the name of the movie whose critic received the highest amount of likes? indicate the url to the rating on mubi.
movie_platform
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
Question: what are the top 5 most popular movies of the 21st century? indicate how many users gave it a rating score of 5. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_ima...
what are the top 5 most popular movies of the 21st century? indicate how many users gave it a rating score of 5.
movie_platform
select cast(sum(t4.list_followers) as real) / count(t2.list_id) from ratings as t1 inner join lists_users as t2 on t1.user_id = t2.user_id inner join movies as t3 on t1.movie_id = t3.movie_id inner join lists as t4 on t2.list_id = t4.list_id where t3.movie_title like 'pavee lackeen: the traveller girl' and t1.rating_ti...
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? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, lis...
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?
movie_platform
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'
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? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_foll...
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?
movie_platform
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
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. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, ...
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.
movie_platform
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
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. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_...
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.
movie_platform
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
Question: what is the name of the movie that was rated recently by user 57756708? | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, list_comments, list_description, list_cover_image_url, list_first_image_url, list_second...
what is the name of the movie that was rated recently by user 57756708?
movie_platform
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
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. | Tables: lists -> user_id, list_id, list_title, list_movie_number, list_update_timestamp_utc, list_creation_timestamp_utc, list_followers, list_url, lis...
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.
book_publishing_company
select ord_date, sum(qty) from sales group by ord_date order by sum(qty) desc limit 1
Question: which date has the most ordered quantity? what is the total order quantity on that day? | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit...
which date has the most ordered quantity? what is the total order quantity on that day?
book_publishing_company
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
Question: what is the title with the most ordered quantity in year 1992? | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit, lname, job_id, job_lvl,...
what is the title with the most ordered quantity in year 1992?
book_publishing_company
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'
Question: list the title, price and publication date for all sales with 'on invoice' payment terms. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, min...
list the title, price and publication date for all sales with 'on invoice' payment terms.
book_publishing_company
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
Question: what is the title that have at least 10% royalty without minimum range amount. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit, lname, ...
what is the title that have at least 10% royalty without minimum range amount.
book_publishing_company
select t1.title, t2.royalty from titles as t1 inner join roysched as t2 on t1.title_id = t2.title_id where t2.lorange > 10000 and t2.hirange < 50000 and t1.title_id = 'bu2075'
Question: state the title and royalty percentage for title id bu2075 between 10000 to 50000 range. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, mini...
state the title and royalty percentage for title id bu2075 between 10000 to 50000 range.
book_publishing_company
select t1.title, t2.lorange from titles as t1 inner join roysched as t2 on t1.title_id = t2.title_id order by t2.royalty desc limit 1
Question: among the titles with royalty percentage, which title has the greatest royalty percentage. state it's minimum range to enjoy this royalty percentage. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pu...
among the titles with royalty percentage, which title has the greatest royalty percentage. state it's minimum range to enjoy this royalty percentage.
book_publishing_company
select t1.title, t2.pub_name from titles as t1 inner join publishers as t2 on t1.pub_id = t2.pub_id where t2.country = 'usa'
Question: provide a list of titles together with its publisher name for all publishers located in the usa. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fna...
provide a list of titles together with its publisher name for all publishers located in the usa.
book_publishing_company
select max(t1.ytd_sales) from titles as t1 inner join roysched as t2 on t1.title_id = t2.title_id where t2.lorange > 20000 and t2.hirange < 20000
Question: state the royalty percentage for the most year to date sale title within the 20000 range. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, min...
state the royalty percentage for the most year to date sale title within the 20000 range.
book_publishing_company
select t1.title, t1.notes, t2.pub_name from titles as t1 inner join publishers as t2 on t1.pub_id = t2.pub_id where strftime('%y', t1.pubdate) = '1991'
Question: list all titles published in year 1991. also provide notes details of the title and the publisher's name. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> em...
list all titles published in year 1991. also provide notes details of the title and the publisher's name.
book_publishing_company
select t1.title, t2.qty from titles as t1 inner join sales as t2 on t1.title_id = t2.title_id inner join stores as t3 on t2.stor_id = t3.stor_id where t2.qty > 20 and t3.state = 'ca'
Question: list all titles with sales of quantity more than 20 and store located in the ca state. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit,...
list all titles with sales of quantity more than 20 and store located in the ca state.
book_publishing_company
select t3.stor_id, t2.title from sales as t1 inner join titles as t2 on t1.title_id = t2.title_id inner join stores as t3 on t3.stor_id = t1.stor_id where t3.stor_id = ( select stor_id from sales group by stor_id order by sum(qty) desc limit 1 ) group by t3.stor_id, t2.title order by sum(t1.qty) asc limit 1
Question: name the store with the highest quantity in sales? what is the least quantity title from the store's sale? | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> e...
name the store with the highest quantity in sales? what is the least quantity title from the store's sale?
book_publishing_company
select t1.title, t3.pub_name, t2.lorange, t2.hirange, t2.royalty from titles as t1 inner join roysched as t2 on t1.title_id = t2.title_id inner join publishers as t3 on t1.pub_id = t3.pub_id where t1.title_id = 'bu2075'
Question: name the title and publisher for title id bu 2075. provide all the royalty percentage for all ranges. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id...
name the title and publisher for title id bu 2075. provide all the royalty percentage for all ranges.
book_publishing_company
select t2.stor_name , cast(sum(case when payterms = 'net 30' then qty else 0 end) as real) * 100 / sum(qty) from sales as t1 inner join stores as t2 on t1.stor_id = t2.stor_id where t1.stor_id = '7066' group by t2.stor_name
Question: name the store with id 7066 and calculate the percentage of the the quantity ordered that were on 'net 30' payment terms. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country...
name the store with id 7066 and calculate the percentage of the the quantity ordered that were on 'net 30' payment terms.
book_publishing_company
select t2.pub_name, avg(t1.ytd_sales) from titles as t1 inner join publishers as t2 on t1.pub_id = t2.pub_id where t1.pub_id = '0877' group by t2.pub_name
Question: state the publisher name for publisher id 877? calculate its average year to date sales. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, mini...
state the publisher name for publisher id 877? calculate its average year to date sales.
book_publishing_company
select fname, lname from employee where strftime('%y', hire_date) < '1990'
Question: name all employees who were hired before year 1990. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit, lname, job_id, job_lvl, pub_id, hi...
name all employees who were hired before year 1990.
book_publishing_company
select fname, lname, hire_date from employee order by job_lvl limit 1
Question: which employee has the lowest job level. state the first name, last name and when he /she was hired. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id,...
which employee has the lowest job level. state the first name, last name and when he /she was hired.
book_publishing_company
select strftime('%y', hire_date) from employee group by strftime('%y', hire_date) order by count(emp_id) desc limit 1
Question: in which year has the most hired employees? | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit, lname, job_id, job_lvl, pub_id, hire_date....
in which year has the most hired employees?
book_publishing_company
select t1.fname, t1.lname from employee as t1 inner join jobs as t2 on t1.job_id = t2.job_id where t1.job_lvl = t2.max_lvl
Question: list all employees who are at the maximum level in their job designation. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit, lname, job_i...
list all employees who are at the maximum level in their job designation.
book_publishing_company
select t1.fname, t1.lname, t1.hire_date from employee as t1 inner join jobs as t2 on t1.job_id = t2.job_id where t2.job_desc = 'chief financial officier'
Question: name the chief executive officer and when he/she was hired. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit, lname, job_id, job_lvl, pu...
name the chief executive officer and when he/she was hired.
book_publishing_company
select t1.fname, t1.lname, t2.pub_name from employee as t1 inner join publishers as t2 on t1.pub_id = t2.pub_id where t2.country != 'usa'
Question: who are the employees working for publisher not located in usa? state the employee's name and publisher name. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -...
who are the employees working for publisher not located in usa? state the employee's name and publisher name.
book_publishing_company
select t1.fname, t1.lname, t3.job_desc from employee as t1 inner join publishers as t2 on t1.pub_id = t2.pub_id inner join jobs as t3 on t1.job_id = t3.job_id where t2.pub_name = 'ggg&g'
Question: list all employees working for publisher 'ggg&g'. state their name and job description. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit...
list all employees working for publisher 'ggg&g'. state their name and job description.
book_publishing_company
select distinct t2.pub_name, t1.type from titles as t1 inner join publishers as t2 on t1.pub_id = t2.pub_id order by t2.pub_name
Question: for each publisher, state the type of titles they published order by the publisher name. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, mini...
for each publisher, state the type of titles they published order by the publisher name.
book_publishing_company
select t2.pub_name from titles as t1 inner join publishers as t2 on t1.pub_id = t2.pub_id where strftime('%y', t1.pubdate) = '1991' group by t1.pub_id, t2.pub_name order by count(t1.title_id) desc limit 1
Question: name the publisher which has the most titles published in 1991. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit, lname, job_id, job_lvl...
name the publisher which has the most titles published in 1991.
book_publishing_company
select t1.title from titles as t1 inner join publishers as t2 on t1.pub_id = t2.pub_id where t2.pub_name = 'binnet & hardley' order by t1.price desc limit 1
Question: name the title with the highest price published by 'binnet & hardley'. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit, lname, job_id, ...
name the title with the highest price published by 'binnet & hardley'.
book_publishing_company
select t1.fname, t1.lname, t2.job_desc from employee as t1 inner join jobs as t2 on t1.job_id = t2.job_id where t1.job_lvl > 200
Question: among all employees, who have job level greater than 200. state the employee name and job description. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_i...
among all employees, who have job level greater than 200. state the employee name and job description.
book_publishing_company
select t3.au_fname, t3.au_lname from titles as t1 inner join titleauthor as t2 on t1.title_id = t2.title_id inner join authors as t3 on t2.au_id = t3.au_id where t1.type = 'business'
Question: name all the authors for all business titles. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit, lname, job_id, job_lvl, pub_id, hire_dat...
name all the authors for all business titles.
book_publishing_company
select t1.title_id, t1.ytd_sales from titles as t1 inner join titleauthor as t2 on t1.title_id = t2.title_id inner join authors as t3 on t2.au_id = t3.au_id where t3.contract = 0
Question: list all the titles and year to date sales by author who are not on contract. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit, lname, j...
list all the titles and year to date sales by author who are not on contract.
book_publishing_company
select t1.title from titles as t1 inner join titleauthor as t2 on t1.title_id = t2.title_id inner join authors as t3 on t2.au_id = t3.au_id where t3.contract = 0 and t3.state = 'ca' order by t1.ytd_sales desc limit 1
Question: for all authors from ca who are not on contract, which title of his/hers has the most year to date sales. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> em...
for all authors from ca who are not on contract, which title of his/hers has the most year to date sales.
book_publishing_company
select t3.au_fname, t3.au_lname from titles as t1 inner join titleauthor as t2 on t1.title_id = t2.title_id inner join authors as t3 on t2.au_id = t3.au_id where t1.title = 'sushi, anyone?'
Question: name all the authors for 'sushi, anyone?'. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit, lname, job_id, job_lvl, pub_id, hire_date. ...
name all the authors for 'sushi, anyone?'.
book_publishing_company
select cast(sum(case when t2.job_desc in ('editor', 'designer') then 1 else 0 end) as real) * 100 / count(t1.job_id) from employee as t1 inner join jobs as t2 on t1.job_id = t2.job_id
Question: calculate the percentage of the employees who are editor or designer? | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit, lname, job_id, j...
calculate the percentage of the employees who are editor or designer?
book_publishing_company
select t1.title from titles as t1 inner join publishers as t2 on t1.pub_id = t2.pub_id where t1.ytd_sales > ( select avg(ytd_sales) from titles )
Question: list all titles which have year to date sales higher than the average order by pubisher name. | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname,...
list all titles which have year to date sales higher than the average order by pubisher name.
book_publishing_company
select count(pub_id) from publishers where country = 'usa'
Question: how many publishers are in the usa? | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit, lname, job_id, job_lvl, pub_id, hire_date. pub_inf...
how many publishers are in the usa?
book_publishing_company
select t1.pr_info from pub_info as t1 inner join publishers as t2 on t1.pub_id = t2.pub_id where t2.pub_name = 'new moon books'
Question: what is the publisher's information of new moon books? | Tables: authors -> au_id, au_lname, au_fname, phone, address, city, state, zip, contract. jobs -> job_id, job_desc, min_lvl, max_lvl. publishers -> pub_id, pub_name, city, state, country. employee -> emp_id, fname, minit, lname, job_id, job_lvl, pub_id,...
what is the publisher's information of new moon books?