db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
movielens
select t2.genre from movies as t1 inner join movies2directors as t2 on t1.movieid = t2.movieid where t1.isenglish = 'f' group by t2.genre order by count(t1.movieid) desc limit 1
Question: which genre contains the greatest number of non-english films? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. m...
which genre contains the greatest number of non-english films?
movielens
select t1.actorid, t2.directorid from movies2actors as t1 inner join movies2directors as t2 on t1.movieid = t2.movieid where t1.movieid = 1949144
Question: list the cast and the director of the movie with the id 1949144. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num....
list the cast and the director of the movie with the id 1949144.
movielens
select cast(sum(iif(t3.a_quality >= 3, 1, 0)) as real) * 100 / count(t1.movieid) from movies as t1 inner join movies2actors as t2 on t1.movieid = t2.movieid inner join actors as t3 on t2.actorid = t3.actorid where t1.country = 'uk'
Question: among the actors who acted in uk movies, what percentage of actors received a rating of at least 3? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2ac...
among the actors who acted in uk movies, what percentage of actors received a rating of at least 3?
movielens
select cast(sum(iif(t2.avg_revenue > t2.d_quality, 1, 0)) as real) * 100 / count(t1.movieid) from movies2directors as t1 inner join directors as t2 on t1.directorid = t2.directorid where t1.genre = 'action'
Question: what is the proportion of action movies directors who are called 'box office success paradox'? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors ...
what is the proportion of action movies directors who are called 'box office success paradox'?
movielens
select t1.actorid from movies2actors as t1 inner join movies as t2 on t1.movieid = t2.movieid where t2.year = 4
Question: please list the actor ids whose movies have the newest published date. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cas...
please list the actor ids whose movies have the newest published date.
movielens
select t2.actorid from movies as t1 inner join movies2actors as t2 on t1.movieid = t2.movieid where t1.runningtime = 2 and t1.isenglish = 't'
Question: who are cast members in an english movie which has a running time equal to 2? please list their ids. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2a...
who are cast members in an english movie which has a running time equal to 2? please list their ids.
movielens
select t2.actorid from movies as t1 inner join movies2actors as t2 on t1.movieid = t2.movieid where t1.country = 'france' group by t2.actorid having count(t1.movieid) > 2
Question: which actor has acted in at least 2 french films? please list their ids. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, c...
which actor has acted in at least 2 french films? please list their ids.
movielens
select count(t2.actorid) from movies as t1 inner join movies2actors as t2 on t1.movieid = t2.movieid where t1.country = 'usa' and t2.cast_num > 1
Question: how many american movies have cast number more than 1? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies2di...
how many american movies have cast number more than 1?
movielens
select distinct t1.movieid from movies as t1 inner join movies2actors as t2 on t1.movieid = t2.movieid where t1.year = 1 and t2.cast_num = 0
Question: please list movie ids which has the oldest publication date and the cast numbers are zero. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> m...
please list movie ids which has the oldest publication date and the cast numbers are zero.
movielens
select count(t1.actorid) from movies2actors as t1 inner join movies as t2 on t1.movieid = t2.movieid where t2.country = 'usa' or t2.country = 'uk'
Question: how many actors have acted in both us or uk films? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies2direct...
how many actors have acted in both us or uk films?
movielens
select count(t1.directorid) from directors as t1 inner join movies2directors as t2 on t1.directorid = t2.directorid where t1.avg_revenue = 4 and (t2.genre = 'adventure' or t2.genre = 'action')
Question: how many directors with average revenue of 4 have made either action or adventure films? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> mov...
how many directors with average revenue of 4 have made either action or adventure films?
movielens
select t1.directorid from directors as t1 inner join movies2directors as t2 on t1.directorid = t2.directorid where t1.d_quality >= 3 group by t1.directorid having count(t2.movieid) >= 2
Question: please list director ids who have the quality of at least 3 and have made at least 2 different genres of movies. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningti...
please list director ids who have the quality of at least 3 and have made at least 2 different genres of movies.
movielens
select count(t1.movieid) from movies as t1 inner join movies2directors as t2 on t1.movieid = t2.movieid where t1.country = 'usa' and t2.genre = 'comedy'
Question: how many american comedies are there? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies2directors -> moviei...
how many american comedies are there?
movielens
select count(t1.movieid) from movies2directors as t1 inner join movies as t2 on t1.movieid = t2.movieid where t2.year = 4 and t1.genre in ('action', 'drama')
Question: how many latest released dramas and action movies? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies2direct...
how many latest released dramas and action movies?
movielens
select t1.movieid from movies2directors as t1 inner join movies as t2 on t1.movieid = t2.movieid where t2.runningtime >= 2 and t1.genre = 'horror'
Question: what horror movies have a running time of at least 2? please list movie ids. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actori...
what horror movies have a running time of at least 2? please list movie ids.
movielens
select cast(sum(iif(t1.rating = 1, 1, 0)) as real) * 100 / count(t1.movieid) from u2base as t1 inner join movies as t2 on t1.movieid = t2.movieid where t2.country = 'usa'
Question: please calculate negative critical reception of american movies | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. ...
please calculate negative critical reception of american movies
movielens
select count(distinct t1.movieid) from movies2directors as t1 inner join u2base as t2 on t1.movieid = t2.movieid where t2.rating = 1 and t1.genre = 'comedy'
Question: what is the disparate number of the comedy films that got the 1 rating? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, ca...
what is the disparate number of the comedy films that got the 1 rating?
movielens
select distinct t1.avg_revenue from directors as t1 inner join movies2directors as t2 on t1.directorid = t2.directorid where t1.d_quality = 5
Question: what's different average revenue status for director who directed the movie that got the most 1 ratings? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movi...
what's different average revenue status for director who directed the movie that got the most 1 ratings?
movielens
select count(movieid) from movies where country = 'france' and movieid in ( select movieid from u2base where rating = ( select max(rating) from u2base ) )
Question: how many french movies got the highest ranking? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies2directors...
how many french movies got the highest ranking?
movielens
select t2.movieid from users as t1 inner join u2base as t2 on t1.userid = t2.userid where t1.age = 25 group by t2.movieid order by count(t1.userid) desc limit 1
Question: list the movie that has been rated most by 25 years old users. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. m...
list the movie that has been rated most by 25 years old users.
movielens
select count(distinct t2.userid) from movies as t1 inner join u2base as t2 on t1.movieid = t2.movieid inner join users as t3 on t2.userid = t3.userid where t1.country = 'uk' and t3.age = 35
Question: how many separate 35 year-old uesers have rated the movie from uk? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_nu...
how many separate 35 year-old uesers have rated the movie from uk?
movielens
select t1.userid, t1.age from users as t1 inner join u2base as t2 on t1.userid = t2.userid where t2.movieid = '2409051' and t2.rating = 2
Question: list the user ids and ages who gave the rate 2 to the movie no. 2409051. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, c...
list the user ids and ages who gave the rate 2 to the movie no. 2409051.
movielens
select distinct t1.movieid from u2base as t1 inner join movies as t2 on t1.movieid = t2.movieid where t1.rating = 5 and t2.year = 1
Question: please give the ids of the oldest films that got the most ratings. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_nu...
please give the ids of the oldest films that got the most ratings.
movielens
select distinct t1.movieid from u2base as t1 inner join movies as t2 on t1.movieid = t2.movieid where t2.country = 'france' and t1.rating = 1
Question: which different movies from france got the least ratings? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies...
which different movies from france got the least ratings?
movielens
select count(t2.actorid) from movies as t1 inner join movies2actors as t2 on t1.movieid = t2.movieid where t1.country in ('france', 'usa')
Question: how many female actors have been played a role in any of french or usa movies? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, acto...
how many female actors have been played a role in any of french or usa movies?
movielens
select count(distinct t2.actorid) from u2base as t1 inner join movies2actors as t2 on t1.movieid = t2.movieid where t1.rating = 5
Question: how many different actors have played a role in the highest rating movie? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, ...
how many different actors have played a role in the highest rating movie?
movielens
select t2.movieid from u2base as t2 inner join movies2directors as t3 on t2.movieid = t3.movieid where t3.genre = 'crime' group by t2.movieid order by avg(t2.rating) limit 1
Question: which crime film got the lowest average rating? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies2directors...
which crime film got the lowest average rating?
movielens
select cast(sum(iif(t3.a_gender = 'm', 1, 0)) as real) / sum(iif(t3.a_gender = 'f', 1, 0)) from movies as t1 inner join movies2actors as t2 on t1.movieid = t2.movieid inner join actors as t3 on t2.actorid = t3.actorid where t1.country = 'uk'
Question: what's the ratio of gender in actors to actress in all the uk movies? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast...
what's the ratio of gender in actors to actress in all the uk movies?
movielens
select count(t1.userid) from users as t1 inner join u2base as t2 on t1.userid = t2.userid where t2.rating = 3 and t2.movieid = '1711133' and t1.age = 35 and t1.u_gender = 'f'
Question: how many 35-year-old female users gave the movie 1711133 a rating of 3? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, ca...
how many 35-year-old female users gave the movie 1711133 a rating of 3?
movielens
select count(t2.userid) from movies as t1 inner join u2base as t2 on t1.movieid = t2.movieid where t1.country = 'uk' and t1.runningtime = 2 and t2.rating = 1 and t1.year = 2
Question: how many users have rated 1 each for the uk's second newest movies with a running time of 2? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors ->...
how many users have rated 1 each for the uk's second newest movies with a running time of 2?
movielens
select distinct t1.directorid from directors as t1 inner join movies2directors as t2 on t1.directorid = t2.directorid where t1.d_quality = 3 and t1.avg_revenue = 2 and t2.genre != 'comedy'
Question: how many unique directors with an average earnings of 2 and a quality of 3 have not made comedy films? list them. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningt...
how many unique directors with an average earnings of 2 and a quality of 3 have not made comedy films? list them.
movielens
select cast(sum(iif(t2.cast_num = 2 and t1.a_quality = 2, 1, 0)) as real) * 100 / count(t1.actorid) from actors as t1 inner join movies2actors as t2 on t1.actorid = t2.actorid where t2.movieid = 1672580 and t1.a_gender = 'f'
Question: calculate the percentage of female actors and quality 2 who have appeared twice at the casting of the film 1672580. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runnin...
calculate the percentage of female actors and quality 2 who have appeared twice at the casting of the film 1672580.
movielens
select cast(sum(iif(a_gender = 'm', 1, 0)) as real) / sum(iif(a_gender = 'f', 1, 0)) from actors where a_quality = 0
Question: how many of the worst actors are men and how many of the worst actors are women? indicate your answer in ratio form. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runni...
how many of the worst actors are men and how many of the worst actors are women? indicate your answer in ratio form.
movielens
select actorid from movies2actors group by actorid order by count(movieid) desc limit 1
Question: which actor has appeared in the most films? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies2directors -> ...
which actor has appeared in the most films?
movielens
select genre from movies2directors group by genre order by count(movieid) desc limit 1
Question: what is the most popular genre of film directed by directors? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. mo...
what is the most popular genre of film directed by directors?
movielens
select t2.genre from directors as t1 inner join movies2directors as t2 on t1.directorid = t2.directorid where t1.d_quality = 0 group by t2.genre order by count(t2.movieid) desc limit 1
Question: what are the most common film genres made by the worst directors? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num...
what are the most common film genres made by the worst directors?
movielens
select t2.movieid from movies as t1 inner join u2base as t2 on t1.movieid = t2.movieid where t1.isenglish = 'f' and t1.country = 'usa' order by t2.rating limit 1
Question: what non-english american film/s has received the lowest user ratings? mention the movie's i.d. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors...
what non-english american film/s has received the lowest user ratings? mention the movie's i.d.
movielens
select cast(sum(case when t1.d_quality = 4 and t1.avg_revenue = 4 then 1 else 0 end) as real) / count(t2.movieid) from directors as t1 inner join movies2directors as t2 on t1.directorid = t2.directorid
Question: what is the total average movie directed by the directors who's quality and revenue is 4? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> mo...
what is the total average movie directed by the directors who's quality and revenue is 4?
movielens
select t2.movieid from users as t1 inner join u2base as t2 on t1.userid = t2.userid inner join movies as t3 on t2.movieid = t3.movieid where t1.u_gender = 'f' and t1.occupation = 3 and t2.rating = 5
Question: which movies have received the greatest ratings from female users whose occupations fall within the category of 3? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, running...
which movies have received the greatest ratings from female users whose occupations fall within the category of 3?
movielens
select sum(iif(t1.a_gender = 'f', 1, 0)) , t3.country, t3.runningtime from actors as t1 inner join movies2actors as t2 on t1.actorid = t2.actorid inner join movies as t3 on t2.movieid = t3.movieid where t2.movieid = 2312852 group by t3.country, t3.runningtime
Question: how many female actresses appeared in the movie 2312852, what country was it in, and what was it's running time? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningti...
how many female actresses appeared in the movie 2312852, what country was it in, and what was it's running time?
movielens
select count(t1.movieid) from movies2directors as t1 inner join movies as t2 on t1.movieid = t2.movieid inner join directors as t3 on t1.directorid = t3.directorid where t1.genre = 'horror' and t3.d_quality = 0
Question: how many horror movies were made by the worst directors? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningtime. movies2actors -> movieid, actorid, cast_num. movies2...
how many horror movies were made by the worst directors?
movielens
select t2.genre from movies as t1 inner join movies2directors as t2 on t1.movieid = t2.movieid where t1.runningtime <= 2 and t1.isenglish = 't' and t1.country = 'other'
Question: what are the genres of all the english-language foreign films having a runtime of two hours or less? list each one. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runnin...
what are the genres of all the english-language foreign films having a runtime of two hours or less? list each one.
movielens
select distinct t1.movieid from movies as t1 inner join movies2directors as t2 on t1.movieid = t2.movieid inner join u2base as t3 on t1.movieid = t3.movieid inner join users as t4 on t3.userid = t4.userid where t1.country = 'uk' and t2.genre = 'comedy' and t1.runningtime = 3 and t3.rating = 5 and t4.age between 45 and ...
Question: among the english comedy movies produced in the uk, how many movies with a running time of 3 was rated the highest by users between the age 45-50? indicate the movie names. | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_qua...
among the english comedy movies produced in the uk, how many movies with a running time of 3 was rated the highest by users between the age 45-50? indicate the movie names.
movielens
select cast(sum(iif(t1.isenglish = 't', 1, 0)) - sum(iif(t1.isenglish = 'f', 1, 0)) as real) * 100 / count(t1.movieid) from movies as t1 inner join movies2directors as t2 on t1.movieid = t2.movieid where t1.country = 'other' and t1.year = 3
Question: what is the percentage difference of english and non-english-language crime movies in other countries in year 3? | Tables: users -> userid, age, u_gender, occupation. directors -> directorid, d_quality, avg_revenue. actors -> actorid, a_gender, a_quality. movies -> movieid, year, isEnglish, country, runningti...
what is the percentage difference of english and non-english-language crime movies in other countries in year 3?
movielens
select sum(iif(a_gender = 'm', 1, 0)) , sum(iif(a_gender = 'f', 1, 0)) , cast(sum(iif(a_quality = 5, 1, 0)) as real) * 100 / count(*) , cast(sum(iif(a_quality = 0, 1, 0)) as real) * 100 / count(*), ( select directorid from movies2directors where movieid = 1684910 ) , ( select genre from movies2directors where movieid =...
Question: what is the total amount male and female actors who were casted in movie id 1684910 and what is the proportion between the highest quality actors against the worst quality of actors? indicate your answer in percentage. list the the director as well as the genre. | Tables: users -> userid, age, u_gender, occup...
what is the total amount male and female actors who were casted in movie id 1684910 and what is the proportion between the highest quality actors against the worst quality of actors? indicate your answer in percentage. list the the director as well as the genre.
superstore
select distinct t2.`product name` from central_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t1.`order id` = 'ca-2011-112326'
Question: please list the names of all the products ordered in order ca-2011-112326 in superstores in the center. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order I...
please list the names of all the products ordered in order ca-2011-112326 in superstores in the center.
superstore
select max(strftime('%j', `ship date`) - strftime('%j', `order date`)) as longesttimedays from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` where t1.`customer name` = 'aimee bixby'
Question: among all the orders made by aimee bixby, what was the longest shipment time? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, ...
among all the orders made by aimee bixby, what was the longest shipment time?
superstore
select count(distinct t2.`order id`) from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` where t1.`customer name` = 'aimee bixby' and t2.`ship mode` = 'standard class'
Question: among all the orders made by aimee bixby, how many of them chose the slowest delivery speed? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Da...
among all the orders made by aimee bixby, how many of them chose the slowest delivery speed?
superstore
select count(distinct t2.`order id`) from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` where t1.`customer name` = 'aimee bixby'
Question: how many orders has aimee bixby made? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, Customer ID, Region, Product ...
how many orders has aimee bixby made?
superstore
select distinct t2.`order id` from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` where t1.`customer name` = 'aimee bixby' group by t2.`product id` having count(t2.`product id`) > 3
Question: please list the ids of the orders made by aimee bixby with more than 3 kinds of products ordered. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Ord...
please list the ids of the orders made by aimee bixby with more than 3 kinds of products ordered.
superstore
select count(distinct t2.`order id`) from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t2.`product id` where t3.category = 'furniture' and t1.`customer name` = 'aimee bixby'
Question: among the orders made by aimee bixby, how many of them included at least one kind of product under the category 'furniture'? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_supersto...
among the orders made by aimee bixby, how many of them included at least one kind of product under the category 'furniture'?
superstore
select distinct t3.`product name` from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t2.`product id` where t1.`customer name` = 'aimee bixby' and strftime('%y', t2.`ship date`) = '2016'
Question: please list the names of all the products ordered by aimee bixby in 2016. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship...
please list the names of all the products ordered by aimee bixby in 2016.
superstore
select sum(t1.quantity) from central_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t2.`product name` = 'telescoping adjustable floor lamp'
Question: what is the total quantity of 'telescoping adjustable floor lamp' ordered from central superstores? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, O...
what is the total quantity of 'telescoping adjustable floor lamp' ordered from central superstores?
superstore
select distinct t1.`customer name` from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t2.`product id` where t3.`product name` = 'telescoping adjustable floor lamp'
Question: please list the names of all the customers who had ordered the product 'telescoping adjustable floor lamp'. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Ord...
please list the names of all the customers who had ordered the product 'telescoping adjustable floor lamp'.
superstore
select count(distinct t1.`customer name`) from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t2.`product id` where t3.`product name` = 'telescoping adjustable floor lamp' and t1.segment = 'consumer'
Question: among the customers who have ordered the product 'telescoping adjustable floor lamp', how many of them are consumers? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> R...
among the customers who have ordered the product 'telescoping adjustable floor lamp', how many of them are consumers?
superstore
select sum(t2.quantity) from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t2.`product id` where t1.`customer name` = 'aimee bixby' and t3.`product name` = 'xerox 1952' and t2.`order date` = '2014-09-10'
Question: what was the quantity of xerox 1952 ordered by aimee bixby on 2014/9/10? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship ...
what was the quantity of xerox 1952 ordered by aimee bixby on 2014/9/10?
superstore
select count(distinct t2.`order id`) from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t2.`product id` where t1.`customer name` = 'aimee bixby' and t3.`product name` = 'xerox 1952'
Question: for how many times has aimee bixby ordered the product xerox 1952? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, ...
for how many times has aimee bixby ordered the product xerox 1952?
superstore
select distinct t2.sales / (1 - t2.discount) from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t2.`product id` where t1.`customer name` = 'aimee bixby' and t3.`product name` = 'xerox 1952' and t2.`order date` = '2014-09-10'
Question: what was the original price of xerox 1952 ordered by aimee bixby on 2014/9/10? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date,...
what was the original price of xerox 1952 ordered by aimee bixby on 2014/9/10?
superstore
select distinct (t2.sales / (1 - t2.discount)) * t2.quantity - profit from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t2.`product id` where t1.`customer name` = 'aimee bixby' and t3.`product name` = 'xerox 1952' and t2.`order dat...
Question: what was the total cost of xerox 1952 ordered by aimee bixby on 2014/9/10? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Shi...
what was the total cost of xerox 1952 ordered by aimee bixby on 2014/9/10?
superstore
select count(distinct t1.`product id`) from east_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t2.`sub-category` = 'art' and t1.region = 'east' and strftime('%y', t1.`order date`) = '2013'
Question: how many art products were ordered in 2013 in the east superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, ...
how many art products were ordered in 2013 in the east superstore?
superstore
select t2.`customer name` from east_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` group by t1.`order id`, t2.`customer name` order by sum((t1.sales / (1 - t1.discount)) * t1.quantity - t1.profit) desc limit 1
Question: who is the customer who purchased the largest total cost of products in a single order? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, S...
who is the customer who purchased the largest total cost of products in a single order?
superstore
select t2.`product name` from east_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` order by (t1.sales / (1 - t1.discount)) desc limit 1
Question: what is the name of the product that has the highest original price? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode...
what is the name of the product that has the highest original price?
superstore
select t3.`product name` from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t2.`product id` where t1.`customer name` = 'darren powers' order by t2.`order date` desc limit 1
Question: what is the name of the product that was ordered recently by darren powers? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Sh...
what is the name of the product that was ordered recently by darren powers?
superstore
select sum(t1.quantity) from central_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t2.`product name` = 'advantus plastic paper clips'
Question: how many quantities of advantus plastic paper clips were ordered overall? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship...
how many quantities of advantus plastic paper clips were ordered overall?
superstore
select t1.`order id` from central_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t2.`product name` = 'logitech g600 mmo gaming mouse' group by t1.`order id` order by sum((t1.sales / (1 - t1.discount)) * t1.quantity - t1.profit) desc limit 1
Question: which order of logitech g600 mmo gaming mouse has the highest total cost? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship...
which order of logitech g600 mmo gaming mouse has the highest total cost?
superstore
select distinct t3.`product name` from west_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t1.`product id` where t2.`customer name` = 'alejandro grove'
Question: what are the names of the products that were ordered by alejandro grove? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship ...
what are the names of the products that were ordered by alejandro grove?
superstore
select count(distinct t1.`customer id`) from west_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t1.`product id` where t3.`product name` = 'cardinal easyopen d-ring binders' and t2.city = 'chicago' and t1.quantity > 10
Question: how many customers in chicago ordered at least 10 cardinal easyopen d-ring binders in a single order? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID,...
how many customers in chicago ordered at least 10 cardinal easyopen d-ring binders in a single order?
superstore
select distinct t2.`product name` from west_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t1.profit > 1000
Question: what are the names of the products with a profit of no less than 1,000 in one single order? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Dat...
what are the names of the products with a profit of no less than 1,000 in one single order?
superstore
select t2.`product name` from east_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t1.`ship mode` = 'first class' and t2.region = 'east' limit 10
Question: name 10 products that were shipped first class from the east region. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode...
name 10 products that were shipped first class from the east region.
superstore
select distinct t3.`product name` from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t2.`product id` where t1.`customer name` = 'becky martin' and t3.region = 'central'
Question: list the products ordered by becky martin around the central region. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode...
list the products ordered by becky martin around the central region.
superstore
select distinct t2.`customer name` from west_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` where t1.region = 'west' and t1.`ship mode` = 'second class' limit 5
Question: list 5 customers in the west region who had their item shipped 'second class.' | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date,...
list 5 customers in the west region who had their item shipped 'second class.'
superstore
select sum(t2.profit) from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` where t1.`customer name` = 'patrick gardner' and t1.region = 'central'
Question: add the total profit of patrick gardner in the central region. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, Cust...
add the total profit of patrick gardner in the central region.
superstore
select t2.`product name` from south_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t1.`ship date` = '2013-03-04' and t2.region = 'south' and t1.`order date` = '2013-03-04'
Question: which item was shipped on 3/4/2013 and scheduled for same day delivery in the south region? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Dat...
which item was shipped on 3/4/2013 and scheduled for same day delivery in the south region?
superstore
select sum(t1.sales) from central_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t2.`product name` = 'avery hi-liter everbold pen style fluorescent highlighters, 4/pack' and t2.region = 'central'
Question: what is the total sales of 'avery hi-liter everbold pen style fluorescent highlighters, 4/pack' in the central region? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> ...
what is the total sales of 'avery hi-liter everbold pen style fluorescent highlighters, 4/pack' in the central region?
superstore
select t3.`product name` from east_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t1.`product id` where t2.`customer name` = 'jonathan doherty' and t2.region = 'east' order by t1.quantity desc limit 1
Question: name the item ordered by jonathan doherty with the highest quantity in the east region. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, S...
name the item ordered by jonathan doherty with the highest quantity in the east region.
superstore
select sum(t1.quantity), t2.`product name` from east_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t1.`ship date` = '2015-03-25' and t2.region = 'east'
Question: how much is the total quantity of items from the east region shipped on 3/25/2015? name the products. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID,...
how much is the total quantity of items from the east region shipped on 3/25/2015? name the products.
superstore
select distinct t2.`customer name` from east_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t1.`product id` where t3.`product name` = 'global high-back leather tilter, burgundy' and t1.`order date` = '2013-10-13' and t1.region = 'east'
Question: which customer ordered 'global high-back leather tilter, burgundy' on 10/13/2013 in the east region? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, ...
which customer ordered 'global high-back leather tilter, burgundy' on 10/13/2013 in the east region?
superstore
select distinct t3.category from south_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t1.`product id` where t2.`customer name` = 'katherine murray' and t1.`order date` = '2018-11-04' and t2.region = 'south'
Question: what category does the item ordered by katherine murray on 11/4/2018 in the south region belong to? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, O...
what category does the item ordered by katherine murray on 11/4/2018 in the south region belong to?
superstore
select cast(sum(case when t2.category = 'furniture' then 1 else 0 end) as real) * 100 / sum(t1.quantity) from west_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t2.region = 'west' and t1.`ship mode` = 'standard class'
Question: what percentage do items under the category of 'furniture' make up the total number of items ordered that are shipped as standard in the west region? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category,...
what percentage do items under the category of 'furniture' make up the total number of items ordered that are shipped as standard in the west region?
superstore
select t2.`ship date` from people as t1 inner join central_superstore as t2 on t1.`customer id` = t2.`customer id` where t1.`customer name` = 'ann chong' and t1.region = 'central'
Question: what is the ship date of the order by the customer named ann chong in the central region? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date,...
what is the ship date of the order by the customer named ann chong in the central region?
superstore
select distinct t2.segment from west_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` where t1.region = 'west' and t1.`order id` = 'ca-2011-108189'
Question: give the customer segment from the west region that orders the order id ca-2011-108189. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, S...
give the customer segment from the west region that orders the order id ca-2011-108189.
superstore
select sum(t1.sales) from west_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t2.`product name` = 'hon valutask swivel chairs' and t1.region = 'west'
Question: what are the total sales of the accumulated orders of hon valutask swivel chairs in the west region? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, ...
what are the total sales of the accumulated orders of hon valutask swivel chairs in the west region?
superstore
select t1.`order id` from south_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` where t2.region = 'south' and t2.`customer name` = 'frank olsen'
Question: provide the order id of frank olsen of the south region. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, Customer I...
provide the order id of frank olsen of the south region.
superstore
select t2.`product name` from central_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t1.`order date` = '2018-04-26' and t1.`ship date` = '2018-04-27' and t2.region = 'central'
Question: what product was ordered in the central region on april 26, 2018, and shipped by april 27, 2018? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Orde...
what product was ordered in the central region on april 26, 2018, and shipped by april 27, 2018?
superstore
select t5.city, t5.state from west_superstore as t1 inner join east_superstore as t2 on t1.`customer id` = t2.`customer id` inner join central_superstore as t3 on t3.`customer id` = t2.`customer id` inner join south_superstore as t4 on t4.`customer id` = t3.`customer id` inner join people as t5 on t5.`customer id` = t4...
Question: from which city and state does the customer that bought the product with the highest sales? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Dat...
from which city and state does the customer that bought the product with the highest sales?
superstore
select t2.`customer name` from east_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` where t1.region = 'east' order by t1.profit desc limit 1
Question: who is the customer from the east region that purchased the order with the highest profit? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date...
who is the customer from the east region that purchased the order with the highest profit?
superstore
select t1.quantity from west_superstore as t1 inner join east_superstore as t2 on t1.`customer id` = t2.`customer id` inner join central_superstore as t3 on t3.`customer id` = t2.`customer id` inner join south_superstore as t4 on t4.`customer id` = t3.`customer id` inner join people as t5 on t5.`customer id` = t4.`cust...
Question: among the customers from chicago, illinois, what is the highest quantity of products bought in a single order? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, ...
among the customers from chicago, illinois, what is the highest quantity of products bought in a single order?
superstore
select t1.`order date`, t2.`product name` from central_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t1.`order id` = 'ca-2011-137274' and t2.region = 'central'
Question: what are the order date and product name of the order id ca-2011-137274 from the central region? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Orde...
what are the order date and product name of the order id ca-2011-137274 from the central region?
superstore
select distinct t2.`customer name` from south_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t1.`product id` where t1.region = 'south' and t3.`product name` = 'xerox 23'
Question: list down the customers that purchased the product named xerox 23 in the south region. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Sh...
list down the customers that purchased the product named xerox 23 in the south region.
superstore
select t2.`product name` from central_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t2.category = 'office supplies' and t2.region = 'central' order by t1.sales desc limit 1
Question: among the products under the office supplies category, what is the product that made the highest sales in the central region? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superst...
among the products under the office supplies category, what is the product that made the highest sales in the central region?
superstore
select t2.`customer name` from west_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` where t1.region = 'west' order by t1.discount desc limit 1
Question: who is the customer from the west region that received the highest discount? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, S...
who is the customer from the west region that received the highest discount?
superstore
select distinct t2.`product name` from east_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t2.region = 'east' and t1.profit > ( select avg(profit) * 0.98 from east_superstore )
Question: provide the names of the products with a profit greater than 98% of the average profit of all products in the east region. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore...
provide the names of the products with a profit greater than 98% of the average profit of all products in the east region.
superstore
select distinct t2.`customer name` from east_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` where t1.region = 'east' and t1.sales / (1 - t1.discount) * t1.quantity - t1.profit > 80000
Question: name the customers from the eastern region whose orders cost above 80000. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship...
name the customers from the eastern region whose orders cost above 80000.
superstore
select count(distinct t1.`order id`) from east_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` where t2.`customer name` = 'maxwell schwartz' and strftime('%y', t1.`order date`) = '2015'
Question: how many orders were made by maxwell schwartz in 2015? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, Customer ID,...
how many orders were made by maxwell schwartz in 2015?
superstore
select distinct t2.`customer name` from central_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t1.`product id` where t3.`product name` = 'bush mission pointe library' and t3.region = 'central'
Question: who ordered the bush mission pointe library in the central region? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, ...
who ordered the bush mission pointe library in the central region?
superstore
select sum(t1.profit) + sum(t2.profit) + sum(t3.profit) + sum(t4.profit) as totalprofit from west_superstore as t1 inner join east_superstore as t2 on t1.`customer id` = t2.`customer id` inner join central_superstore as t3 on t3.`customer id` = t2.`customer id` inner join south_superstore as t4 on t4.`customer id` = t3...
Question: calculate the total profit by cisco spa301 for all regions. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, Custome...
calculate the total profit by cisco spa301 for all regions.
superstore
select distinct t3.`product name` from west_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t1.`product id` where t2.`customer name` = 'anne mcfarland'
Question: list the products that were ordered by anne mcfarland from the western store. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, ...
list the products that were ordered by anne mcfarland from the western store.
superstore
select distinct t3.`product name` from west_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t1.`product id` where t2.city = 'coachella'
Question: list the products ordered by customers in coachella. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, Customer ID, R...
list the products ordered by customers in coachella.
superstore
select east, west from ( select count(`order id`) as east , ( select count(`order id`) from west_superstore where `order date` like '2015%' ) as west from east_superstore where `order date` like '2015%' )
Question: compare the numbers of orders between the eastern and western stores in 2015. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, ...
compare the numbers of orders between the eastern and western stores in 2015.
superstore
select distinct t3.`product name` from west_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` inner join product as t3 on t3.`product id` = t1.`product id` where t2.`customer name` = 'matt abelman' and strftime('%y', t1.`order date`) = '2013'
Question: list the products ordered by matt abelman from the western store in 2013. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship...
list the products ordered by matt abelman from the western store in 2013.