db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
trains
select t2.direction from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t1.load_num = 0
Question: please list the directions in which the trains with at least one empty-loaded car run. | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
please list the directions in which the trains with at least one empty-loaded car run.
trains
select t2.direction from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t1.shape = 'ellipse'
Question: in which direction does the train with an ellipse-shape car run? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
in which direction does the train with an ellipse-shape car run?
trains
select sum(case when t1.len = 'short' then 1 else 0 end)as count from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t2.direction = 'east'
Question: what is the total number of short cars on all the trains that run in the east direction? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
what is the total number of short cars on all the trains that run in the east direction?
trains
select t1.shape from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t2.direction = 'east' and t1.position = 1 group by t1.shape
Question: please list the shapes of all the head cars on the trains that run in the east direction. | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
please list the shapes of all the head cars on the trains that run in the east direction.
trains
select sum(case when t1.roof = 'flat' then 1 else 0 end)as count from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t2.direction = 'east'
Question: how many cars on a train that runs in the east direction have a flat roof? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
how many cars on a train that runs in the east direction have a flat roof?
trains
select sum(case when t1.load_shape = 'circle' then 1 else 0 end)as count from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t2.direction = 'east' and t1.roof = 'flat'
Question: among the cars on a train that runs in the east direction, how many of them have a flat roof and a circle load shape? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
among the cars on a train that runs in the east direction, how many of them have a flat roof and a circle load shape?
trains
select t1.direction from trains as t1 inner join ( select train_id, count(id) as rectcarsnum from cars where shape = 'rectangle' group by train_id ) as t2 on t1.id = t2.train_id order by t2.rectcarsnum desc
Question: trains that run in which direction have more rectangle-shaped cars in total? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
trains that run in which direction have more rectangle-shaped cars in total?
trains
select t2.direction from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t1.len = 'short' and t1.position = 4
Question: please list the directions in which the trains with 4 short cars run. | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
please list the directions in which the trains with 4 short cars run.
trains
select cast(count(t1.id) as real) / count(distinct t1.train_id) from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t2.direction = 'east'
Question: what is the average number of cars on trains that run in the east direction? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
what is the average number of cars on trains that run in the east direction?
trains
select cast(count(distinct case when t2.direction = 'east' then t1.train_id else null end) as real) * 100 / count(distinct t1.train_id) from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t1.shape in ('bucket', 'ellipse')
Question: among the trains that have at least one non-regular shaped car, what is the percentage of it running in the east direction? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
among the trains that have at least one non-regular shaped car, what is the percentage of it running in the east direction?
trains
select count(id) from cars where shape = 'hexagon' and len = 'short'
Question: how many short cars are in the shape of hexagon? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
how many short cars are in the shape of hexagon?
trains
select count(id) from trains where direction = 'west'
Question: how many trains are running west? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
how many trains are running west?
trains
select load_shape from cars where shape = 'ellipse' and len = 'short'
Question: what are the load shapes of all the short ellipse cars? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
what are the load shapes of all the short ellipse cars?
trains
select id from trains where direction = 'east'
Question: what are the ids of the train running east? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
what are the ids of the train running east?
trains
select sum(wheels) from cars where len = 'long'
Question: how many wheels do the long cars have? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
how many wheels do the long cars have?
trains
select direction from trains group by direction order by count(id) desc
Question: which direction do the majority of the trains are running? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
which direction do the majority of the trains are running?
trains
select sum(case when t1.direction = 'east' then 1 else 0 end)as count from trains as t1 inner join ( select train_id, count(id) as carsnum from cars group by train_id ) as t2 on t1.id = t2.train_id where t2.carsnum >= 4
Question: among the trains running east, how many trains have at least 4 cars? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
among the trains running east, how many trains have at least 4 cars?
trains
select t2.direction from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t1.position = 2 and t1.shape = 'rectangle' group by t2.direction order by count(t2.id) desc limit 1
Question: which direction do most of the trains with rectangle-shaped second cars run? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
which direction do most of the trains with rectangle-shaped second cars run?
trains
select count(t.train_id) from (select t1.train_id from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t1.position = 3 and t2.direction = 'west' and t1.sides = 'double' group by t1.train_id)as t
Question: how many trains running west have double sided cars in 3rd position? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
how many trains running west have double sided cars in 3rd position?
trains
select count(t.train_id) from (select t1.train_id from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t1.position = 1 and t2.direction = 'east' and t1.shape = 'rectangle' group by t1.train_id)as t
Question: how many eastbound trains have rectangular-shaped head cars? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
how many eastbound trains have rectangular-shaped head cars?
trains
select sum(case when t1.direction = 'west' then 1 else 0 end)as count from trains as t1 inner join ( select train_id, count(id) from cars where roof = 'none' group by train_id having count(id) = 1 ) as t2 on t1.id = t2.train_id
Question: among the trains running west, how many trains have no more than one car with an open roof? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
among the trains running west, how many trains have no more than one car with an open roof?
trains
select t1.direction from trains as t1 inner join ( select train_id, count(id) as carsnum from cars group by train_id having carsnum = 3 ) as t2 on t1.id = t2.train_id group by t1.direction
Question: which direction does the majority of the trains that have 3 cars are running? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
which direction does the majority of the trains that have 3 cars are running?
trains
select count(distinct t1.train_id) from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t1.position = 1 and t1.load_num = 3
Question: how many trains with fully loaded head cars are running east? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
how many trains with fully loaded head cars are running east?
trains
select count(t1.id) from trains as t1 inner join cars as t2 on t1.id = t2.train_id inner join ( select train_id, max(position) as trailposi from cars group by train_id ) as t3 on t1.id = t3.train_id where t1.direction = 'east' and t2.position = t3.trailposi and t2.sides = 'double'
Question: how many cars running east have double-sided tail cars? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
how many cars running east have double-sided tail cars?
trains
select t2.direction from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t1.load_num = 0
Question: list all the directions of the trains that have empty cars. | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
list all the directions of the trains that have empty cars.
trains
select t2.direction from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t1.position = 2 and t1.shape = 'diamond'
Question: what is the direction of the train with a diamond-shaped load in its 2nd car? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
what is the direction of the train with a diamond-shaped load in its 2nd car?
trains
select sum(case when t2.direction = 'west' then 1 else 0 end)as count from cars as t1 inner join trains as t2 on t1.train_id = t2.id where t1.wheels = 3 and t1.roof = 'jagged'
Question: among the trains running west, how many trains have three-wheeled, jagged roof cars? | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
among the trains running west, how many trains have three-wheeled, jagged roof cars?
trains
select t1.direction from trains as t1 inner join ( select train_id, max(position) as trailposi from cars group by train_id ) as t2 on t1.id = t2.train_id where t2.trailposi <= 2
Question: provide the directions for all the trains that have 2 or less cars. | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
provide the directions for all the trains that have 2 or less cars.
trains
select cast(count(case when t2.trailposi >= 4 then t1.id else null end) as real) * 100 / count(t1.id) from trains as t1 inner join ( select train_id, max(position) as trailposi from cars group by train_id ) as t2 on t1.id = t2.train_id union all select t1.direction from trains as t1 inner join ( select train_id, max(po...
Question: what is the percentage of all the trains with at least 4 cars? list the directions of the said trains. | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direction. | Joins: cars.train_id = trains.id,
what is the percentage of all the trains with at least 4 cars? list the directions of the said trains.
trains
select distinct t3.load_shape from ( select load_shape, train_id from cars where position = 1 order by train_id desc ) as t3 union all select t4.load_shape from ( select load_shape, train_id from cars where position = 1 order by train_id desc limit 1 ) as t4 union all select (cast(count(distinct case when t2.direction ...
Question: list all the load shapes of all head cars of each train and identify which load shape has the highest number. calculate the percentage of the trains with the said head car that are running eas | Tables: cars -> id, train_id, position, shape, len, sides, roof, wheels, load_shape, load_num. trains -> id, direct...
list all the load shapes of all head cars of each train and identify which load shape has the highest number. calculate the percentage of the trains with the said head car that are running eas
movie
select t2.`character name` from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid where t1.title = 'look who''s talking'
Question: please list the names of the characters in the movie look who's talking. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count,...
please list the names of the characters in the movie look who's talking.
movie
select t2.`character name` from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid where t1.title = 'batman' order by t2.screentime desc limit 1
Question: which character has the longest screen time in the movie batman? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summary...
which character has the longest screen time in the movie batman?
movie
select t3.name from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t1.title = 'batman' and t2.`character name` = 'joker'
Question: which actor played the role of joker in the movie batman? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summary. chara...
which actor played the role of joker in the movie batman?
movie
select t3.name from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t1.title = 'batman'
Question: please list the names of the actors who played a role in the movie batman. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Coun...
please list the names of the actors who played a role in the movie batman.
movie
select t1.title from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid where t2.`character name` = 'dr. archibald ''moonlight'' graham'
Question: which movie is the character dr. archibald 'moonlight' graham from? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summ...
which movie is the character dr. archibald 'moonlight' graham from?
movie
select t1.title from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t3.name = 'tom cruise'
Question: please list the names of the movies starring tom cruise. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summary. charac...
please list the names of the movies starring tom cruise.
movie
select count(*) from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t3.name = 'morgan freeman' and t1.`mpaa rating` = 'pg'
Question: how many movies starring morgan freeman are suggested by parental guidance? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Cou...
how many movies starring morgan freeman are suggested by parental guidance?
movie
select t1.title from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t3.name = 'tom cruise' order by t1.rating desc limit 1
Question: among the movies starring tom cruise, which one of them has the best quality? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating C...
among the movies starring tom cruise, which one of them has the best quality?
movie
select t2.`character name` from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t3.name = 'tom cruise' and t1.title = 'born on the fourth of july'
Question: what is the name of the character played by tom cruise in the movie born on the fourth of july? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime...
what is the name of the character played by tom cruise in the movie born on the fourth of july?
movie
select t1.`character name` from characters as t1 inner join actor as t2 on t1.actorid = t2.actorid where t2.name = 'tom cruise'
Question: please list the names of all the characters played by tom cruise. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summar...
please list the names of all the characters played by tom cruise.
movie
select t3.name from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t1.title = 'batman' order by t3.`height (inches)` desc limit 1
Question: among the actors who starred in the movie batman, which one of them is the tallest? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Ra...
among the actors who starred in the movie batman, which one of them is the tallest?
movie
select count(*) from characters as t1 inner join actor as t2 on t1.actorid = t2.actorid where t2.gender = 'male' and t2.ethnicity = 'african american'
Question: how many movies star a male african american actor? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summary. characters ...
how many movies star a male african american actor?
movie
select avg(t1.rating) from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t3.name = 'tom cruise'
Question: what is the average rating of all the movies starring tom cruise? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summar...
what is the average rating of all the movies starring tom cruise?
movie
select (max(cast(substr(t2.screentime, 3, 2) as real)) - min(cast(substr(t2.screentime, 3, 2) as real))) * 100 / min(cast(substr(t2.screentime, 3, 2) as real)) from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid where t1.title = 'batman'
Question: how much longer in percentage is the screen time of the most important character in batman than the least important one? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Rel...
how much longer in percentage is the screen time of the most important character in batman than the least important one?
movie
select title from movie order by budget desc limit 1
Question: which movie had the biggest budget? give the name of the movie. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summary....
which movie had the biggest budget? give the name of the movie.
movie
select t1.`mpaa rating` from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid where t2.`character name` = 'peter quill'
Question: what is the mpaa rating for the movie with the character named 'peter quill' in it? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Ra...
what is the mpaa rating for the movie with the character named 'peter quill' in it?
movie
select t2.`character name` from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid where t2.creditorder = '1' and t1.genre = 'thriller' order by t1.rating desc limit 1
Question: give the name of the no.1 character in the credit list from the highest rating thriller movie. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime,...
give the name of the no.1 character in the credit list from the highest rating thriller movie.
movie
select t2.name from characters as t1 inner join actor as t2 on t1.actorid = t2.actorid inner join movie as t3 on t3.movieid = t1.movieid where t3.title = 'batman' order by t1.screentime desc limit 1
Question: who was the actor that played in the movie 'batman' with the longest screentime? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Ratin...
who was the actor that played in the movie 'batman' with the longest screentime?
movie
select count(*) from characters as t1 inner join actor as t2 on t1.actorid = t2.actorid where cast(replace(replace(t2.networth, ',', ''), '$', '') as real) = ( select max(cast(replace(replace(networth, ',', ''), '$', '') as real)) from actor)
Question: how many movies has the highest networth actor acted in? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summary. charac...
how many movies has the highest networth actor acted in?
movie
select t2.name from characters as t1 inner join actor as t2 on t1.actorid = t2.actorid where t1.`character name` = 'chanice kobolowski'
Question: who played the character named 'chanice kobolowski'? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summary. characters...
who played the character named 'chanice kobolowski'?
movie
select t2.`date of birth` from characters as t1 inner join actor as t2 on t1.actorid = t2.actorid where t1.`character name` = 'sully'
Question: when is the birthday of the actor who played 'sully'? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summary. character...
when is the birthday of the actor who played 'sully'?
movie
select t2.`birth city` from characters as t1 inner join actor as t2 on t1.actorid = t2.actorid where t1.`character name` = 'gabriel martin'
Question: show the birth city of the actor who played 'gabriel martin'. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summary. c...
show the birth city of the actor who played 'gabriel martin'.
movie
select t2.biography from characters as t1 inner join actor as t2 on t1.actorid = t2.actorid where t1.`character name` = 'michael moscovitz'
Question: give the biography of the actor who played 'michael moscovitz'. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summary....
give the biography of the actor who played 'michael moscovitz'.
movie
select t2.`height (inches)` from characters as t1 inner join actor as t2 on t1.actorid = t2.actorid where t1.`character name` = 'lurch'
Question: how tall is the actor who played 'lurch'? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summary. characters -> MovieID...
how tall is the actor who played 'lurch'?
movie
select t2.`character name` from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid where t1.title = 'g.i. joe: the rise of cobra' and t2.creditorder = '3'
Question: show the no.3 character name in the credit list of the movie 'g.i. joe: the rise of cobra'. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Ra...
show the no.3 character name in the credit list of the movie 'g.i. joe: the rise of cobra'.
movie
select t3.name from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t1.title = 'american hustle' and t2.creditorder = '2'
Question: who played the no.2 character in the credit list of the movie 'american hustle'? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Ratin...
who played the no.2 character in the credit list of the movie 'american hustle'?
movie
select t3.name from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t1.`release date` = '2015-10-26' and t2.creditorder = '1'
Question: who played the no.1 character in the credit list of the movie which was released on '2015/10/26'? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runti...
who played the no.1 character in the credit list of the movie which was released on '2015/10/26'?
movie
select cast(sum(case when t3.`birth country` = 'usa' then 1 else 0 end) as real) * 100 / count(t3.`birth country`) from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t1.title = 'mrs. doubtfire'
Question: what is the percentage of the usa actors that showed up in the credit list of movie 'mrs. doubtfire'? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, R...
what is the percentage of the usa actors that showed up in the credit list of movie 'mrs. doubtfire'?
movie
select cast(sum(case when t3.`date of birth` > '1970-01-01' then 1 else 0 end) as real) * 100 / count(t3.`date of birth`) from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t1.title = 'dawn of the planet of the apes'
Question: what is the percentage of the actors that showed up in the credit list of movie 'dawn of the planet of the apes' that were born after '1970/1/1'? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA R...
what is the percentage of the actors that showed up in the credit list of movie 'dawn of the planet of the apes' that were born after '1970/1/1'?
movie
select movieid from movie where rating between 7 and 8 and budget = 15000000
Question: list down the movie id of movie with a budget of 15000000 and a rating between 7 to 8. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating,...
list down the movie id of movie with a budget of 15000000 and a rating between 7 to 8.
movie
select count(*) from movie where `mpaa rating` = 'pg' and `release date` like '1990-06%'
Question: in rated pg movies, how many of them released in june 1990? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summary. cha...
in rated pg movies, how many of them released in june 1990?
movie
select name from actor where actorid = 439 and gender = 'male' and ethnicity = 'white'
Question: what is the name of male and white actor with actor id 439? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summary. cha...
what is the name of male and white actor with actor id 439?
movie
select t1.genre from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t3.`birth city` = 'new york city' and t1.rating > 5
Question: among the actors born in new york city, list the genre of their movie with a rating greater than 5. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Run...
among the actors born in new york city, list the genre of their movie with a rating greater than 5.
movie
select count(*) from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t1.genre = 'romance' and t3.name = 'john travolta'
Question: in romantic movies, how many of them starred by john travolta? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summary. ...
in romantic movies, how many of them starred by john travolta?
movie
select t3.`height (inches)`, t3.networth from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t1.title = 'three men and a little lady'
Question: list the height and net worth of actors starred in three men and a little lady. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating...
list the height and net worth of actors starred in three men and a little lady.
movie
select t1.genre from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t1.`mpaa rating` = 'pg' order by cast(replace(replace(t3.networth, ',', ''), '$', '') as real) desc limit 1
Question: what is the genre of pg rated movie starred by the actor with highest net worth? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Ratin...
what is the genre of pg rated movie starred by the actor with highest net worth?
movie
select t3.networth from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t1.title = 'misery' and t3.`height (inches)` between 60 and 70 and t3.gender = 'male'
Question: what is the net worth of the actor starred in misery who has a height ranging from 60 to 70 inches tall? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre...
what is the net worth of the actor starred in misery who has a height ranging from 60 to 70 inches tall?
movie
select count(*) from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t1.title = 'ghost' and t3.gender = 'male' and t3.`birth country` = 'usa'
Question: count the male actors born in usa that starred in ghost. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, Rating Count, Summary. charac...
count the male actors born in usa that starred in ghost.
movie
select t1.`mpaa rating`, t1.title from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t3.name = 'leonardo dicaprio' order by t1.budget desc limit 1
Question: what is the mpaa rating and title of the movie starred by leonardo dicaprio with highest budget? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtim...
what is the mpaa rating and title of the movie starred by leonardo dicaprio with highest budget?
movie
select t3.networth, t3.`date of birth` from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t1.title = 'die hard 2' and t3.`height (inches)` between 60 and 65
Question: among the actors starred in die hard 2, list their net worth and birth date of actors with a height between 60 to 65. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Releas...
among the actors starred in die hard 2, list their net worth and birth date of actors with a height between 60 to 65.
movie
select t1.runtime from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t3.ethnicity = 'african american' and t3.`date of birth` = '1954-12-28'
Question: list the runtime of movies starred by an african-american actor born on december 28, 1954. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rat...
list the runtime of movies starred by an african-american actor born on december 28, 1954.
movie
select t3.name from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t1.gross = 136766062 and t2.`character name` = 'don altobello' and t1.genre = 'drama'
Question: find the actor's name that played as don altobello in a drama movie that has a gross of 136766062. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runt...
find the actor's name that played as don altobello in a drama movie that has a gross of 136766062.
movie
select sum(t1.gross) from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where cast(replace(replace(t3.networth, ',', ''), '$', '') as real) > 375000000 and t1.rating < 7 and t1.genre = 'comedy'
Question: what is the gross of a comedy movie with a rating lower than 7 and starred by an actor with a net worth greater than $375,000,000.00? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budge...
what is the gross of a comedy movie with a rating lower than 7 and starred by an actor with a net worth greater than $375,000,000.00?
movie
select t1.runtime from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t3.name = 'jackie chan' and t1.rating > 7
Question: what is the runtime of the movie starred by jackie chan with a rating greater than 7? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release Date, Genre, Runtime, Rating, ...
what is the runtime of the movie starred by jackie chan with a rating greater than 7?
movie
select sum(case when cast(replace(replace(t3.networth, ',', ''), '$', '') as real) > 400000000 then 1 else 0 end) - sum(case when cast(replace(replace(t3.networth, ',', ''), '$', '') as real) < 400000000 then 1 else 0 end) from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on...
Question: among the movies with drama genre, what is the percentage of the actors with net worth greater than $400,000,000.00? | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie -> MovieID, Title, MPAA Rating, Budget, Gross, Release...
among the movies with drama genre, what is the percentage of the actors with net worth greater than $400,000,000.00?
movie
select t3.name from movie as t1 inner join characters as t2 on t1.movieid = t2.movieid inner join actor as t3 on t3.actorid = t2.actorid where t3.gender = 'female' and t1.title = 'godzilla' and t3.`birth city` = 'sherman oaks' and t3.`height (inches)` * 100 > ( select avg(`height (inches)`) from actor ) * 50
Question: list the character's name of actress born in sherman oaks and starred in the movie bruce almighty with height greater than the 50% of average height of all actors listed. | Tables: actor -> ActorID, Name, Date of Birth, Birth City, Birth Country, Height (Inches), Biography, Gender, Ethnicity, NetWorth. movie ...
list the character's name of actress born in sherman oaks and starred in the movie bruce almighty with height greater than the 50% of average height of all actors listed.
social_media
select count(tweetid) as tweet_number from twitter where lang = 'en'
Question: how many tweets are in english? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID, twitter.LocationID ...
how many tweets are in english?
social_media
select text from twitter where isreshare = 'true'
Question: please list the texts of all the tweets that are reshared. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user....
please list the texts of all the tweets that are reshared.
social_media
select count(tweetid) as tweet_number from twitter where reach > 1000
Question: how many tweets are seen by more than 1000 unique users? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.Us...
how many tweets are seen by more than 1000 unique users?
social_media
select count(tweetid) as tweet_number from twitter where sentiment > 0 and weekday = 'thursday'
Question: among all the tweets that have a positive sentiment, how many of them are posted on thursday? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, User...
among all the tweets that have a positive sentiment, how many of them are posted on thursday?
social_media
select text from twitter where likes = ( select max( likes) from twitter )
Question: what is the text of the tweet that got the most `likes`? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.Us...
what is the text of the tweet that got the most `likes`?
social_media
select city from location where city is not null and country = 'argentina'
Question: please list all the cities in argentina. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID, twitter.Lo...
please list all the cities in argentina.
social_media
select count(t1.tweetid) from twitter as t1 inner join location as t2 on t2.locationid = t1.locationid where t2.country = 'argentina' limit 1
Question: how many tweets in total were posted by a user in argentina? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = use...
how many tweets in total were posted by a user in argentina?
social_media
select t2.city from twitter as t1 inner join location as t2 on t2.locationid = t1.locationid where t2.country = 'argentina' group by t2.city order by count(t1.tweetid) desc limit 1
Question: users in which city of argentina post the most tweets? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.User...
users in which city of argentina post the most tweets?
social_media
select count(t1.tweetid) from twitter as t1 inner join location as t2 on t2.locationid = t1.locationid where t2.city = 'buenos aires' and t1.isreshare = 'true'
Question: among all the tweets that are reshared, how many of them are posted by a user in buenos aires? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, Use...
among all the tweets that are reshared, how many of them are posted by a user in buenos aires?
social_media
select t1.text from twitter as t1 inner join location as t2 on t2.locationid = t1.locationid where t1.sentiment > 0 and t2.city = 'buenos aires'
Question: please list the texts of all the tweets posted from buenos aires with a positive sentiment. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID...
please list the texts of all the tweets posted from buenos aires with a positive sentiment.
social_media
select t2.country from twitter as t1 inner join location as t2 on t2.locationid = t1.locationid order by t1.likes desc limit 1
Question: from which country is the tweet with the most likes posted? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user...
from which country is the tweet with the most likes posted?
social_media
select t2.country from twitter as t1 inner join location as t2 on t2.locationid = t1.locationid where t2.country in ('argentina', 'australia') and t1.sentiment > 0 group by t2.country order by count(t1.tweetid) desc limit 1
Question: users in which country has posted more numbers of positive tweets, argentina or australia? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID....
users in which country has posted more numbers of positive tweets, argentina or australia?
social_media
select count(t1.tweetid) from twitter as t1 inner join location as t2 on t2.locationid = t1.locationid where t2.city = 'buenos aires' and t1.weekday = 'thursday'
Question: among all the tweets posted from buenos aires, how many of them were posted on thursdays? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. ...
among all the tweets posted from buenos aires, how many of them were posted on thursdays?
social_media
select count(t1.tweetid) from twitter as t1 inner join user as t2 on t1.userid = t2.userid where t1.likes > 10 and t2.gender = 'male'
Question: among all the users that have posted a tweet with over 1000 likes, how many of them are male? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, User...
among all the users that have posted a tweet with over 1000 likes, how many of them are male?
social_media
select count(t1.tweetid) from twitter as t1 inner join user as t2 on t1.userid = t2.userid where t2.gender = 'male'
Question: how many tweets have the male users posted in total? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID...
how many tweets have the male users posted in total?
social_media
select t2.gender from twitter as t1 inner join user as t2 on t1.userid = t2.userid order by t1.reach desc limit 1
Question: what is the gender of the user who has posted the tweet that is seen by the most number of unique users? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, Locat...
what is the gender of the user who has posted the tweet that is seen by the most number of unique users?
social_media
select count(t1.tweetid) from twitter as t1 inner join location as t2 on t2.locationid = t1.locationid inner join user as t3 on t1.userid = t3.userid where t3.gender = 'male' and t2.country = 'argentina'
Question: how many tweets are posted by male users in argentina? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.User...
how many tweets are posted by male users in argentina?
social_media
select t1.text from twitter as t1 inner join location as t2 on t2.locationid = t1.locationid inner join user as t2 on t2.userid = t1.userid inner join user as t3 on t1.userid = t3.userid where t2.city = 'buenos aires' and t3.gender = 'male'
Question: please list the texts of all the tweets posted by male users from buenos aires. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: t...
please list the texts of all the tweets posted by male users from buenos aires.
social_media
select sum(case when t2.city = 'buenos aires' then 1.0 else 0 end) / count(t1.tweetid) as avg from twitter as t1 inner join location as t2 on t2.locationid = t1.locationid where t2.country = 'argentina'
Question: what is the average number of tweets posted by the users in a city in argentina? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: ...
what is the average number of tweets posted by the users in a city in argentina?
social_media
select sum(case when t2.gender = 'male' then 1.0 else 0 end) / count(t1.tweetid) as per from twitter as t1 inner join user as t2 on t1.userid = t2.userid where t1.sentiment > 0
Question: among all the tweets with a positive sentiment, what is the percentage of those posted by a male user? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, Locatio...
among all the tweets with a positive sentiment, what is the percentage of those posted by a male user?
social_media
select count(userid) as user_number from user where gender = 'unknown'
Question: give the number of users who do not show their genders. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.Use...
give the number of users who do not show their genders.
social_media
select count(state) as state_number from location where country = 'united kingdom'
Question: state the number of states in the united kingdom. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID, t...
state the number of states in the united kingdom.
social_media
select distinct statecode from location where state = 'gwynedd'
Question: what is the code of gwynedd state? | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID, twitter.Location...
what is the code of gwynedd state?
social_media
select distinct locationid from location where state = 'west sussex'
Question: give the location id of west sussex state. | Tables: location -> LocationID, Country, State, StateCode, City. user -> UserID, Gender. twitter -> TweetID, Weekday, Hour, Day, Lang, IsReshare, Reach, RetweetCount, Likes, Klout, Sentiment, text, LocationID, UserID. | Joins: twitter.UserID = user.UserID, twitter....
give the location id of west sussex state.