context
stringlengths 11
9.12k
| question
stringlengths 0
1.06k
| SQL
stringlengths 2
4.44k
| source
stringclasses 28
values |
---|---|---|---|
CREATE TABLE trains (id integer, train_id integer, position integer, shape text, len text, sides text, roof text, wheels integer, load_shape text, load_num integer, id integer, direction text) | Among the trains running west, how many trains have three-wheeled, jagged roof cars? | 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' | bird |
CREATE TABLE trains (id integer, train_id integer, position integer, shape text, len text, sides text, roof text, wheels integer, load_shape text, load_num integer, id integer, direction text) | Provide the directions for all the trains that have 2 or less cars. | 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 | bird |
CREATE TABLE trains (id integer, train_id integer, position integer, shape text, len text, sides text, roof text, wheels integer, load_shape text, load_num integer, id integer, direction text) | What is the percentage of all the trains with at least 4 cars? List the directions of the said 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(position) AS trailPosi FROM cars t GROUP BY train_id ) AS T2 ON T1.id = T2.train_id AND T2.trailPosi >= 4 | bird |
CREATE TABLE trains (id integer, train_id integer, position integer, shape text, len text, sides text, roof text, wheels integer, load_shape text, load_num integer, id integer, direction text) | 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 | 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 = 'east' THEN T2.id ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T2.id)) FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T1.position = 1 AND T1.load_shape = ( SELECT T4.load_shape FROM ( SELECT load_shape, train_id FROM cars AS T WHERE position = 1 ORDER BY train_id DESC LIMIT 1 ) AS T4 ) | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Please list the names of the characters in the movie Look Who's Talking. | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Which character has the longest screen time in the movie Batman? | 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 | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Which actor played the role of Joker in the movie Batman? | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Please list the names of the actors who played a role in the movie Batman. | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Which movie is the character Dr. Archibald 'Moonlight' Graham from? | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Please list the names of the movies starring Tom Cruise. | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | How many movies starring Morgan Freeman are suggested by parental guidance? | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Among the movies starring Tom Cruise, which one of them has the best quality? | 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 | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | What is the name of the character played by Tom Cruise in the movie Born on the Fourth of July? | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Please list the names of all the characters played by Tom Cruise. | SELECT T1.`Character Name` FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID WHERE T2.Name = 'Tom Cruise' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Among the actors who starred in the movie Batman, which one of them is the tallest? | 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 | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | How many movies star a male African American actor? | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | What is the average rating of all the movies starring Tom Cruise? | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | How much longer in percentage is the screen time of the most important character in Batman than the least important one? | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Which movie had the biggest budget? Give the name of the movie. | SELECT Title FROM movie ORDER BY Budget DESC LIMIT 1 | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | What is the MPAA rating for the movie with the character named "Peter Quill" in it? | SELECT T1.`MPAA Rating` FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID WHERE T2.`Character Name` = 'Peter Quill' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Give the name of the No.1 character in the credit list from the highest rating thriller 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 | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Who was the actor that played in the movie "Batman" with the longest screentime? | 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 | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | How many movies has the highest networth actor acted in? | 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) | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Who played the character named "Chanice Kobolowski"? | SELECT T2.Name FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID WHERE T1.`Character Name` = 'Chanice Kobolowski' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | When is the birthday of the actor who played "Sully"? | SELECT T2.`Date of Birth` FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID WHERE T1.`Character Name` = 'Sully' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Show the birth city of the actor who played "Gabriel Martin". | SELECT T2.`Birth City` FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID WHERE T1.`Character Name` = 'Gabriel Martin' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Give the biography of the actor who played "Michael Moscovitz". | SELECT T2.Biography FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID WHERE T1.`Character Name` = 'Michael Moscovitz' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | How tall is the actor who played "Lurch"? | SELECT T2.`Height (Inches)` FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID WHERE T1.`Character Name` = 'Lurch' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Show the No.3 character name in the credit list of the movie "G.I. Joe: The Rise of Cobra". | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Who played the No.2 character in the credit list of the movie "American Hustle"? | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Who played the No.1 character in the credit list of the movie which was released on "2015/10/26"? | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | What is the percentage of the USA actors that showed up in the credit list of movie "Mrs. Doubtfire"? | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | 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"? | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | List down the movie ID of movie with a budget of 15000000 and a rating between 7 to 8. | SELECT MovieID FROM movie WHERE Rating BETWEEN 7 AND 8 AND Budget = 15000000 | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | In rated PG movies, how many of them released in June 1990? | SELECT COUNT(*) FROM movie WHERE `MPAA Rating` = 'PG' AND `Release Date` LIKE '1990-06%' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | What is the name of male and white actor with actor ID 439? | SELECT Name FROM actor WHERE ActorID = 439 AND Gender = 'Male' AND Ethnicity = 'White' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Among the actors born in New York City, list the genre of their movie with a rating greater than 5. | 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 | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | In romantic movies, how many of them starred by John Travolta? | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | List the height and net worth of actors starred in Three Men and a Little Lady. | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | What is the genre of PG rated movie starred by the actor with highest net worth? | 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 | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | What is the net worth of the actor starred in Misery who has a height ranging from 60 to 70 inches tall? | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Count the male actors born in USA that starred in Ghost. | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | What is the MPAA rating and title of the movie starred by Leonardo DiCaprio with highest budget? | 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 | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Among the actors starred in Die Hard 2, list their net worth and birth date of actors with a height between 60 to 65. | 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 | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | List the runtime of movies starred by an African-American actor born on December 28, 1954. | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Find the actor's name that played as Don Altobello in a drama movie that has a gross of 136766062. | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | 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? | 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' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | What is the runtime of the movie starred by Jackie Chan with a rating greater than 7? | 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 | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | Among the movies with drama genre, what is the percentage of the actors with net worth greater than $400,000,000.00? | 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 T3.ActorID = T2.ActorID WHERE T1.Genre = 'Drama' | bird |
CREATE TABLE movie (ActorID integer, Name text, Date of Birth date, Birth City text, Birth Country text, Height (Inches) integer, Biography text, Gender text, Ethnicity text, NetWorth text, MovieID integer, Title text, MPAA Rating text, Budget integer, Gross integer, Release Date text, Genre text, Runtime integer, Rating real, Rating Count integer, Summary text, MovieID integer, ActorID integer, Character Name text, creditOrder integer, pay text, screentime text) | 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. | 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 | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | How many tweets are in English? | SELECT COUNT(TweetID) AS tweet_number FROM twitter WHERE Lang = 'en' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Please list the texts of all the tweets that are reshared. | SELECT text FROM twitter WHERE IsReshare = 'TRUE' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | How many tweets are seen by more than 1000 unique users? | SELECT COUNT(TweetID) AS tweet_number FROM twitter WHERE Reach > 1000 | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Among all the tweets that have a positive sentiment, how many of them are posted on Thursday? | SELECT COUNT(TweetID) AS tweet_number FROM twitter WHERE Sentiment > 0 AND Weekday = 'Thursday' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | What is the text of the tweet that got the most `likes`? | SELECT text FROM twitter WHERE Likes = ( SELECT MAX( Likes) FROM twitter ) | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Please list all the cities in Argentina. | SELECT City FROM location WHERE City IS NOT NULL AND Country = 'Argentina' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | How many tweets in total were posted by a user in Argentina? | SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.Country = 'Argentina' LIMIT 1 | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Users in which city of Argentina post the most tweets? | 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 | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Among all the tweets that are reshared, how many of them are posted by a user in Buenos Aires? | 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' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Please list the texts of all the tweets posted from Buenos Aires with a positive sentiment. | 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' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | From which country is the tweet with the most likes posted? | SELECT T2.Country FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID ORDER BY T1.Likes DESC LIMIT 1 | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Users in which country has posted more numbers of positive tweets, Argentina or Australia? | 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 | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Among all the tweets posted from Buenos Aires, how many of them were posted on Thursdays? | 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' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Among all the users that have posted a tweet with over 1000 likes, how many of them are male? | 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' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | How many tweets have the male users posted in total? | SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | What is the gender of the user who has posted the tweet that is seen by the most number of unique users? | SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID ORDER BY T1.Reach DESC LIMIT 1 | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | How many tweets are posted by male users in Argentina? | 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' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Please list the texts of all the tweets posted by male users from Buenos Aires. | 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' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | What is the average number of tweets posted by the users in a city in Argentina? | 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' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Among all the tweets with a positive sentiment, what is the percentage of those posted by a male user? | 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 | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Give the number of users who do not show their genders. | SELECT COUNT(UserID) AS user_number FROM user WHERE Gender = 'Unknown' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | State the number of states in the United Kingdom. | SELECT COUNT(State) AS State_number FROM location WHERE Country = 'United Kingdom' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | What is the code of Gwynedd State? | SELECT DISTINCT StateCode FROM location WHERE State = 'Gwynedd' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Give the location id of West Sussex State. | SELECT DISTINCT LocationID FROM location WHERE State = 'West Sussex' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | How many reshared tweets are there in Texas? | SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.State = 'Texas' AND T1.IsReshare = 'TRUE' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | For the tweet which got a reach number of 547851, which country did it come from? | SELECT T2.Country FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.Reach = 547851 | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | State the number of positive tweets from Ha Noi. | SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.Sentiment > 0 AND T2.State = 'Ha Noi' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Show the text of the tweet with the highest klout from Connecticut. | SELECT T1.text FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.State = 'Connecticut' ORDER BY T1.Klout DESC LIMIT 1 | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | How many female Twitter users are there from Wisconsin? | SELECT COUNT(T1.Likes) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID INNER JOIN user AS T3 ON T3.UserID = T1.UserID WHERE T2.State = 'Wisconsin' AND T3.Gender = 'Female' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | What is the gender of the user who tweeted `tw-715909161071091712`? | SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.TweetID = 'tw-715909161071091712' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Give the name of the city of the user who tweeted `One of our favorite stories is @FINRA_News's move to the cloud with AWS Enterprise Support! https://amp.twimg.com/v/991837f1-4815-4edc-a88f-e68ded09a02a`. | SELECT T2.City FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.text = 'One of our favorite stories is @FINRA_News''s move to the cloud with AWS Enterprise Support! https://amp.twimg.com/v/991837f1-4815-4edc-a88f-e68ded09a02a' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | What is the gender of the user whose tweet got 535 retweets? | SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.RetweetCount = 535 | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Give the gender of the user who made the highest klout tweet on Wednesdays. | SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.Weekday = 'Wednesday' ORDER BY T1.Klout DESC LIMIT 1 | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | For the tweet which got the most likes, state the gender of the user who tweeted it. | SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID ORDER BY T1.Likes DESC LIMIT 1 | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | State the number of tweets from Michigan on Thursdays. | SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.Weekday = 'Thursday' AND T2.State = 'Michigan' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Which state was the tweet `tw-685681052912873473` from? Give the state code. | SELECT T2.StateCode FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.TweetID = 'tw-685681052912873473' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | What is the percentage of male Twitter users from Florida? | SELECT SUM(CASE WHEN T3.Gender = 'Male' THEN 1.0 ELSE 0 END) / COUNT(T1.TweetID) AS percentage FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID INNER JOIN user AS T3 ON T3.UserID = T1.UserID WHERE T2.State = 'Florida' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | What is the percentage of the tweets from California are positive? | SELECT SUM(CASE WHEN T1.Sentiment > 0 THEN 1.0 ELSE 0 END) / COUNT(T1.TweetID) AS percentage FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE State = 'California' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | What is the day of the week that tweet with ID tw-682712873332805633 was posted? | SELECT Weekday FROM twitter WHERE TweetID = 'tw-682712873332805633' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | How many unique users have seen tweet with text `Happy New Year to all those AWS instances of ours!`? | SELECT Reach FROM twitter WHERE text = 'Happy New Year to all those AWS instances of ours!' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Count the total number of tweet IDs in `en`. | SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE Lang = 'en' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Is 3751 the location ID for tweet with ID tw-682714048199311366? | SELECT LocationID FROM twitter WHERE TweetID = 'tw-682714048199311366' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | How many tweets have been posted on Wednesday? | SELECT COUNT(TweetID) FROM twitter WHERE Weekday = 'Wednesday' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | List down all of the texts posted on Twitter on Thursday. | SELECT text FROM twitter WHERE Weekday = 'Thursday' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | What is the gender of the user who posted a tweet with ID tw-682714583044243456? | SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.TweetID = 'tw-682714583044243456' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | List down the text of tweets posted by unknown gender users. | SELECT T1.text FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Unknown' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | Calculate the total number of male tweet IDs. | SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male' | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | What gender of users posted the most tweets in `en`? | SELECT T.Gender FROM ( SELECT T2.Gender, COUNT( text) AS num FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.Lang = 'en' GROUP BY T2.Gender ) T ORDER BY T.num DESC LIMIT 1 | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | What gender of users retweet more than 30 times? | SELECT DISTINCT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.RetweetCount > 30 | bird |
CREATE TABLE social_media (LocationID integer, Country text, State text, StateCode text, City text, UserID text, Gender text, TweetID text, Weekday text, Hour integer, Day integer, Lang text, IsReshare text, Reach integer, RetweetCount integer, Likes integer, Klout integer, Sentiment real, text text, LocationID integer, UserID text) | How many female users reshared their tweets? | SELECT COUNT(T1.UserID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Female' AND T1.IsReshare = 'TRUE' | bird |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.