question_id
stringlengths
7
9
question
stringlengths
29
436
table
listlengths
1
4
sql_query
stringlengths
41
515
answer
listlengths
0
15.3k
is_nested
bool
2 classes
is_aggregated
bool
2 classes
height
int64
0
3
breadth
dict
max_breadth
int64
0
3
type
stringclasses
7 values
clause_usage
dict
aggregate_usage
dict
movie:200
How many people are taller than the tallest person known for the movie Free Fire?
[ "names" ]
SELECT COUNT(name_id) FROM names WHERE height > (SELECT MAX(height) FROM names WHERE NOT name_id IN (SELECT name_id FROM names WHERE height > (SELECT MAX(height) FROM names WHERE known_for_movie = 'Free Fire')))
[ "2" ]
true
true
3
{ "1": 1, "2": 1, "3": 1 }
1
nested (height=3, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:201
What is the average height of people who are born before 1970, are taller than 200 cm, and are taller than both the tallest person known for Free Fire and the tallest person known for Colossal who was born in 1970 or later?
[ "names" ]
SELECT AVG(height) FROM names WHERE EXISTS(SELECT 1 FROM names AS T2 WHERE T2.height > (SELECT MAX(height) FROM names WHERE known_for_movie = 'Free Fire') AND T2.height > (SELECT MAX(height) FROM names WHERE date_of_birth >= '1970-01-01' AND known_for_movie = 'Colossal') AND T2.date_of_birth < '1970-01-01' AND T2.heigh...
[ "201.0000000000000000" ]
true
true
2
{ "1": 1, "2": 2, "3": null }
2
nested (height=2, max_breadth=2)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": true, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:202
How many people born before January 1, 1970 are taller than the average height of people born after January 1, 1970?
[ "names" ]
SELECT COUNT(*) FROM names WHERE name_id IN ( SELECT name_id FROM names WHERE height > ( SELECT AVG(height) FROM names WHERE date_of_birth > '1970-01-01') AND date_of_birth < '1970-01-01')
[ "1993" ]
true
true
2
{ "1": 1, "2": 1, "3": null }
1
nested (height=2, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:203
What is the total number of thriller movies from the USA that are longer than 90 minutes?
[ "genre", "movie" ]
SELECT COUNT(title) AS total_movies FROM movie WHERE title IN (SELECT movie_title FROM genre WHERE genre = 'Thriller' AND movie_title = title) AND duration > 90 AND country = 'USA'
[ "252" ]
true
true
1
{ "1": 1, "2": null, "3": null }
1
nested (height=1, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:204
How many people who are 200 cm tall and were born on April 6, 1975 have a known-for movie listed?
[ "names" ]
SELECT COUNT(known_for_movie) FROM names WHERE height = 200 AND date_of_birth = '1975-04-06'
[ "1" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:205
What are the movie titles of the actors, excluding Vyto Ruginis?
[ "role_mapping" ]
SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name <> 'Vyto Ruginis'
[ "Rama Chakkani Seetha", "The House with a Clock in Its Walls", "Crown Heights", "Rabbit", "Loev", "Veeram", "Dora", "Radha", "Naa Panta Kano", "Zana", "In a Relationship", "Ninnu Kori", "Plonger", "Meesaya murukku", "Thamizh Padam 2", "Mehbooba", "Oru Nalla Naal Paarthu Soldren", "...
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:206
What are the titles of movies with a median rating of 9 and an average rating greater than 6.5?
[ "ratings" ]
SELECT movie_title FROM ratings WHERE median_rating = 9 AND avg_rating > 6.5
[ "Thithi", "Guru", "Vaikai is Amerikos viesbucio", "Emilio", "Lad: A Yorkshire Story", "Sanctuary", "Tu Hai Mera Sunday", "Joe Finds Grace", "The Bang Bang Brokers", "Dr. Jekyll and Mr. Hyde", "Mientras el Lobo No Está", "District C-11", "Viktorville", "Escape Artist", "Our Little Haven",...
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:207
How many movies produced by Campfire are among the top 5 USA-released films of 2017 by worldwide gross and have ratings with average rating greater than 6, median rating is 6, and more than 1,000 total votes?
[ "movie", "ratings" ]
SELECT COUNT(title) AS num_movies FROM movie WHERE title IN (SELECT title FROM movie WHERE year = 2017 AND country = 'USA' ORDER BY worlwide_gross_income DESC, title ASC LIMIT 5) AND title IN (SELECT movie_title FROM ratings WHERE avg_rating > 6 GROUP BY movie_title) AND title IN (SELECT movie_title FROM ratings WHERE ...
[ "1" ]
true
true
1
{ "1": 3, "2": null, "3": null }
3
nested (height=1, max_breadth=3)
{ "GROUP BY": true, "HAVING": false, "LIMIT": true, "ORDER BY": true, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:208
Find the names of people who are taller than the tallest person known for the movie Free Fire, and who have a height greater than 200.
[ "names" ]
SELECT name FROM names WHERE height > ( SELECT MAX(height) FROM names WHERE known_for_movie = 'Free Fire' ) AND height > 200
[ "Michael Ritchie", "Richard Ashton" ]
true
false
1
{ "1": 1, "2": null, "3": null }
1
nested (height=1, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:209
What are the titles of movies that are from India, have a duration of more than 150 minutes, and have an actor?
[ "movie", "role_mapping" ]
SELECT title FROM movie WHERE title IN (SELECT title FROM movie WHERE country = 'India' AND duration > 150 AND country = movie.country) AND title IN (SELECT movie_title FROM role_mapping WHERE movie_title = title AND category = 'actor')
[ "Julie 2", "Super Singh", "The Great Father", "Jomonte Suvisheshangal", "Munthirivallikal Thalirkkumbol", "Fukri", "Sakhavu", "Urvi", "Bogan", "Srinivasa Kalyana", "Mersal", "Lavakusha", "Spyder", "Rakshadhikari Baiju Oppu", "Sivalinga", "Oxygen", "Kaattu", "Masterpiece", "Mister...
true
false
1
{ "1": 2, "2": null, "3": null }
2
nested (height=1, max_breadth=2)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:210
How many movies from the USA have a worldwide gross income equal to the maximum worldwide gross income among movies whose duration is at least the maximum duration of movies with an average rating above 5.5, more than 1,000 total votes, and a median rating of 6?
[ "movie", "ratings" ]
SELECT COUNT(CASE WHEN country = 'USA' THEN title END) AS USA_Movies FROM movie WHERE worlwide_gross_income = ( SELECT MAX(worlwide_gross_income) FROM movie WHERE duration >= ( SELECT MAX(duration) FROM movie WHERE title IN ( SELECT movie_title FROM ratings WHERE avg_rating > 5.5 AND total_votes > 1000 AND median_ratin...
[ "0" ]
true
true
3
{ "1": 1, "2": 1, "3": 1 }
1
nested (height=3, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:211
Which actors who appeared in either The Great Buddha+ or Ray & Liz are taller than the tallest person known for the movie Dusty and Me?
[ "names", "role_mapping" ]
SELECT name FROM names WHERE height > (SELECT MAX(height) FROM names WHERE known_for_movie = 'Dusty and Me') AND name IN (SELECT name FROM role_mapping WHERE category = 'actor' AND (movie_title = 'The Great Buddha+' OR movie_title = 'Ray & Liz') GROUP BY name)
[ "Richard Ashton" ]
true
false
1
{ "1": 2, "2": null, "3": null }
2
nested (height=1, max_breadth=2)
{ "GROUP BY": true, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:212
How many movies have the same title as a movie released in 2019 in the USA?
[ "movie" ]
SELECT COUNT(title) FROM movie WHERE title IN (SELECT title FROM movie WHERE year = 2019 AND country = 'USA')
[ "576" ]
true
true
1
{ "1": 1, "2": null, "3": null }
1
nested (height=1, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:213
What are the titles of movies produced in Portugal that have a duration of more than 100 minutes?
[ "movie" ]
SELECT title FROM movie WHERE title IN (SELECT title FROM movie WHERE duration > 100 AND country = 'Portugal')
[ "A Fábrica de Nada", "Al Berto", "Verão Danado", "Peregrinação", "Leviano", "Bad Investigate", "Ruth", "Parque Mayer", "Carga", "Linhas de Sangue", "Uma Vida Sublime", "Variações", "Vitalina Varela" ]
true
false
1
{ "1": 1, "2": null, "3": null }
1
nested (height=1, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:214
What is the highest average rating of movies that have a median rating greater than 5, an average rating greater than 6, and are not titled 'Smallfoot'?
[ "ratings" ]
SELECT MAX(avg_rating) FROM ratings WHERE median_rating > 5 AND avg_rating > 6 AND movie_title <> 'Smallfoot'
[ "10.0" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": true, "MIN": false, "SUM": false }
movie:215
Which Telugu-language movies from India are longer than the average duration of comedies?
[ "genre", "movie" ]
SELECT title FROM movie WHERE title IN (SELECT title FROM movie WHERE duration > (SELECT AVG(duration) FROM movie WHERE title IN (SELECT movie_title FROM genre WHERE genre = 'Comedy')) AND country = 'India' AND languages = 'Telugu')
[ "Gautamiputra Satakarni", "Guru", "Dwaraka", "Khaidi No. 150", "Radha", "Om Namo Venkatesaya", "Rarandoi Veduka Chudham", "Luck Unnodu", "Raju Gari Gadhi 2", "Keshava", "Shatamanam Bhavati", "Nenu Local", "Winner", "Gunturodu", "PSV Garuda Vega", "Yuddham Sharanam", "Oxygen", "Kitt...
true
false
3
{ "1": 1, "2": 1, "3": 1 }
1
nested (height=3, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:216
What is the highest average rating of the movie 'Aashirwad' with a median rating higher than 6 and an average rating higher than 6?
[ "ratings" ]
SELECT MAX(avg_rating) FROM ratings WHERE median_rating > 6 AND avg_rating > 6 AND movie_title = 'Aashirwad'
[ "7.3" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": true, "MIN": false, "SUM": false }
movie:217
Which Spanish-language movies from Argentina have a duration at least as long as the longest movie other than Inhumane?
[ "director_mapping", "movie" ]
SELECT title FROM movie WHERE duration >= (SELECT MAX(duration) AS max_duration FROM movie WHERE duration >= (SELECT MAX(duration) AS max_duration FROM movie WHERE NOT title IN (SELECT movie_title FROM director_mapping WHERE movie_title = 'Inhumane'))) AND country = 'Argentina' AND languages LIKE '%Spanish%'
[ "La flor" ]
true
false
3
{ "1": 1, "2": 1, "3": 1 }
1
nested (height=3, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:218
What are the names of the people who are taller than the tallest person born after January 1, 1970, and also taller than the tallest person born on or after January 1, 1970 who is known for the movie Colossal?
[ "names" ]
SELECT name FROM names WHERE height > (SELECT MAX(height) AS max_height FROM names WHERE date_of_birth > '1970-01-01') AND height > (SELECT MAX(height) FROM names WHERE date_of_birth >= '1970-01-01' AND known_for_movie = 'Colossal')
[ "Michael Ritchie", "Richard Ashton" ]
true
false
1
{ "1": 2, "2": null, "3": null }
2
nested (height=1, max_breadth=2)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:219
How many action movies are there with the title 'Ghost in the Shell'?
[ "genre" ]
SELECT COUNT(genre) FROM genre WHERE genre = 'Action' AND movie_title = 'Ghost in the Shell'
[ "1" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:220
How many directors worked on the movie La musica del silenzio?
[ "director_mapping" ]
SELECT COUNT(name) FROM director_mapping WHERE movie_title = 'La musica del silenzio'
[ "1" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:221
How many directors worked on the movie Scarecrows?
[ "director_mapping" ]
SELECT COUNT(DISTINCT name) FROM director_mapping WHERE movie_title = 'Scarecrows'
[ "1" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:222
What are the dates of birth of people born before 1970 who are taller than 200 and whose height is at least as tall as the tallest person with a height greater than 100?
[ "names" ]
SELECT date_of_birth FROM names WHERE name IN (SELECT name FROM names WHERE height >= (SELECT MAX(height) FROM names WHERE height > 100) AND height > 200 AND date_of_birth < '1970-01-01') AND height > 200 AND date_of_birth < '1970-01-01'
[ "1938-11-28 00:00:00", "1965-10-02 00:00:00" ]
true
false
2
{ "1": 1, "2": 1, "3": null }
1
nested (height=2, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:223
What are the number of movies produced in the USA in English after 2017?
[ "movie" ]
SELECT COUNT(title) FROM movie WHERE year > 2017 AND country = 'USA' AND languages = 'English'
[ "1186" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:224
How many people are taller than the average height of people in the movie Gangcheolbi?
[ "names" ]
SELECT COUNT(*) FROM names WHERE height > (SELECT AVG(height) FROM names WHERE known_for_movie = 'Gangcheolbi')
[ "5777" ]
true
true
1
{ "1": 1, "2": null, "3": null }
1
nested (height=1, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:225
What are the movie titles in English from USA where the actress category exists?
[ "movie", "role_mapping" ]
SELECT title FROM movie WHERE title IN (SELECT movie_title FROM role_mapping WHERE category = 'actress' ORDER BY movie_title ASC) AND country = 'USA' AND languages = 'English'
[ "Against All Hope", "Road to Hell", "Identical", "The Garlock Incident", "Found", "Muffin Top: A Love Story", "Warren", "Dig Two Graves", "Circus of the Dead", "Kelly & Cal", "Heidi", "The Hollow One", "The Dark Below", "Date of the Dead", "The Inherited", "I Am Michael", "Hank Boyd ...
true
false
1
{ "1": 1, "2": null, "3": null }
1
nested (height=1, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": true, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:226
What is the height of people born on October 2, 1965 whose name appears among the tallest people overall who were born from January 1, 1950 through December 31, 1980?
[ "names" ]
SELECT height FROM names WHERE name IN ( SELECT name FROM names WHERE height >= ( SELECT MAX(height) FROM names) AND date_of_birth BETWEEN '1950-01-01' AND '1980-12-31') AND date_of_birth = '1965-10-02' GROUP BY height
[ "201" ]
true
false
2
{ "1": 1, "2": 1, "3": null }
1
nested (height=2, max_breadth=1)
{ "GROUP BY": true, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:227
Which movies were directed by Giannis Papadakos?
[ "director_mapping" ]
SELECT movie_title FROM director_mapping WHERE name = 'Giannis Papadakos'
[ "The Bachelor 2" ]
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:228
How many people were born on dates that do not include anyone taller than the tallest person known for Peppermint born on June 22, 1975, and whose people born on that date have an average height above 180 cm?
[ "names" ]
SELECT COUNT(*) FROM names WHERE NOT date_of_birth IN (SELECT date_of_birth FROM names WHERE height > (SELECT MAX(height) FROM names WHERE known_for_movie = 'Peppermint' AND date_of_birth = '1975-06-22') GROUP BY date_of_birth HAVING AVG(height) > 180)
[ "11363" ]
true
true
2
{ "1": 1, "2": 1, "3": null }
1
nested (height=2, max_breadth=1)
{ "GROUP BY": true, "HAVING": true, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:229
How many different people taller than 170 cm are known for the movie Baahubali 2: The Conclusion?
[ "names" ]
SELECT COUNT(DISTINCT name) AS number_of_actors FROM names WHERE known_for_movie = 'Baahubali 2: The Conclusion' AND height > 170
[ "4" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:230
What is the average duration of English-language movies over 90 minutes that are the longest English version (among versions over 80 minutes) for their title, have at least one rating with a median rating of 6 and more than 200 total votes, and have no rating with a median rating of 5 and an average rating above 4?
[ "movie", "ratings" ]
SELECT AVG(duration) FROM movie WHERE movie.duration >= (SELECT MAX(T2.duration) FROM movie AS T2 WHERE T2.duration > 80 AND T2.languages = 'English' AND movie.title = T2.title) AND NOT movie.title IN (SELECT movie_title FROM ratings WHERE median_rating = 5 AND avg_rating > 4.0) AND movie.title IN (SELECT movie_title F...
[ "100.7355163727959698" ]
true
true
1
{ "1": 3, "2": null, "3": null }
3
nested (height=1, max_breadth=3)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": true, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:231
What are the names of the actors in the movie Shot?
[ "role_mapping" ]
SELECT name FROM role_mapping WHERE category = 'actor' AND movie_title = 'Shot'
[ "Noah Wyle", "Jorge Lendeborg Jr.", "Xander Berkeley" ]
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:232
What is the name of the director of the movie 'Ji wu'?
[ "director_mapping" ]
SELECT name FROM director_mapping WHERE movie_title = 'Ji wu' ORDER BY name
[ "Jeffrey Chiang" ]
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": true, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:233
Which movies include actors who appeared in Free Fire or Ray & Liz and are at least as tall as the tallest person known for Free Fire?
[ "names", "role_mapping" ]
SELECT movie_title FROM role_mapping WHERE movie_title IN (SELECT movie_title FROM names WHERE height >= (SELECT MAX(height) FROM names WHERE known_for_movie = 'Free Fire') AND name IN (SELECT name FROM role_mapping WHERE category = 'actor' AND (movie_title = 'Free Fire' OR movie_title = 'Ray & Liz')) GROUP BY name)
[ "Rama Chakkani Seetha", "Rama Chakkani Seetha", "Hacksaw Ridge", "The House with a Clock in Its Walls", "Crown Heights", "Rabbit", "Loev", "Veeram", "The 13th Friday", "Dora", "Radha", "Sekai wa kyô kara kimi no mono", "Naa Panta Kano", "Zana", "Zana", "Zana", "In a Relationship", ...
true
false
2
{ "1": 1, "2": 2, "3": null }
2
nested (height=2, max_breadth=2)
{ "GROUP BY": true, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:234
What is the maximum duration among Hindi-language movies from India whose average rating is above 5 (excluding Kirrak Party and Dead Sea) and whose median rating is above 4.5?
[ "movie", "ratings" ]
SELECT MAX(duration) FROM movie WHERE title IN (SELECT title FROM movie WHERE country = 'India' AND languages = 'Hindi') AND title IN (SELECT movie_title FROM ratings WHERE avg_rating > 5 AND NOT movie_title IN ('Kirrak Party', 'Dead Sea')) AND title IN (SELECT movie_title FROM ratings WHERE median_rating > 4.5)
[ "173" ]
true
true
1
{ "1": 3, "2": null, "3": null }
3
nested (height=1, max_breadth=3)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": true, "MIN": false, "SUM": false }
movie:235
What is the longest movie duration that is greater than the average duration of all the comedy movies?
[ "genre", "movie" ]
SELECT MAX(duration) FROM movie WHERE duration > ( SELECT AVG(duration) FROM movie WHERE title IN ( SELECT movie_title FROM genre WHERE genre = 'Comedy'))
[ "808" ]
true
true
2
{ "1": 1, "2": 1, "3": null }
1
nested (height=2, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": true, "MIN": false, "SUM": false }
movie:236
How many people are taller than (1) the tallest person born after January 1, 1970, (2) the tallest person known for Colossal who was born on or after January 1, 1970, and (3) the tallest person known for Love, Simon?
[ "names" ]
SELECT COUNT(name) FROM names WHERE height > (SELECT MAX(height) FROM names WHERE date_of_birth > '1970-01-01') AND height > (SELECT MAX(height) FROM names WHERE known_for_movie = 'Colossal' AND date_of_birth >= '1970-01-01') AND height > (SELECT MAX(height) AS max_height FROM names WHERE known_for_movie = 'Love, Simon...
[ "2" ]
true
true
1
{ "1": 3, "2": null, "3": null }
3
nested (height=1, max_breadth=3)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:237
What are the titles of the movies that have a median rating above 6, average rating above 5 and more than 1000 total votes?
[ "ratings" ]
SELECT movie_title FROM ratings WHERE median_rating > 6 AND avg_rating > 5 AND total_votes > 1000
[ "Der müde Tod", "A Matter of Life and Death", "Thithi", "Psiconautas, los niños olvidados", "Grave", "Umi yori mo mada fukaku", "Sabaibaru famirî", "Trapped", "Maragadha Naanayam", "The Last Note", "Lykke-Per", "Lust Stories", "Leila", "Polytechnique", "The Eagle Path", "Scenes from a ...
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:238
What are the production companies of English movies that are longer than 90 minutes?
[ "movie" ]
SELECT production_company FROM movie WHERE duration > 90 AND languages = 'English' GROUP BY production_company
[ "HBO Films", "Relativity Media", "Groundswell Productions", "Fiction Films", "Ambi Pictures", "Deja Vu (II)", "MPI Media Group", "Reelhouse Productions", "CreativeBionics", "Transfiguration Productions", "Fright Teck Pictures", "In Your Ear Productions", "Butler Pictures", "Vicarious Produ...
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": true, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:239
How many movie titles have an average rating and median rating greater than 6?
[ "ratings" ]
SELECT COUNT(movie_title) FROM ratings WHERE avg_rating > 6 AND median_rating > 6
[ "3421" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:240
Which UK movie produced by "National Theatre" has a worldwide gross income exactly equal to the maximum worldwide gross among all movies whose duration is at least the longest duration among films with avg rating > 5.5, median rating 6, and more than 1,000 votes?
[ "movie", "ratings" ]
SELECT title FROM movie WHERE worlwide_gross_income = ( SELECT MAX(worlwide_gross_income) FROM movie WHERE duration >= ( SELECT MAX(duration) FROM movie WHERE title IN ( SELECT movie_title FROM ratings WHERE avg_rating > 5.5 AND total_votes > 1000 AND median_rating = 6 AND movie_title = title)) AND country = country) A...
[ "Antony & Cleopatra" ]
true
false
3
{ "1": 1, "2": 1, "3": 1 }
1
nested (height=3, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:241
What is the production company of the 2018 movie 'Ruin Me'?
[ "movie" ]
SELECT production_company FROM movie WHERE title = 'Ruin Me' AND year = 2018
[ "Terror Weekend Productions" ]
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:242
What is the minimum height among people who are known for Free Fire and are taller than the overall average height?
[ "names" ]
SELECT MIN(height) FROM names WHERE name IN ( SELECT name FROM names WHERE height > ( SELECT AVG(height) FROM names) AND known_for_movie = 'Free Fire')
[ "200" ]
true
true
2
{ "1": 1, "2": 1, "3": null }
1
nested (height=2, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": true, "SUM": false }
movie:243
How many people are taller than the average height of people known for Gangcheolbi and have directed neither Unfriended: Dark Web nor 5th Passenger?
[ "director_mapping", "names" ]
SELECT COUNT(name) FROM names WHERE height > (SELECT AVG(height) FROM names WHERE known_for_movie = 'Gangcheolbi') AND NOT name IN (SELECT name FROM director_mapping WHERE movie_title = 'Unfriended: Dark Web') AND NOT name IN (SELECT name FROM director_mapping WHERE movie_title = '5th Passenger')
[ "5777" ]
true
true
1
{ "1": 3, "2": null, "3": null }
3
nested (height=1, max_breadth=3)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:244
How many directors are there for the movie 'The 60 Yard Line'?
[ "director_mapping" ]
SELECT COUNT(movie_title) FROM director_mapping WHERE movie_title = 'The 60 Yard Line'
[ "1" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:245
How many different movies did people who are known for The Escape of Prisoner 614 direct?
[ "director_mapping", "names" ]
SELECT COUNT(DISTINCT movie_title) FROM director_mapping WHERE name_id IN (SELECT name_id FROM names WHERE known_for_movie = 'The Escape of Prisoner 614' AND name_id = director_mapping.name_id)
[ "1" ]
true
true
1
{ "1": 1, "2": null, "3": null }
1
nested (height=1, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:246
Which actors are taller than the average height of people known for Gangcheolbi and also taller than the tallest person who has both a birth date and a known for movie listed?
[ "names", "role_mapping" ]
SELECT name FROM names WHERE height > (SELECT AVG(height) FROM names WHERE known_for_movie = 'Gangcheolbi') AND height > (SELECT MAX(height) FROM names WHERE NOT date_of_birth IS NULL AND NOT known_for_movie IS NULL) AND name IN (SELECT name FROM role_mapping WHERE category = 'actor')
[ "Richard Ashton" ]
true
false
1
{ "1": 3, "2": null, "3": null }
3
nested (height=1, max_breadth=3)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:247
Show the actors who are taller than the tallest person who has both a recorded date of birth and a listed "known for" movie, and also taller than the tallest person who has neither a recorded birth date nor a "known for" movie, sorted by birth date from newest to oldest.
[ "names", "role_mapping" ]
SELECT name FROM names WHERE height > (SELECT MAX(height) FROM names WHERE NOT date_of_birth IS NULL AND NOT known_for_movie IS NULL) AND name IN (SELECT name FROM role_mapping WHERE category = 'actor' AND name_id = names.name_id) AND height > (SELECT MAX(height) FROM names WHERE date_of_birth IS NULL AND known_for_mov...
[ "Richard Ashton" ]
true
false
1
{ "1": 3, "2": null, "3": null }
3
nested (height=1, max_breadth=3)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": true, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:248
Find the number of movies that are longer than the longest movie released after 2018 with a worldwide gross income of more than 5 million, and have an average rating of more than 6 and a median rating of 7.
[ "movie", "ratings" ]
SELECT COUNT(title) AS num_movies FROM movie WHERE duration > (SELECT MAX(duration) AS max_duration FROM movie WHERE year > 2018 AND worlwide_gross_income > 5000000) AND title IN (SELECT movie_title FROM ratings WHERE avg_rating > 6 AND median_rating = 7)
[ "2" ]
true
true
1
{ "1": 2, "2": null, "3": null }
2
nested (height=1, max_breadth=2)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:249
How many actors are there in the movie Better Than Love?
[ "role_mapping" ]
SELECT COUNT(name) FROM role_mapping WHERE category = 'actor' AND movie_title = 'Better Than Love'
[ "3" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:250
What are the movie titles that are classified as horror movies?
[ "genre" ]
SELECT movie_title FROM genre WHERE genre = 'Horror'
[ "Seventy-Nine", "Corbin Nash", "Six Hot Chicks in a Warehouse", "The Bye Bye Man", "Buckout Road", "Grave", "Psychopaths", "After the Lethargy", "Cherokee Creek", "Guai guai guai guaiwu!", "Sivalinga", "Playing with Dolls: Havoc", "Egzorcizam", "Aadamkhor", "Memento Mori", "Ji wu", "...
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:251
How many movies with the title Birthmarked are classified as comedy?
[ "genre" ]
SELECT COUNT(movie_title) FROM genre WHERE genre = 'Comedy' AND movie_title = 'Birthmarked'
[ "1" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:252
How many actors, who are taller than the tallest person born after 1970-01-01, and have not directed 'Beyond the Woods', are there?
[ "director_mapping", "names", "role_mapping" ]
SELECT COUNT(name) FROM names WHERE height > (SELECT MAX(height) AS max_height FROM names WHERE date_of_birth > '1970-01-01') AND NOT name IN (SELECT name FROM director_mapping WHERE movie_title = 'Beyond the Woods') AND name IN (SELECT name FROM role_mapping WHERE category = 'actor')
[ "1" ]
true
true
1
{ "1": 3, "2": null, "3": null }
3
nested (height=1, max_breadth=3)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:253
Who is the director of the movie 'Handia'?
[ "director_mapping" ]
SELECT name FROM director_mapping WHERE movie_title = 'Handia'
[ "Jon Garaño", "Aitor Arregi" ]
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:254
What movies did Ben Affleck act in?
[ "role_mapping" ]
SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name = 'Ben Affleck' GROUP BY movie_title
[ "Justice League", "Live by Night" ]
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": true, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:255
Which actors were in the movie A.M.I.?
[ "role_mapping" ]
SELECT name FROM role_mapping WHERE category = 'actor' AND movie_title = 'A.M.I.'
[ "Philip Granger", "Sam Robert Muik" ]
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:256
Which production companies are associated with movies that are longer than the longest movie released in 2017, are not among movies with a median rating of 6 and more than 200 total votes having an average rating above 5.5, and that also have a median rating greater than 5 while not being the movie Portal?
[ "movie", "ratings" ]
SELECT production_company FROM movie WHERE duration > (SELECT MAX(duration) AS max_duration FROM movie WHERE year = 2017) AND NOT title IN (SELECT movie_title FROM ratings WHERE median_rating = 6 AND total_votes > 200 GROUP BY movie_title HAVING AVG(avg_rating) > 5.5) AND title IN (SELECT movie_title FROM ratings WHERE...
[ "Epicmedia", "Dongchun Films", "El Pampero Cine", "National Theatre" ]
true
false
1
{ "1": 3, "2": null, "3": null }
3
nested (height=1, max_breadth=3)
{ "GROUP BY": true, "HAVING": true, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:257
List the titles of all movies whose title matches the title of at least one movie with a longer running time than the average running time of movies titled "Hacksaw Ridge" that have at least one credited role.
[ "movie", "role_mapping" ]
SELECT title FROM movie WHERE title IN ( SELECT title FROM movie WHERE duration > ( SELECT AVG(duration) FROM movie WHERE title IN ( SELECT movie_title FROM role_mapping WHERE movie_title = 'Hacksaw Ridge' AND movie_title = title GROUP BY movie_title, category)))
[ "Silence", "The Lost City of Z", "Brimstone", "Ah-ga-ssi", "Toni Erdmann", "A Cure for Wellness", "Bankoku naitsu", "Pi sheng shang de hun", "Bhouri", "Wonder Woman", "Golmaal Again", "Blade Runner 2049", "Star Wars: Episode VIII - The Last Jedi", "Transformers: The Last Knight", "Raees"...
true
false
3
{ "1": 1, "2": 1, "3": 1 }
1
nested (height=3, max_breadth=1)
{ "GROUP BY": true, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:258
How many people born after 1950 and taller than 200 cm are at least as tall as the tallest person born before 1980 whose height is greater than the tallest person known for Free Fire and also greater than the tallest person known for Dusty and Me?
[ "names" ]
SELECT COUNT(name) FROM names WHERE height >= (SELECT MAX(height) AS max_height FROM names WHERE height > (SELECT MAX(height) FROM names WHERE known_for_movie = 'Free Fire') AND height > (SELECT MAX(height) FROM names WHERE known_for_movie = 'Dusty and Me') AND date_of_birth < '1980-01-01') AND height > 200 AND date_of...
[ "1" ]
true
true
2
{ "1": 1, "2": 2, "3": null }
2
nested (height=2, max_breadth=2)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:259
How many people who directed the movie Laavaan Phere are taller than the average height of people known for the movie Gangcheolbi?
[ "director_mapping", "names" ]
SELECT COUNT(name) FROM names WHERE height > (SELECT AVG(height) FROM names WHERE known_for_movie = 'Gangcheolbi') AND name IN (SELECT name FROM director_mapping WHERE movie_title = 'Laavaan Phere' AND name_id = names.name_id)
[ "1" ]
true
true
1
{ "1": 2, "2": null, "3": null }
2
nested (height=1, max_breadth=2)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:260
How many movies have a median rating of 6 and an average rating above 5?
[ "ratings" ]
SELECT COUNT(movie_title) AS num_movies FROM ratings WHERE median_rating = 6 AND avg_rating > 5
[ "1798" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:261
How many movies have a duration longer than the longest movie released after 2018 with worldwide gross income over $5,000,000, and have a release year after 2017 and are not produced by National Theatre Live?
[ "movie" ]
SELECT COUNT(title) AS num_movies FROM movie WHERE duration > (SELECT MAX(duration) AS max_duration FROM movie WHERE year > 2018 AND worlwide_gross_income > 5000000) AND year > 2017 AND production_company <> 'National Theatre Live'
[ "8" ]
true
true
1
{ "1": 1, "2": null, "3": null }
1
nested (height=1, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:262
What are the top five movies, considering only entries where both the average rating and the median rating are greater than 5, ranked first by how many entries include a vote count for the movie and then by the highest average rating across those entries?
[ "ratings" ]
SELECT movie_title FROM ratings WHERE avg_rating > 5 AND median_rating > 5 GROUP BY movie_title ORDER BY COUNT(total_votes) DESC, AVG(avg_rating) DESC LIMIT 5
[ "Love in Kilnerry", "Kirket", "Gini Helida Kathe", "Runam", "Fan" ]
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": true, "HAVING": false, "LIMIT": true, "ORDER BY": true, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:263
What is the count of movies with average rating higher than the highest average rating of movies with a median rating greater than 6, total votes more than 100, and average rating less than 10?
[ "ratings" ]
SELECT COUNT(movie_title) FROM ratings WHERE avg_rating > (SELECT MAX(avg_rating) FROM ratings WHERE median_rating > 6 AND total_votes > 100 AND avg_rating < 10)
[ "2" ]
true
true
1
{ "1": 1, "2": null, "3": null }
1
nested (height=1, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:264
What is the lowest worldwide gross income of movies that are longer than or equal to the longest movies with an average rating greater than 5, a median rating greater than 5 and are not 'Kirrak Party' or 'Dead Sea'?
[ "movie", "ratings" ]
SELECT MIN(worlwide_gross_income) AS minimum_worldwide_gross_income FROM movie WHERE duration >= ( SELECT MAX(duration) AS max_duration FROM movie WHERE title IN ( SELECT movie_title FROM ratings WHERE avg_rating > 5 AND median_rating > 5 AND movie_title = title AND NOT movie_title IN ('Kirrak Party', 'Dead Sea')))
[ "4032" ]
true
true
2
{ "1": 1, "2": 1, "3": null }
1
nested (height=2, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": true, "SUM": false }
movie:265
What is the average height of people whose height is greater than (i) the tallest person known for Free Fire, (ii) the tallest person with a recorded date of birth and a known movie, and (iii) the tallest person born on or after 1970-01-01 who is known for Colossal?
[ "names" ]
SELECT AVG(height) FROM names WHERE height > (SELECT MAX(height) FROM names WHERE known_for_movie = 'Free Fire') AND height > (SELECT MAX(height) FROM names WHERE NOT date_of_birth IS NULL AND NOT known_for_movie IS NULL) AND height > (SELECT MAX(height) FROM names WHERE date_of_birth >= '1970-01-01' AND known_for_movi...
[ "201.0000000000000000" ]
true
true
1
{ "1": 3, "2": null, "3": null }
3
nested (height=1, max_breadth=3)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": true, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:266
What are the movie titles that actors have appeared in, ordered alphabetically by the actors' names?
[ "role_mapping" ]
SELECT movie_title FROM role_mapping WHERE category = 'actor' ORDER BY name ASC
[ "Escape Plan: The Extractors", "Maragadha Naanayam", "Neevevaro", "Ninnu Kori", "Gajinikanth", "Secret Superstar", "Project Ghazi", "Revelations", "Veeram", "Yeh Suhaagraat Impossible", "Qimen Dunjia", "Mario", "22 Chaser", "Blood, Sand and Gold", "Wunderland", "Beneath the Leaves", ...
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": true, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:267
What are the titles of the movies that Robert Rhine acted in?
[ "role_mapping" ]
SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name = 'Robert Rhine' GROUP BY movie_title
[ "Aliens vs. Titanic" ]
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": true, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:268
How many movies have a median rating greater than 7 and more than 1000 total votes?
[ "ratings" ]
SELECT COUNT(movie_title) AS num_highly_rated_movies FROM ratings WHERE median_rating > 7 AND total_votes > 1000
[ "664" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:269
What is the name of the person who is known for the movie 'Die Beautiful'?
[ "names" ]
SELECT name FROM names WHERE known_for_movie = 'Die Beautiful'
[ "Jun Lana" ]
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:270
Which movie has Roshan Mathew as an actor?
[ "role_mapping" ]
SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name = 'Roshan Mathew'
[ "Matchbox", "Orayiram Kinakkalal" ]
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:271
What is the average height of people who are taller than the tallest person in the movie Love, Simon?
[ "names" ]
SELECT AVG(height) FROM names WHERE name IN (SELECT T2.name FROM names AS T2 WHERE T2.name_id IN (SELECT T2.name_id FROM names AS T2 WHERE names.name_id = T2.name_id AND T2.height > (SELECT MAX(T3.height) FROM names AS T3 WHERE T3.known_for_movie = 'Love, Simon')))
[]
true
true
3
{ "1": 1, "2": 1, "3": 1 }
1
nested (height=3, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": true, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:272
What are the 10 most recent U.S. movies directed by Richard LeMay after 2015, with an average rating above 4 and a median rating above 3, ordered by year descending and duration ascending?
[ "director_mapping", "movie", "ratings" ]
SELECT title FROM movie WHERE title IN (SELECT title FROM movie WHERE title IN (SELECT movie_title FROM director_mapping WHERE name = 'Richard LeMay') AND title IN (SELECT movie_title FROM ratings WHERE avg_rating > 4 AND median_rating > 3) AND year > 2015 AND country = 'USA') ORDER BY year DESC, duration ASC LIMIT 10
[ "Blood Bound", "Dementia 13" ]
true
false
2
{ "1": 1, "2": 2, "3": null }
2
nested (height=2, max_breadth=2)
{ "GROUP BY": false, "HAVING": false, "LIMIT": true, "ORDER BY": true, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:273
What is the average duration of movies from the USA, in English, that are longer than the average duration of Drama movies whose titles include the word "Night"?
[ "genre", "movie" ]
SELECT AVG(duration) FROM movie WHERE title IN (SELECT title FROM movie WHERE duration > (SELECT AVG(duration) FROM movie WHERE title IN (SELECT movie_title FROM genre WHERE genre = 'Drama' AND movie_title LIKE '%Night%' GROUP BY movie_title))) AND country = 'USA' AND languages = 'English'
[ "109.5171102661596958" ]
true
true
3
{ "1": 1, "2": 1, "3": 1 }
1
nested (height=3, max_breadth=1)
{ "GROUP BY": true, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": true, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:274
What is the highest worldwide gross income among movies released in 2017 or later that are from Ireland and Belgium or from the USA, with an average rating above 6.5 and a median rating of 7, whose total votes equal the highest number of votes among all movies with an average rating above 6.5 and a median rating of 7?
[ "movie", "ratings" ]
SELECT MAX(worlwide_gross_income) FROM movie WHERE title IN (SELECT movie_title FROM ratings WHERE avg_rating > 6.5 AND median_rating = 7 AND total_votes = (SELECT MAX(total_votes) FROM ratings WHERE avg_rating > 6.5 AND median_rating = 7) AND movie_title IN (SELECT title FROM movie WHERE (country = 'Ireland, Belgium' ...
[ "1332539889" ]
true
true
2
{ "1": 1, "2": 2, "3": null }
2
nested (height=2, max_breadth=2)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": true, "MIN": false, "SUM": false }
movie:275
Who are the people born before 1980 whose height is at least as tall as the tallest individual (also born before 1980) who is taller than both the tallest person known for Free Fire and the tallest person known for Dusty and Me?
[ "names" ]
SELECT name FROM names WHERE height >= (SELECT MAX(height) FROM names WHERE height > (SELECT MAX(height) FROM names WHERE known_for_movie = 'Free Fire') AND height > (SELECT MAX(height) FROM names WHERE known_for_movie = 'Dusty and Me') AND date_of_birth < '1980-01-01') AND date_of_birth < '1980-01-01'
[ "Michael Ritchie", "Richard Ashton" ]
true
false
2
{ "1": 1, "2": 2, "3": null }
2
nested (height=2, max_breadth=2)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:276
What are the movie titles with an average rating above 6.5 and a median rating of 8?
[ "ratings" ]
SELECT movie_title FROM ratings WHERE avg_rating > 6.5 AND median_rating = 8
[ "Der müde Tod", "A Matter of Life and Death", "Soog", "Teenkahon", "For Here or to Go?", "Kang rinpoche", "Psiconautas, los niños olvidados", "Haus Ohne Dach", "7 Giorni", "Mawlana", "Die Beautiful", "Trapped", "Siew Lup", "Kurangu Bommai", "Last Night", "The Last Note", "Diamond Swo...
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:277
How many movies that Sergio Peris-Mencheta acted in were filmed in the USA?
[ "movie", "role_mapping" ]
SELECT COUNT(CASE WHEN country LIKE '%USA%' THEN 1 END) AS usa_movies FROM movie WHERE title IN (SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name = 'Sergio Peris-Mencheta')
[ "1" ]
true
true
1
{ "1": 1, "2": null, "3": null }
1
nested (height=1, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:278
Which of the directors Ali Abbasi and Giannis Papadakos is listed as being known for "Gräns" and has directed a movie titled either exactly "Gräns" or containing "Girls"?
[ "director_mapping", "names" ]
SELECT name FROM names WHERE name IN (SELECT T2.name FROM names AS T2 WHERE T2.known_for_movie = 'Gräns' AND T2.name_id = names.name_id) AND known_for_movie IN (SELECT movie_title FROM director_mapping WHERE movie_title LIKE '%Girls%' OR movie_title = 'Gräns') AND name IN (SELECT name FROM director_mapping WHERE name =...
[]
true
false
1
{ "1": 3, "2": null, "3": null }
3
nested (height=1, max_breadth=3)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:279
Which movie titles have a running time at least as long as the longest movie that has an actor credit (as recorded in the cast list where the category is actor and the credited movie title is not Galaxy of Horrors)?
[ "movie", "role_mapping" ]
SELECT title FROM movie WHERE duration >= (SELECT MAX(duration) FROM movie WHERE title IN (SELECT movie_title FROM role_mapping WHERE category = 'actor' AND movie_title <> 'Galaxy of Horrors'))
[ "Ang panahon ng halimaw", "La flor" ]
true
false
2
{ "1": 1, "2": 1, "3": null }
1
nested (height=2, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:280
How many distinct movies have been directed by directors who have also directed 'Colossal' and have at least one known movie?
[ "director_mapping", "names" ]
SELECT COUNT(DISTINCT movie_title) FROM director_mapping WHERE name IN (SELECT name FROM director_mapping WHERE movie_title = 'Colossal' ORDER BY movie_title ASC) AND name IN (SELECT name FROM names WHERE NOT known_for_movie IS NULL)
[ "1" ]
true
true
1
{ "1": 2, "2": null, "3": null }
2
nested (height=1, max_breadth=2)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": true, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:281
Among the five most recently born people whose height is greater than the average height of people known for Gangcheolbi who share the same date of birth, what is the maximum height?
[ "names" ]
SELECT MAX(height) FROM names WHERE name IN ( SELECT T2.name FROM names AS T2 WHERE height > ( SELECT AVG(n.height) FROM names as n WHERE n.known_for_movie = 'Gangcheolbi' AND n.date_of_birth = T2.date_of_birth) ORDER BY date_of_birth DESC LIMIT 5 )
[]
true
true
2
{ "1": 1, "2": 1, "3": null }
1
nested (height=2, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": true, "ORDER BY": true, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": true, "MIN": false, "SUM": false }
movie:282
How many people born before January 1, 1970, have a name that also belongs to someone taller than the average height of those known for the movie Gangcheolbi?
[ "names" ]
SELECT COUNT(name) AS count_of_actors FROM names WHERE name IN (SELECT name FROM names WHERE height > (SELECT AVG(height) FROM names WHERE known_for_movie = 'Gangcheolbi')) AND date_of_birth < '1970-01-01'
[ "1997" ]
true
true
2
{ "1": 1, "2": 1, "3": null }
1
nested (height=2, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:283
What are the genres of movies released in 2017 in France?
[ "genre", "movie" ]
SELECT genre FROM genre WHERE genre.movie_title IN (SELECT title FROM movie WHERE year = 2017 AND country = 'France')
[ "Drama", "Drama", "Drama", "Comedy", "Drama", "Horror", "Crime", "Drama", "Comedy", "Drama", "Drama", "Drama", "Drama", "Drama", "Comedy", "Drama", "Romance", "Drama", "Comedy", "Drama", "Drama", "Drama", "Drama", "Drama", "Comedy", "Drama", "Comedy", "Comedy", ...
true
false
1
{ "1": 1, "2": null, "3": null }
1
nested (height=1, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:284
Which people are known for the movie 'Recep Ivedik 5'?
[ "names" ]
SELECT name FROM names WHERE known_for_movie = 'Recep Ivedik 5'
[ "Sahan Gökbakar", "Doga Ebrisim", "Deniz Ceylan", "Orkan Varan", "Nurullah Celebi" ]
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:285
How many times does the movie 'When We First Met' appear in the Romance genre?
[ "genre" ]
SELECT COUNT(*) FROM genre WHERE genre = 'Romance' AND movie_title = 'When We First Met'
[ "1" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:286
What is the total number of movies that have a median rating of more than 6 and an average rating of less than 7.5?
[ "ratings" ]
SELECT COUNT(movie_title) AS Total_Movies FROM ratings WHERE median_rating > 6 AND avg_rating < 7.5
[ "3294" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:287
What are the movie titles of actresses?
[ "role_mapping" ]
SELECT movie_title FROM role_mapping WHERE category = 'actress'
[ "Rama Chakkani Seetha", "Hacksaw Ridge", "The 13th Friday", "Sekai wa kyô kara kimi no mono", "Zana", "Zana", "Trickster", "Trickster", "Trickster", "Susah Sinyal", "Bloodline", "Live", "Gekijouban danjon ni deai o motomeru no wa machigatteiru daro ka: Orion no ya", "Saheb", "A Matter of...
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:288
What is the name of the director of the movie Unsane?
[ "director_mapping" ]
SELECT director_mapping.name FROM director_mapping WHERE movie_title = 'Unsane'
[ "Steven Soderbergh" ]
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:289
Which movies were released in the UK in 2018?
[ "movie" ]
SELECT title FROM movie WHERE year = 2018 AND country = 'UK'
[ "The Honey Killer", "Hungerford", "Whispers", "Two Down", "Rise of the Footsoldier Part II", "Cruel Summer", "The Lighthouse", "Fox Trap", "Native", "Teen Star Academy", "House of Salem", "On Chesil Beach", "The Forgiven", "Modern Life Is Rubbish", "Damascus Cover", "Us and Them", "I...
false
false
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:290
How many movies have a median rating greater than 5 and more than 300 total votes?
[ "ratings" ]
SELECT COUNT(movie_title) FROM ratings WHERE median_rating > 5 AND total_votes > 300
[ "4049" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:291
Which movie titles from 'Ireland, Belgium' or the USA, released in 2017 or later, with an average rating above 6.5 and a median rating of 7, have the same number of votes as the highest-voted movie among all films with an average rating above 6.5 and a median rating of 7?
[ "movie", "ratings" ]
SELECT movie_title FROM ratings WHERE avg_rating > 6.5 AND median_rating = 7 AND total_votes = (SELECT MAX(total_votes) FROM ratings WHERE avg_rating > 6.5 AND median_rating = 7) AND movie_title IN (SELECT title FROM movie WHERE (country = 'Ireland, Belgium' OR country = 'USA') AND year >= 2017)
[ "Star Wars: Episode VIII - The Last Jedi" ]
true
false
1
{ "1": 2, "2": null, "3": null }
2
nested (height=1, max_breadth=2)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:292
How many movies has Lucas Hedges acted in?
[ "role_mapping" ]
SELECT COUNT(DISTINCT movie_title) FROM role_mapping WHERE category = 'actor' AND name = 'Lucas Hedges'
[ "2" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:293
What is the maximum duration of a movie produced by any production company that has made at least one movie with an actor other than Vyto Ruginis?
[ "movie", "role_mapping" ]
SELECT MAX(duration) FROM movie WHERE production_company IN (SELECT production_company FROM movie WHERE title IN (SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name <> 'Vyto Ruginis' AND movie_title = title))
[ "234" ]
true
true
2
{ "1": 1, "2": 1, "3": null }
1
nested (height=2, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": true, "MIN": false, "SUM": false }
movie:294
Which movies are people known for if they have at least one recorded height greater than 100
[ "names" ]
SELECT known_for_movie FROM names WHERE date_of_birth IN (SELECT T2.date_of_birth FROM names AS T2 WHERE names.name_id = T2.name_id AND T2.height >= (SELECT MAX(T3.height) FROM names AS T3 WHERE T3.height > 100 AND T3.name_id = T2.name_id) GROUP BY T2.date_of_birth)
[]
true
false
2
{ "1": 1, "2": 1, "3": null }
1
nested (height=2, max_breadth=1)
{ "GROUP BY": true, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:295
Which movies both feature Sergio Peris-Mencheta as an actor and have a median rating of 7 with an average rating above 6.5, and whose worldwide gross income is at least that movie's own worldwide gross income?
[ "movie", "ratings", "role_mapping" ]
SELECT title FROM movie WHERE worlwide_gross_income >= (SELECT MIN(T2.worlwide_gross_income) FROM movie AS T2 WHERE T2.title = movie.title AND T2.title IN (SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name = 'Sergio Peris-Mencheta') AND T2.title IN (SELECT movie_title FROM ratings WHERE median_rati...
[ "Rambo: Last Blood" ]
true
false
2
{ "1": 1, "2": 2, "3": null }
2
nested (height=2, max_breadth=2)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": false, "MIN": false, "SUM": false }
movie:296
How many of the people Sebastian Ljungblad, Joakim Sällquist, and Peter Grönlund were known for the movie Goliat?
[ "names" ]
SELECT COUNT(name) FROM names WHERE known_for_movie IN (SELECT known_for_movie FROM names WHERE known_for_movie = 'Goliat') AND name IN ('Sebastian Ljungblad', 'Joakim Sällquist', 'Peter Grönlund')
[ "3" ]
true
true
1
{ "1": 1, "2": null, "3": null }
1
nested (height=1, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:297
How many movies with the title 'Ray' are directed by 'Andrey Konchalovskiy'?
[ "director_mapping" ]
SELECT COUNT(movie_title) AS movie_count FROM director_mapping WHERE movie_title = 'Ray' AND name = 'Andrey Konchalovskiy'
[ "1" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": true, "MAX": false, "MIN": false, "SUM": false }
movie:298
What is the longest movie duration released in Japan and the USA in 2018?
[ "movie" ]
SELECT MAX(duration) FROM movie WHERE title IN (SELECT title FROM movie WHERE year = 2018) AND country = 'Japan, USA'
[ "105" ]
true
true
1
{ "1": 1, "2": null, "3": null }
1
nested (height=1, max_breadth=1)
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": true, "MIN": false, "SUM": false }
movie:299
What is the highest total votes for ratings with median and average ratings above 6?
[ "ratings" ]
SELECT MAX(total_votes) AS max_votes FROM ratings WHERE median_rating > 6 AND avg_rating > 6
[ "725138" ]
false
true
0
{ "1": null, "2": null, "3": null }
0
non-nested
{ "GROUP BY": false, "HAVING": false, "LIMIT": false, "ORDER BY": false, "WHERE": true }
{ "AVG": false, "COUNT": false, "MAX": true, "MIN": false, "SUM": false }