db_id
stringclasses
66 values
question
stringlengths
24
325
evidence
stringlengths
1
673
gold_query
stringlengths
23
804
db_schema
stringclasses
66 values
language_corpus
Which word has the time of occurrences as 340691?
occurrences of 340691 refers to occurrences = 340691
SELECT word FROM words WHERE occurrences = 340691
CREATE TABLE words ( occurrences INTEGER DEFAULT 0, -- word TEXT UNIQUE, -- wid INTEGER PRIMARY KEY AUTOINCREMENT, ); CREATE TABLE langs ( lid INTEGER PRIMARY KEY AUTOINCREMENT, pages INTEGER DEFAULT 0, -- Example Values: `1129144` | Value Statics: Total count 1 - Distinct count 1 - Null count 0 lang TEXT...
video_games
How many more games were sold on game platform ID 50 than on game platform ID 51 in region ID 1?
result = subtract(sum(num_sales where game_platform_id = 50), sum(num_sales where game_platform_id = 51))
SELECT (SUM(CASE WHEN T.game_platform_id = 50 THEN T.num_sales ELSE 0 END) - SUM(CASE WHEN T.game_platform_id = 51 THEN T.num_sales ELSE 0 END)) * 100000 AS nums FROM region_sales AS T WHERE T.region_id = 1
CREATE TABLE region_sales ( foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (region_id) references region(id), region_id INTEGER default NULL, -- Example Values: `1`, `...
movie_3
Among the movies, what percentage are horror?
horror is a name of film category; calculation = DIVIDE(COUNT('horror'), COUNT(category_id)) * 100
SELECT CAST(SUM(IIF(T2.name = 'horror', 1, 0)) AS REAL) * 100 / COUNT(T2.category_id) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
movie_3
How many customers rented for an above-average period?
rented period refers to SUBTRACT(return_date, rental_date); calculation = rented period > (AVG(rented period))
SELECT COUNT(customer_id) FROM rental WHERE return_date - rental_date > ( SELECT AVG(return_date - rental_date) FROM rental )
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
language_corpus
Which word has the most appearances in the Wikipedia page with the title of "Agricultura"? Give the word ID.
Agricultura refers to title = 'Agricultura'; the most appearances is MAX(pages_words_sampling.occurrences)
SELECT T2.wid FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.title = 'Agricultura' ORDER BY T2.occurrences DESC LIMIT 1
CREATE TABLE words ( occurrences INTEGER DEFAULT 0, -- word TEXT UNIQUE, -- wid INTEGER PRIMARY KEY AUTOINCREMENT, ); CREATE TABLE langs ( lid INTEGER PRIMARY KEY AUTOINCREMENT, pages INTEGER DEFAULT 0, -- Example Values: `1129144` | Value Statics: Total count 1 - Distinct count 1 - Null count 0 lang TEXT...
movie_3
Calculate the average rent amount paid by the customer with customer id 15.
average rent amount refers to AVG(amount)
SELECT AVG(amount) FROM payment WHERE customer_id = 15
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
language_corpus
Which word has the most appearances in the Wikipedia page revision ID No. 28278070? Give the word ID.
the most appearances refers to MAX(occurrences); revision ID No. 28278070 refers to revision = 28278070; word ID refers to wid
SELECT pid FROM pages_words WHERE pid = ( SELECT pid FROM pages WHERE revision = 28278070 ) ORDER BY occurrences DESC LIMIT 1
CREATE TABLE words ( occurrences INTEGER DEFAULT 0, -- word TEXT UNIQUE, -- wid INTEGER PRIMARY KEY AUTOINCREMENT, ); CREATE TABLE langs ( lid INTEGER PRIMARY KEY AUTOINCREMENT, pages INTEGER DEFAULT 0, -- Example Values: `1129144` | Value Statics: Total count 1 - Distinct count 1 - Null count 0 lang TEXT...
movie_3
Please list the top ten movies with the most price per day in descending order of price per day.
movies with the most price per day refers to MAX(rental_rate)
SELECT title FROM film ORDER BY rental_rate / rental_duration DESC LIMIT 10
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
language_corpus
How many times does the word "riu" appears in the biwords pair?
riu refers to word = 'riu'; SUM(w1st where wid is word = 'riu' AND w2nd where wid is word = 'riu')
SELECT COUNT(T1.wid) FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st INNER JOIN words AS T3 ON T3.wid = T2.w2nd WHERE T1.word = 'riu'
CREATE TABLE words ( occurrences INTEGER DEFAULT 0, -- word TEXT UNIQUE, -- wid INTEGER PRIMARY KEY AUTOINCREMENT, ); CREATE TABLE langs ( lid INTEGER PRIMARY KEY AUTOINCREMENT, pages INTEGER DEFAULT 0, -- Example Values: `1129144` | Value Statics: Total count 1 - Distinct count 1 - Null count 0 lang TEXT...
video_games
How many action games are there in total?
action game refers to genre_name = 'Action'
SELECT COUNT(T1.id) FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Action'
CREATE TABLE region_sales ( foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (region_id) references region(id), region_id INTEGER default NULL, -- Example Values: `1`, `...
movie_3
What percentage of the movies are PG-13?
PG-13 is a rating; calculation = DIVIDE(SUM(rating = PG-13), SUM(rating)) * 100
SELECT CAST(SUM(IIF(rating = 'PG-13', 1, 0)) AS REAL) * 100 / COUNT(film_id) FROM film
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
language_corpus
How many appearances does the word ID No. 2823 have in the Wikipedia page "Astre"?
Astre refers to title = 'Astre'; word ID No. 2823 refers to wid = 2823; appearances refers to pages_words_sampling.occurrences
SELECT SUM(T2.occurrences) FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.title = 'Astre' AND T2.wid = 2823
CREATE TABLE words ( occurrences INTEGER DEFAULT 0, -- word TEXT UNIQUE, -- wid INTEGER PRIMARY KEY AUTOINCREMENT, ); CREATE TABLE langs ( lid INTEGER PRIMARY KEY AUTOINCREMENT, pages INTEGER DEFAULT 0, -- Example Values: `1129144` | Value Statics: Total count 1 - Distinct count 1 - Null count 0 lang TEXT...
movie_3
Find the full name and email address of inactive customers whose record was created in 2006.
full name refers to first_name, last_name; record created in 2006 refers to create_date = 2006; inactive customers refers to active = 0
SELECT first_name, last_name, email FROM customer WHERE STRFTIME('%Y',create_date) = '2006' AND active = 0
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
language_corpus
How many biword pairs contain the word "base" as the second word?
base refers to word = 'base'; SUM(w2nd) where w2nd = wid for word = 'base'
SELECT COUNT(w1st) FROM biwords WHERE w2nd = ( SELECT wid FROM words WHERE word = 'base' )
CREATE TABLE words ( occurrences INTEGER DEFAULT 0, -- word TEXT UNIQUE, -- wid INTEGER PRIMARY KEY AUTOINCREMENT, ); CREATE TABLE langs ( lid INTEGER PRIMARY KEY AUTOINCREMENT, pages INTEGER DEFAULT 0, -- Example Values: `1129144` | Value Statics: Total count 1 - Distinct count 1 - Null count 0 lang TEXT...
video_games
Who is the publisher of 3D Lemmings?
publisher refers to publisher_name; 3D Lemmings refers to game_name = '3D Lemmings'
SELECT T3.publisher_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T1.game_name = '3D Lemmings'
CREATE TABLE region_sales ( foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (region_id) references region(id), region_id INTEGER default NULL, -- Example Values: `1`, `...
movie_3
List the address in Texas in the ascending order of city id.
'Texas' is a district
SELECT address FROM address WHERE district = 'Texas' AND city_id = ( SELECT MIN(city_id) FROM address WHERE district = 'Texas' )
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
video_games
Please list all the games that have the same game genre as 3D Lemmings.
game refers to game_name; 3D Lemmings refers to game_name = '3D Lemmings'
SELECT T1.game_name FROM game AS T1 WHERE T1.genre_id = ( SELECT T.genre_id FROM game AS T WHERE T.game_name = '3D Lemmings' )
CREATE TABLE region_sales ( foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (region_id) references region(id), region_id INTEGER default NULL, -- Example Values: `1`, `...
movie_3
Among the films starred by Nick Wahlberg, what is the percentage of the films with G rating?
'Nick Wahlberg' is a full name of an actor; full name refers to first_name, last_name; G rating refers to rating = 'G'; calculation = DIVIDE(SUM(rating = 'G'), SUM(rating)) * 100
SELECT CAST(SUM(IIF(T3.rating = 'G', 1, 0)) AS REAL) / COUNT(T3.film_id) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'Elvis' AND T1.last_name = 'Marx'
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
language_corpus
How many times does the word "heròdot" appear in the Wikipedia page?
heròdot refers to word = 'heròdot'; times appear refers to SUM(pid)
SELECT COUNT(T2.occurrences) FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T1.word = 'heròdot'
CREATE TABLE words ( occurrences INTEGER DEFAULT 0, -- word TEXT UNIQUE, -- wid INTEGER PRIMARY KEY AUTOINCREMENT, ); CREATE TABLE langs ( lid INTEGER PRIMARY KEY AUTOINCREMENT, pages INTEGER DEFAULT 0, -- Example Values: `1129144` | Value Statics: Total count 1 - Distinct count 1 - Null count 0 lang TEXT...
movie_3
List the store ID of the films with a rental rate greater than the 60% of average rental rate of all listed films.
average rental rate of all listed films refers to AVG(rental_rate); rental rate greater than the 60% of average rental rate refers to rental_rate > (AVG(rental_rate)) MULTIPLY 0.6
SELECT T2.store_id FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T1.rental_rate > ( SELECT AVG(T1.rental_rate) * 0.6 FROM film AS T1 )
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
video_games
What is the genre of 3D Lemmings?
genre refers to genre_name; 3D Lemmings refers to game_name = '3D Lemmings'
SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = '3D Lemmings'
CREATE TABLE region_sales ( foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (region_id) references region(id), region_id INTEGER default NULL, -- Example Values: `1`, `...
movie_3
In films with rental rate of 4.99, list down the inventory ID of the films starred by Lucille Dee.
'Lucille Dee' is a full name of an actor; full name refers to first_name, last_name
SELECT T4.inventory_id FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id INNER JOIN inventory AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'Lucille' AND T1.last_name = 'Dee' AND T3.rental_rate = 4.99
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
video_games
Among the games published by 10TACLE Studios, how many of them are puzzles?
published by 10TACLE Studios refers to publisher_name = '10TACLE Studios'; puzzle refers to genre_name = 'Puzzle'
SELECT COUNT(T1.id) FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T4.genre_name = 'Puzzle' AND T3.publisher_name = '10TACLE Studios'
CREATE TABLE region_sales ( foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (region_id) references region(id), region_id INTEGER default NULL, -- Example Values: `1`, `...
movie_3
List the titles of the films starred by Elvis Marx.
'Elvis Marx' is a full name of a film; full name refers to first_name, last_name
SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.length BETWEEN 110 AND 150 AND T1.first_name = 'Russell' AND T1.last_name = 'Close'
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
language_corpus
How many times of repetition does the word "exemple" show in the Catalan language?
exemple refers to word = 'exemple'; repetition refers to langs_words.occurrences; lid = 1 menas it's Catalan language
SELECT T2.occurrences FROM words AS T1 INNER JOIN langs_words AS T2 ON T1.wid = T2.wid WHERE T1.word = 'exemple' AND T2.lid = 1
CREATE TABLE words ( occurrences INTEGER DEFAULT 0, -- word TEXT UNIQUE, -- wid INTEGER PRIMARY KEY AUTOINCREMENT, ); CREATE TABLE langs ( lid INTEGER PRIMARY KEY AUTOINCREMENT, pages INTEGER DEFAULT 0, -- Example Values: `1129144` | Value Statics: Total count 1 - Distinct count 1 - Null count 0 lang TEXT...
movie_3
What is the store and inventory ID of the film with the longest duration?
the longest duration refers to MAX(length)
SELECT T2.store_id, T2.inventory_id FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id ORDER BY T1.length DESC LIMIT 1
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
language_corpus
How many times does the biwords "que gregorio" appear in the language?
que gregorio refers to w1st = wid where word = 'que' AND w2nd = wid where word = 'gregorio'; appear refers to biwords.occurrences
SELECT occurrences FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'que' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'gregorio' )
CREATE TABLE words ( occurrences INTEGER DEFAULT 0, -- word TEXT UNIQUE, -- wid INTEGER PRIMARY KEY AUTOINCREMENT, ); CREATE TABLE langs ( lid INTEGER PRIMARY KEY AUTOINCREMENT, pages INTEGER DEFAULT 0, -- Example Values: `1129144` | Value Statics: Total count 1 - Distinct count 1 - Null count 0 lang TEXT...
video_games
Which publisher has published the most games?
publisher refers to publisher_name; the most games refers to max(count(game_id))
SELECT T.publisher_name FROM ( SELECT T2.publisher_name, COUNT(DISTINCT T2.id) FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id GROUP BY T1.publisher_id ORDER BY COUNT(T2.id) DESC LIMIT 1 ) t
CREATE TABLE region_sales ( foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (region_id) references region(id), region_id INTEGER default NULL, -- Example Values: `1`, `...
movie_3
What is the inventory ID of the films starred by Russell Close with a duration between 110 to 150 minutes?
'Russell Close' is a full name of an actor; full name refers to first_name, last_name; duration between 110 to 150 minutes refers to length BETWEEN 110 AND 150
SELECT T4.inventory_id FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id INNER JOIN inventory AS T4 ON T3.film_id = T4.film_id WHERE T3.length BETWEEN 110 AND 150 AND T1.first_name = 'Russell' AND T1.last_name = 'Close'
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
movie_3
Among films with a rental rate of 4.99, what is the total number of films starred by Bob Fawcett?
Bob Fawcett' is a full name of an actor; full name refers to first_name, last_name
SELECT COUNT(T1.actor_id) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.rental_rate = 4.99 AND T1.first_name = 'Bob' AND T1.last_name = 'Fawcett'
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
language_corpus
In which Wikipedia page does the word ID No. 174 have the most appearances? Give the title.
word ID No. 174 refers to wid = 174; appearances refers to pages_words_sampling.occurrences
SELECT title FROM pages WHERE pid = ( SELECT pid FROM pages_words WHERE wid = 174 ORDER BY occurrences DESC LIMIT 1 )
CREATE TABLE words ( occurrences INTEGER DEFAULT 0, -- word TEXT UNIQUE, -- wid INTEGER PRIMARY KEY AUTOINCREMENT, ); CREATE TABLE langs ( lid INTEGER PRIMARY KEY AUTOINCREMENT, pages INTEGER DEFAULT 0, -- Example Values: `1129144` | Value Statics: Total count 1 - Distinct count 1 - Null count 0 lang TEXT...
video_games
Please list the names of all the games published by 10TACLE Studios.
name refers to game_name; published by 10TACLE Studios refers to publisher_name = '10TACLE Studios'
SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T3.publisher_name = '10TACLE Studios'
CREATE TABLE region_sales ( foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (region_id) references region(id), region_id INTEGER default NULL, -- Example Values: `1`, `...
movie_3
In the film with an inventory ID between 20 to 60, how many of the films have a G rating?
G rating refers to rating = 'G'
SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T2.inventory_id BETWEEN 20 AND 60 AND T1.rating = 'G'
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
language_corpus
Which word that has 274499 repetitions in the Catalan language?
lid = 1 menas it's Catalan language; 274499 repetitions refers to occurrences = 274499
SELECT T1.word FROM words AS T1 INNER JOIN langs_words AS T2 ON T1.wid = T2.wid WHERE T2.occurrences = 274499 AND T2.lid = 1
CREATE TABLE words ( occurrences INTEGER DEFAULT 0, -- word TEXT UNIQUE, -- wid INTEGER PRIMARY KEY AUTOINCREMENT, ); CREATE TABLE langs ( lid INTEGER PRIMARY KEY AUTOINCREMENT, pages INTEGER DEFAULT 0, -- Example Values: `1129144` | Value Statics: Total count 1 - Distinct count 1 - Null count 0 lang TEXT...
video_games
Please list the names of all the games published by 10TACLE Studios and are puzzles.
name refers to game_name; published by 10TACLE Studios refers to publisher_name = '10TACLE Studios'; puzzle refers to genre_name = 'Puzzle'
SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T3.publisher_name = '10TACLE Studios' AND T4.genre_name = 'Puzzle'
CREATE TABLE region_sales ( foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (game_platform_id) references game_platform(id), foreign key (region_id) references region(id), region_id INTEGER default NULL, -- Example Values: `1`, `...
movie_3
What is the title of the animated films that have the shortest length?
animated film means animation; animation is a name of a category
SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id ORDER BY T1.length LIMIT 1
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
student_loan
List the names of the disabled students who were absent from school for more than 5 months.
absent for more than 5 months refers to month > 5;
SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name WHERE T1.month > 5
CREATE TABLE longest_absense_from_school ( "name" TEXT default '' not null primary key, foreign key ("name") references person ("name") on update cascade on delete cascade, "month" INTEGER default 0 null, -- Example Values: `0`, `1`, `2`, `3`, `4` | Value Statics: Total count 1000 - Distinct count 10 - Null count 0 ...
public_review_platform
How many users who have joined Yelp since "2005" but have no fans?
joined Yelp since 2005 refers to user_yelping_since_year = 2005; no fans refers to user_fans = 'None';
SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year = 2005 AND user_fans LIKE 'None'
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ...
european_football_1
What is the percentage whereby the away team scored 2 goals during the 2017 seasons?
scored 2 goals refers to FTAG = 2, which is short name for Final-time Away-team Goals; DIVIDE(COUNT(Div where season = 2017, FTAG = '2'), COUNT(Div where season = 2017)) as percentage;
SELECT CAST(SUM(CASE WHEN FTAG = 2 THEN 1 ELSE 0 END) / COUNT(FTAG) AS REAL) * 100 FROM matchs WHERE season = 2017
CREATE TABLE divisions ( division TEXT not null primary key, name TEXT, -- country TEXT, -- Example Values: `Belgium`, `Deutschland`, `England`, `France`, `Greece` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 ); CREATE TABLE matchs ( Date DATE, -- HomeTeam TEXT, -- season INTEGER, ...
movie
How tall is the actor who played "Lurch"?
tall refers to Height (Inches); "Lurch" refers to Character Name = 'Lurch'
SELECT T2.`Height (Inches)` FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID WHERE T1.`Character Name` = 'Lurch'
CREATE TABLE actor ( "Date of Birth" DATE, -- "Birth City" TEXT, -- Biography TEXT, -- Name TEXT, -- Gender TEXT, -- Example Values: `Male`, `Female` | Value Statics: Total count 1172 - Distinct count 2 - Null count 1541 ActorID INTEGER constraint actor_pk primary key, Ethnicity TEXT, -- Example Value...
movie_3
How many non-active clients have not returned the rented material?
non-active clients refers to active = 0; not returning a rented material refers to rental_date is null
SELECT COUNT(T2.customer_id) FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.active = 0
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
student_loan
How many disabled students have zero absences?
zero absences refers to month = 0;
SELECT COUNT(T1.name) FROM disabled AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.name = T2.name WHERE T2.month = 0
CREATE TABLE longest_absense_from_school ( "name" TEXT default '' not null primary key, foreign key ("name") references person ("name") on update cascade on delete cascade, "month" INTEGER default 0 null, -- Example Values: `0`, `1`, `2`, `3`, `4` | Value Statics: Total count 1000 - Distinct count 10 - Null count 0 ...
european_football_1
What is the name of all the teams that played in the EFL League One division?
all the teams include both HomeTeam and AwayTeam; name = 'EFL League One'; DIV = 'E2';
SELECT T1.HomeTeam,T1.AwayTeam FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div=T2.division WHERE T2.name = 'EFL League One' and T1.Div = 'E2'
CREATE TABLE divisions ( division TEXT not null primary key, name TEXT, -- country TEXT, -- Example Values: `Belgium`, `Deutschland`, `England`, `France`, `Greece` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 ); CREATE TABLE matchs ( Date DATE, -- HomeTeam TEXT, -- season INTEGER, ...
trains
Which direction do the majority of the trains are running?
majority of train refers to MAX(count(id))
SELECT direction FROM trains GROUP BY direction ORDER BY COUNT(id) DESC
CREATE TABLE cars ( `id` INTEGER NOT NULL, -- `load_shape` TEXT DEFAULT NULL, -- Example Values: `circle`, `hexagon`, `triangle`, `rectangle`, `diamond` | Value Statics: Total count 63 - Distinct count 5 - Null count 0 `train_id` INTEGER DEFAULT NULL, -- `load_num` INTEGER DEFAULT NULL, -- Example Values: `1...
movie_3
How many customers live in the city of Miyakonojo?
null
SELECT COUNT(T3.customer_id) FROM city AS T1 INNER JOIN address AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T2.address_id = T3.address_id WHERE T1.city = 'Miyakonojo'
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
student_loan
How many of the unemployed students are disabled?
null
SELECT COUNT(T1.name) FROM unemployed AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name
CREATE TABLE longest_absense_from_school ( "name" TEXT default '' not null primary key, foreign key ("name") references person ("name") on update cascade on delete cascade, "month" INTEGER default 0 null, -- Example Values: `0`, `1`, `2`, `3`, `4` | Value Statics: Total count 1000 - Distinct count 10 - Null count 0 ...
public_review_platform
What percentage more for the "Women's Clothing" Yelp businesses to "Men's Clothing"?
Women's clothing refers to category_name = 'Women''s Clothing'; Men's clothing refers to category_name = 'Men''s Clothing'; percentage more = MULTIPLY(DIVIDE(SUBTRACT(SUM(category_name = 'Women''s Clothing'), SUM(category_name = 'Men''s Clothing')), COUNT(business_id)), 1.0);
SELECT CAST(SUM(CASE WHEN T2.category_name LIKE 'Women''s Clothing' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.business_id) - CAST(SUM(CASE WHEN T2.category_name LIKE 'Men''s Clothing' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.business_id) AS "more percentage" FROM Business_Categories AS T1 INNER JOIN Categories A...
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ...
movie
Who played the No.2 character in the credit list of the movie "American Hustle"?
No.2 character refers to creditOrder = '2'; movie "American Hustle" refers to Title = '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'
CREATE TABLE actor ( "Date of Birth" DATE, -- "Birth City" TEXT, -- Biography TEXT, -- Name TEXT, -- Gender TEXT, -- Example Values: `Male`, `Female` | Value Statics: Total count 1172 - Distinct count 2 - Null count 1541 ActorID INTEGER constraint actor_pk primary key, Ethnicity TEXT, -- Example Value...
movie_3
What is the name of the client who has the largest quantity of rented material without returning it?
name refers to first_name, last_name; without returning a rented material refers to return_date is null
SELECT T.first_name FROM ( SELECT T2.first_name, COUNT(T1.rental_date) AS num FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.first_name ) AS T ORDER BY T.num DESC LIMIT 1
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
student_loan
Provide the name of disabled male students that are unemployed.
disabled male students that are unemployed refers to unemployed.name = male.name = disabled.name;
SELECT T2.NAME FROM unemployed AS T1 INNER JOIN male AS T2 ON T1.name = T2.name INNER JOIN disabled AS T3 ON T3.name = T2.name
CREATE TABLE longest_absense_from_school ( "name" TEXT default '' not null primary key, foreign key ("name") references person ("name") on update cascade on delete cascade, "month" INTEGER default 0 null, -- Example Values: `0`, `1`, `2`, `3`, `4` | Value Statics: Total count 1000 - Distinct count 10 - Null count 0 ...
european_football_1
What percentage of matches played on 2005/07/30 belong to the F1 division?
Division refers to Div; DIVIDE(COUNT(Div = 'F1', Date = '2005/07/30'), COUNT(Div, Date = '2005/07/30')) as percentage;
SELECT CAST(SUM(CASE WHEN Div = 'F1' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Div) FROM matchs WHERE Date = '2005-07-30'
CREATE TABLE divisions ( division TEXT not null primary key, name TEXT, -- country TEXT, -- Example Values: `Belgium`, `Deutschland`, `England`, `France`, `Greece` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 ); CREATE TABLE matchs ( Date DATE, -- HomeTeam TEXT, -- season INTEGER, ...
movie
Give the biography of the actor who played "Michael Moscovitz".
"Michael Moscovitz" refers to Character Name = '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'
CREATE TABLE actor ( "Date of Birth" DATE, -- "Birth City" TEXT, -- Biography TEXT, -- Name TEXT, -- Gender TEXT, -- Example Values: `Male`, `Female` | Value Statics: Total count 1172 - Distinct count 2 - Null count 1541 ActorID INTEGER constraint actor_pk primary key, Ethnicity TEXT, -- Example Value...
movie_3
Indicate the name of the actors of the films rated as 'Parents Strongly Precautioned' with the highest replacement cost.
name refers to first_name, last_name; Parents Strongly Precautioned' refers to rating = 'PG-13'; highest replacement cost refers to MAX(replacement_cost)
SELECT T1.first_name, T1.last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.rating = 'PG-13' ORDER BY T3.replacement_cost DESC LIMIT 1
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
public_review_platform
What is the number of reviews from user No. "21679"?
user No. refers to user_id;
SELECT COUNT(review_length) FROM Reviews WHERE user_id = 21679
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ...
european_football_1
What is the name of the home team in division P1 with the highest final time goal in all seasons?
the highest final time goal refers to MAX(FTHG); P1 = Div;
SELECT HomeTeam FROM matchs WHERE Div = 'P1' AND season = 2021 ORDER BY FTHG DESC LIMIT 1
CREATE TABLE divisions ( division TEXT not null primary key, name TEXT, -- country TEXT, -- Example Values: `Belgium`, `Deutschland`, `England`, `France`, `Greece` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 ); CREATE TABLE matchs ( Date DATE, -- HomeTeam TEXT, -- season INTEGER, ...
movie
What is the percentage of the USA actors that showed up in the credit list of movie "Mrs. Doubtfire"?
USA actors refers to Birth Country = 'USA'; movie "Mrs. Doubtfire" refers to Title = 'Mrs. Doubtfire'; percentage = divide(count(ActorID where Birth Country = 'USA'), count(ActorID)) * 100%
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'
CREATE TABLE actor ( "Date of Birth" DATE, -- "Birth City" TEXT, -- Biography TEXT, -- Name TEXT, -- Gender TEXT, -- Example Values: `Male`, `Female` | Value Statics: Total count 1172 - Distinct count 2 - Null count 1541 ActorID INTEGER constraint actor_pk primary key, Ethnicity TEXT, -- Example Value...
movie_3
How many customers did not rent material at Mike's store?
not at Mike's store refers to staff.first_name ! = 'Mike'
SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id INNER JOIN staff AS T3 ON T2.manager_staff_id = T3.staff_id WHERE T3.first_name != 'Mike'
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
student_loan
Among the students who filed for bankruptcy, how many students are disabled?
null
SELECT COUNT(T1.name) FROM disabled AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name
CREATE TABLE longest_absense_from_school ( "name" TEXT default '' not null primary key, foreign key ("name") references person ("name") on update cascade on delete cascade, "month" INTEGER default 0 null, -- Example Values: `0`, `1`, `2`, `3`, `4` | Value Statics: Total count 1000 - Distinct count 10 - Null count 0 ...
public_review_platform
Give the number of users who joined Yelp since "2004".
joined yelp since 2004 refers to user_yelping_since_year = 2004;
SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year = 2004
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ...
european_football_1
What is the highest final-time score across all divisions in the 2021 season? Which team was the team that made up that score?
MAX(SUM where FTHG, FTAG, season = 2021);
SELECT ( SELECT MAX(MAX(FTAG), MAX(FTHG)) FROM matchs WHERE season = 2021 ) AS T1, AwayTeam FROM matchs WHERE season = 2021 AND FTHG = T1 OR FTAG = T1
CREATE TABLE divisions ( division TEXT not null primary key, name TEXT, -- country TEXT, -- Example Values: `Belgium`, `Deutschland`, `England`, `France`, `Greece` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 ); CREATE TABLE matchs ( Date DATE, -- HomeTeam TEXT, -- season INTEGER, ...
movie
Show the No.3 character name in the credit list of the movie "G.I. Joe: The Rise of Cobra".
No.3 character refers to creditOrder = '3'; movie "G.I. Joe: The Rise of Cobra" refers to Title = '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'
CREATE TABLE actor ( "Date of Birth" DATE, -- "Birth City" TEXT, -- Biography TEXT, -- Name TEXT, -- Gender TEXT, -- Example Values: `Male`, `Female` | Value Statics: Total count 1172 - Distinct count 2 - Null count 1541 ActorID INTEGER constraint actor_pk primary key, Ethnicity TEXT, -- Example Value...
movie_3
What is the full name of the actor who has acted the most times in comedy films?
full name refers to first_name, last_name; 'comedy' is a name of a category;
SELECT T.first_name, T.last_name FROM ( SELECT T4.first_name, T4.last_name, COUNT(T2.actor_id) AS num FROM film_category AS T1 INNER JOIN film_actor AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T1.category_id = T3.category_id INNER JOIN actor AS T4 ON T2.actor_id = T4.actor_id WHERE T3.name = 'Comedy' ...
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
student_loan
How many students have absences of no more than 3 months?
absences of no more than 3 months refers to month < 3;
SELECT COUNT(name) FROM longest_absense_from_school WHERE month < 3
CREATE TABLE longest_absense_from_school ( "name" TEXT default '' not null primary key, foreign key ("name") references person ("name") on update cascade on delete cascade, "month" INTEGER default 0 null, -- Example Values: `0`, `1`, `2`, `3`, `4` | Value Statics: Total count 1000 - Distinct count 10 - Null count 0 ...
public_review_platform
State the number of actively running Yelp businesses in "Tolleson".
actively running refers to active = 'TRUE'; Tolleson refers to city = 'Tolleson';
SELECT COUNT(business_id) FROM Business WHERE city LIKE 'Tolleson' AND active LIKE 'TRUE'
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ...
movie
List down the movie ID of movie with a budget of 15000000 and a rating between 7 to 8.
a budget of 15000000 refers to Budget = 15000000; rating between 7 to 8 refers to Rating BETWEEN 7 and 8
SELECT MovieID FROM movie WHERE Rating BETWEEN 7 AND 8 AND Budget = 15000000
CREATE TABLE actor ( "Date of Birth" DATE, -- "Birth City" TEXT, -- Biography TEXT, -- Name TEXT, -- Gender TEXT, -- Example Values: `Male`, `Female` | Value Statics: Total count 1172 - Distinct count 2 - Null count 1541 ActorID INTEGER constraint actor_pk primary key, Ethnicity TEXT, -- Example Value...
movie_3
What is the title of the films in which Cuba Allen acted?
'Cuba Allen' is a full name of an actor; full name refers to first_name, last_name
SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'Cuba' AND T1.last_name = 'Allen'
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
european_football_1
Which division had the most draft matches in the 2008 season?
the most draft matches refer to MAX(COUNT(Div)) where FTR = 'D';
SELECT Div FROM matchs WHERE season = 2008 AND FTR = 'D' GROUP BY Div ORDER BY COUNT(FTR) DESC LIMIT 1
CREATE TABLE divisions ( division TEXT not null primary key, name TEXT, -- country TEXT, -- Example Values: `Belgium`, `Deutschland`, `England`, `France`, `Greece` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 ); CREATE TABLE matchs ( Date DATE, -- HomeTeam TEXT, -- season INTEGER, ...
movie
Who played the No.1 character in the credit list of the movie which was released on "2015/10/26"?
No.1 character refers to creditOrder = '1'; released on "2015/10/26" refers to Release Date = '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'
CREATE TABLE actor ( "Date of Birth" DATE, -- "Birth City" TEXT, -- Biography TEXT, -- Name TEXT, -- Gender TEXT, -- Example Values: `Male`, `Female` | Value Statics: Total count 1172 - Distinct count 2 - Null count 1541 ActorID INTEGER constraint actor_pk primary key, Ethnicity TEXT, -- Example Value...
movie_3
On what date was the rented material for the movie BLOOD ARGONAUTS returned?
'BLOOD ARGONAUTS' is a title of a film; date a movie was returned refers to return_date
SELECT T1.rental_date FROM rental AS T1 INNER JOIN inventory AS T2 ON T1.inventory_id = T2.inventory_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'BLOOD ARGONAUTS'
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
student_loan
Among the students who filed for bankruptcy with an absence in school of no more than 6 months, how many students enlisted for the fire department?
absence of no more than 6 months refers to month < 6; department refers to organ; organ = 'fire_department';
SELECT COUNT(T1.name) FROM longest_absense_from_school AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name INNER JOIN enlist AS T3 ON T3.name = T2.name WHERE T3.organ = 'fire_department'
CREATE TABLE longest_absense_from_school ( "name" TEXT default '' not null primary key, foreign key ("name") references person ("name") on update cascade on delete cascade, "month" INTEGER default 0 null, -- Example Values: `0`, `1`, `2`, `3`, `4` | Value Statics: Total count 1000 - Distinct count 10 - Null count 0 ...
public_review_platform
Which closed/not running Yelp business in "Sun City" has got the most reviews? Give the business id.
closed/not running refers to active = 'False'; most reviews refers to MAX(COUNT(user_id));
SELECT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Sun City' AND T1.active LIKE 'FALSE' GROUP BY T1.business_id ORDER BY COUNT(T2.review_length) DESC LIMIT 1
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ...
world_development_indicators
What is the name of the country with the highest percentage of rural population in the overall total population? Indicate the rural population percentage of total population.
the highest percentage of rural population in the overall total population refers to max(value where indicatorname = 'Rural population (% of total population)')
SELECT countryname, MAX(value) FROM indicators WHERE indicatorname = 'Rural population (% of total population)'
CREATE TABLE CountryNotes ( primary key (Countrycode, Seriescode), FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode), Seriescode TEXT NOT NULL, -- Countrycode TEXT NOT NULL, -- Description TEXT, -- FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode), ); CREATE TABLE Series ( BasePeriod TEXT, --...
movie
What is the name of male and white actor with actor ID 439?
male refers to Gender = 'Male'; white refers to Ethnicity = 'White'
SELECT Name FROM actor WHERE ActorID = 439 AND Gender = 'Male' AND Ethnicity = 'White'
CREATE TABLE actor ( "Date of Birth" DATE, -- "Birth City" TEXT, -- Biography TEXT, -- Name TEXT, -- Gender TEXT, -- Example Values: `Male`, `Female` | Value Statics: Total count 1172 - Distinct count 2 - Null count 1541 ActorID INTEGER constraint actor_pk primary key, Ethnicity TEXT, -- Example Value...
movie_3
What is the first name of the customers whose address is in the postal code that begins with 76?
postal code that begins with 76 refers to postal_code like '76%'
SELECT T1.first_name FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id WHERE SUBSTR(T2.postal_code, 1, 2) = '76'
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
student_loan
How many bankrupt students are there in the Marines?
Marines refers to organ = 'marines';
SELECT COUNT(T1.name) FROM filed_for_bankrupcy AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name WHERE T2.organ = 'marines'
CREATE TABLE longest_absense_from_school ( "name" TEXT default '' not null primary key, foreign key ("name") references person ("name") on update cascade on delete cascade, "month" INTEGER default 0 null, -- Example Values: `0`, `1`, `2`, `3`, `4` | Value Statics: Total count 1000 - Distinct count 10 - Null count 0 ...
public_review_platform
There was only one tip that user No. 69722 gave to the Yelp business, what was the ratings of that business?
short tip refers to tip_lenghth = 'short'; user No. refers to user_id; ratings refers to stars; stars = 5 means great experience; stars = 4 means good experience; stars = 3 means average experience; stars = 2 means bad experience; stars = 1 means terrible experience;
SELECT T2.stars FROM Tips AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.user_id = 69722
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ...
european_football_1
What percentage of all tied games did the Sassuolo team play in?
tied games refer FTR = 'D'; DIVIDE(COUNT(Div where FTR = 'D', HomeTeam = 'Sassuolo' or AwayTeam = 'Sassuolo'), COUNT(Div where HomeTeam = 'Sassuolo' or AwayTeam = 'Sassuolo')) as percentage;
SELECT CAST(SUM(CASE WHEN HomeTeam = 'Sassuolo' OR AwayTeam = 'Sassuolo' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(FTR) FROM matchs WHERE FTR = 'D'
CREATE TABLE divisions ( division TEXT not null primary key, name TEXT, -- country TEXT, -- Example Values: `Belgium`, `Deutschland`, `England`, `France`, `Greece` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 ); CREATE TABLE matchs ( Date DATE, -- HomeTeam TEXT, -- season INTEGER, ...
movie
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 "Dawn of the Planet of the Apes" refers to Title = 'Dawn of the Planet of the Apes'; born after "1970/1/1" refers to Date of Birth > '1970/1/1'; percentage = divide(count(ActorID where Date of Birth > '1970/1/1'), count(ActorID))*100%
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'
CREATE TABLE actor ( "Date of Birth" DATE, -- "Birth City" TEXT, -- Biography TEXT, -- Name TEXT, -- Gender TEXT, -- Example Values: `Male`, `Female` | Value Statics: Total count 1172 - Distinct count 2 - Null count 1541 ActorID INTEGER constraint actor_pk primary key, Ethnicity TEXT, -- Example Value...
movie_3
What is the total amount paid for rentals made on July 29, 2005?
July 29, 2005 refers to rental_date like '2005-07-29'
SELECT SUM(T2.amount) FROM rental AS T1 INNER JOIN payment AS T2 ON T1.rental_id = T2.rental_id WHERE date(T1.rental_date) = '2005-07-29%'
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
student_loan
Which organization has the highest number of male students? Calculate for the percentage of the male students in the said organization.
organization refers to organ; highest number of male students refers to MAX(COUNT(male.name)); percentage = DIVIDE(COUNT(male.name), COUNT(person.name)), 1.0;
SELECT T.organ, T.per FROM ( SELECT T1.organ, CAST(COUNT(T3.name) AS REAL) / COUNT(T2.name) AS per , COUNT(T3.name) AS num FROM enlist AS T1 INNER JOIN person AS T2 ON T1.name = T2.name LEFT JOIN male AS T3 ON T2.name = T3.name GROUP BY T1.organ ) T ORDER BY T.num DESC LIMIT 1
CREATE TABLE longest_absense_from_school ( "name" TEXT default '' not null primary key, foreign key ("name") references person ("name") on update cascade on delete cascade, "month" INTEGER default 0 null, -- Example Values: `0`, `1`, `2`, `3`, `4` | Value Statics: Total count 1000 - Distinct count 10 - Null count 0 ...
public_review_platform
Give the number of "dogs allowed" Yelp businesses.
number of Yelp businesses refers to business_id; dogs allowed refers to attribute_name = 'Dogs Allowed' AND attribute_value = 'true';
SELECT COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T1.attribute_name LIKE 'Dogs Allowed' AND T2.attribute_value LIKE 'TRUE'
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ...
european_football_1
What was the difference in home team and away team win percentages across all divisions in 2010?
2010 refers to season = 2010; SUBTRACT(DIVIDE(COUNT(Div where FTR = 'H', season = 2010), COUNT(Div where season = 2010)), COUNT(Div where FTR = 'A', season = 2010), COUNT(Div where season = 2010)) as percentage;
SELECT CAST(COUNT(CASE WHEN FTR = 'H' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(FTR) - CAST(COUNT(CASE WHEN FTR = 'A' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(FTR) DIFFERENCE FROM matchs WHERE season = 2010
CREATE TABLE divisions ( division TEXT not null primary key, name TEXT, -- country TEXT, -- Example Values: `Belgium`, `Deutschland`, `England`, `France`, `Greece` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 ); CREATE TABLE matchs ( Date DATE, -- HomeTeam TEXT, -- season INTEGER, ...
movie
In romantic movies, how many of them starred by John Travolta?
romantic movies refers to Genre = 'Romance'; starred by John Travolta refers to Name = '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'
CREATE TABLE actor ( "Date of Birth" DATE, -- "Birth City" TEXT, -- Biography TEXT, -- Name TEXT, -- Gender TEXT, -- Example Values: `Male`, `Female` | Value Statics: Total count 1172 - Distinct count 2 - Null count 1541 ActorID INTEGER constraint actor_pk primary key, Ethnicity TEXT, -- Example Value...
movie_3
How many different clients have rented materials from Jon Stephens?
'Jon Stephens' is a full name of a customer; full name refers to first_name, last_name;
SELECT COUNT(T1.customer_id) FROM rental AS T1 INNER JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Jon' AND T2.last_name = 'Stephens'
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
movie
In rated PG movies, how many of them released in June 1990?
rated PG refers to MPAA Rating = 'PG'; released in June 1990 refers to Release Date BETWEEN '1990-06-01' and '1990-06-30'
SELECT COUNT(*) FROM movie WHERE `MPAA Rating` = 'PG' AND `Release Date` LIKE '1990-06%'
CREATE TABLE actor ( "Date of Birth" DATE, -- "Birth City" TEXT, -- Biography TEXT, -- Name TEXT, -- Gender TEXT, -- Example Values: `Male`, `Female` | Value Statics: Total count 1172 - Distinct count 2 - Null count 1541 ActorID INTEGER constraint actor_pk primary key, Ethnicity TEXT, -- Example Value...
movie_3
How many rentals did Ella Oliver hire in June 2016?
'Ella Oliver' is a full name of a customer; full name refers to first_name, last_name; rental hired in June 2016 refers to rental_date BETWEEN '2005-06-01' AND '2005-06-30'
SELECT COUNT(T1.rental_id) FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'ELLA' AND T2.last_name = 'ELLA' AND date(T1.rental_date) BETWEEN '2005-06-01' AND '2005-06-30'
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
student_loan
How many months did a student in the Air Force miss school the most?
Air Force refers to organ = 'air_force'; number of months a student miss school the most refers to MAX(COUNT(month));
SELECT T1.month FROM longest_absense_from_school AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name ORDER BY T1.month DESC LIMIT 1
CREATE TABLE longest_absense_from_school ( "name" TEXT default '' not null primary key, foreign key ("name") references person ("name") on update cascade on delete cascade, "month" INTEGER default 0 null, -- Example Values: `0`, `1`, `2`, `3`, `4` | Value Statics: Total count 1000 - Distinct count 10 - Null count 0 ...
european_football_1
What is the name of the division in which Club Brugge and Genk competed on September 13, 2009?
September 13, 2009 refers to Date = '2009-09-13'; Club Brugge refers to HomeTeam; Genk refers to AwayTeam;
SELECT T2.name FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.Date = '2009-09-13' and T1.HomeTeam = 'Club Brugge' AND T1.AwayTeam = 'Genk'
CREATE TABLE divisions ( division TEXT not null primary key, name TEXT, -- country TEXT, -- Example Values: `Belgium`, `Deutschland`, `England`, `France`, `Greece` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 ); CREATE TABLE matchs ( Date DATE, -- HomeTeam TEXT, -- season INTEGER, ...
movie
What is the genre of PG rated movie starred by the actor with highest net worth?
PG rated refers to MPAA Rating = 'PG';  highest net worth refers to max(NetWorth)
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
CREATE TABLE actor ( "Date of Birth" DATE, -- "Birth City" TEXT, -- Biography TEXT, -- Name TEXT, -- Gender TEXT, -- Example Values: `Male`, `Female` | Value Statics: Total count 1172 - Distinct count 2 - Null count 1541 ActorID INTEGER constraint actor_pk primary key, Ethnicity TEXT, -- Example Value...
movie_3
Indicate the title of all the films that are in the Classics category.
'classics' is the name of category
SELECT T2.title FROM film_category AS T1 INNER JOIN film AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T1.category_id = T3.category_id WHERE T3.name = 'Classics'
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
mental_health_survey
How many users, between the age 27 to 35, were surveyed in 2018?
Age 27 to 35 refer to AnswerText 27 BETWEEN 35 where questionid = 1; 2018 refer to SurveyID
SELECT T1.UserID FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T1.SurveyID = 2018 AND T2.questionid = 1 AND T1.AnswerText BETWEEN '27' AND '35'
CREATE TABLE Answer ( SurveyID INTEGER constraint Answer_Survey_SurveyID_fk references Survey, -- Example Values: `2014`, `2016`, `2017`, `2018`, `2019` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 QuestionID INTEGER constraint Answer_Question_questionid_fk references Question, -- UserI...
public_review_platform
How many "5" star reviews does the Yelp business No. "10682" get?
5 star reviews refers to review_stars = 5; business No. refers to business_id;
SELECT COUNT(review_length) FROM Reviews WHERE business_id = 10682 AND review_stars = 5
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ...
european_football_1
How many teams playing in divisions in Greece have ever scored 4 or more goals?
teams include both HomeTeam and AwayTeam; country = 'Greece'; scored 4 or more goals refer to FTAG≥4, which is short name for Final-time Away-team Goals;
SELECT COUNT(DISTINCT CASE WHEN T1.FTHG >= 4 THEN HomeTeam ELSE NULL end) + COUNT(DISTINCT CASE WHEN T1.FTAG >= 4 THEN AwayTeam ELSE NULL end) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T2.country = 'Greece'
CREATE TABLE divisions ( division TEXT not null primary key, name TEXT, -- country TEXT, -- Example Values: `Belgium`, `Deutschland`, `England`, `France`, `Greece` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 ); CREATE TABLE matchs ( Date DATE, -- HomeTeam TEXT, -- season INTEGER, ...
movie
Among the actors born in New York City, list the genre of their movie with a rating greater than 5.
born in New York City refers to Birth City = 'New York City'; rating greater than 5 refers to Rating > 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
CREATE TABLE actor ( "Date of Birth" DATE, -- "Birth City" TEXT, -- Biography TEXT, -- Name TEXT, -- Gender TEXT, -- Example Values: `Male`, `Female` | Value Statics: Total count 1172 - Distinct count 2 - Null count 1541 ActorID INTEGER constraint actor_pk primary key, Ethnicity TEXT, -- Example Value...
movie_3
What language was the most used in movies released in 2006?
released in 2006 refers to release_year = 2006; the most used language refers to MAX(COUNT(language_id))
SELECT T.language_id FROM ( SELECT T1.language_id, COUNT(T1.language_id) AS num FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE STRFTIME('%Y',T1.release_year) = '2006' GROUP BY T1.language_id ) AS T ORDER BY T.num DESC LIMIT 1
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
public_review_platform
Does Yelp business No."4960" have TV?
business No. refers to business_id; have TV refers to attribute_name = 'Has TV';
SELECT DISTINCT CASE WHEN T1.attribute_name LIKE 'Has TV' THEN 'yes' ELSE 'no' END FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.business_id = 4960
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ...
european_football_1
In which division was the match between Hibernian, the away team, and Hearts, the home team, played? To which country does this division belong?
FALSE;
SELECT DISTINCT T2.division,T2.country FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.HomeTeam = 'Hearts' AND T1.AwayTeam = 'Hibernian'
CREATE TABLE divisions ( division TEXT not null primary key, name TEXT, -- country TEXT, -- Example Values: `Belgium`, `Deutschland`, `England`, `France`, `Greece` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 ); CREATE TABLE matchs ( Date DATE, -- HomeTeam TEXT, -- season INTEGER, ...
movie
List the height and net worth of actors starred in Three Men and a Little Lady.
Three Men and a Little Lady refers to Title = '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'
CREATE TABLE actor ( "Date of Birth" DATE, -- "Birth City" TEXT, -- Biography TEXT, -- Name TEXT, -- Gender TEXT, -- Example Values: `Male`, `Female` | Value Statics: Total count 1172 - Distinct count 2 - Null count 1541 ActorID INTEGER constraint actor_pk primary key, Ethnicity TEXT, -- Example Value...
movie_3
How many actors acted in movies in the Music category?
Music' is a name of a category
SELECT COUNT(T1.actor_id) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id INNER JOIN film_category AS T4 ON T3.film_id = T4.film_id INNER JOIN category AS T5 ON T4.category_id = T5.category_id WHERE T5.name = 'Music'
CREATE TABLE staff ( last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0 ...
student_loan
How many employed disabled students have zero absences?
employed students refers to disabled.name who are NOT in unemployed.name; zero absences refers to month = 0;
SELECT COUNT(T1.name) FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name INNER JOIN unemployed AS T3 ON T3.name = T2.name WHERE T1.month = 0
CREATE TABLE longest_absense_from_school ( "name" TEXT default '' not null primary key, foreign key ("name") references person ("name") on update cascade on delete cascade, "month" INTEGER default 0 null, -- Example Values: `0`, `1`, `2`, `3`, `4` | Value Statics: Total count 1000 - Distinct count 10 - Null count 0 ...