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:0 | How many movies starring John Abraham have a median rating above 5 and average rating above 4? | [
"movie",
"ratings",
"role_mapping"
] | SELECT COUNT(title) AS number_of_movies FROM movie WHERE title IN (SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name = 'John Abraham' GROUP BY movie_title) AND title IN (SELECT movie_title FROM ratings WHERE median_rating > 5 AND avg_rating > 4) | [
"1"
] | true | true | 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": true,
"MAX": false,
"MIN": false,
"SUM": false
} |
movie:1 | Which movies, starring Vincent D Onofrio as an actor, have an average rating greater than 5 and a median rating of 6, excluding 'Kolonya Cumhuriyeti'? | [
"movie",
"ratings",
"role_mapping"
] | SELECT title FROM movie WHERE title IN (SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name = 'Vincent D Onofrio' AND movie_title = title) AND title IN (SELECT movie_title FROM ratings WHERE avg_rating > 5 AND median_rating = 6 AND movie_title <> 'Kolonya Cumhuriyeti') | [
"In Dubious Battle",
"CHIPS"
] | 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:2 | Which movies directed by Vivek Athreya have a median rating greater than 5 with more than 100 total votes, and do not feature Matt Smith as an actor? | [
"director_mapping",
"movie",
"ratings",
"role_mapping"
] | SELECT title FROM movie WHERE title IN (SELECT T2.movie_title FROM director_mapping AS T2 WHERE T2.name = 'Vivek Athreya' AND movie.title = T2.movie_title) AND NOT title IN (SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name = 'Matt Smith') AND title IN (SELECT movie_title FROM ratings WHERE median_rating > 5 AND total_votes > 100 GROUP BY movie_title) | [
"Mental Madhilo",
"Brochevarevarura"
] | true | false | 1 | {
"1": 3,
"2": null,
"3": null
} | 3 | nested (height=1, max_breadth=3) | {
"GROUP BY": true,
"HAVING": false,
"LIMIT": false,
"ORDER BY": false,
"WHERE": true
} | {
"AVG": false,
"COUNT": false,
"MAX": false,
"MIN": false,
"SUM": false
} |
movie:3 | What is the total number of movies with a median rating greater than 5 and an average rating greater than 5.5? | [
"ratings"
] | SELECT COUNT(movie_title) AS total_movies FROM ratings WHERE median_rating > 5 AND avg_rating > 5.5 | [
"4877"
] | 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:4 | In which movies did Riteish Deshmukh act? | [
"role_mapping"
] | SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name = 'Riteish Deshmukh' | [
"Mauli",
"Marjaavaan"
] | 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:5 | How many movies have an average rating of 7 or lower and more than 500 total votes? | [
"ratings"
] | SELECT COUNT(movie_title) FROM ratings WHERE avg_rating <= 7 AND total_votes > 500 | [
"2956"
] | 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:6 | How many people have a height of 200 or less and were born before April 6, 1975? | [
"names"
] | SELECT COUNT(name) FROM names WHERE height <= 200 AND date_of_birth < '1975-04-06' | [
"3370"
] | 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:7 | How many distinct movies feature actors whose names contain “Vincent”, and whose movie produced in France and released in 2020 or earlier? | [
"movie",
"role_mapping"
] | SELECT COUNT(DISTINCT movie_title) AS num_movies FROM role_mapping WHERE movie_title IN (SELECT title FROM movie WHERE year <= 2020 AND country = 'France') AND category = 'actor' AND name LIKE '%Vincent%' | [
"10"
] | 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:8 | Which directors worked on movies which released in 2022 or earlier and produced in countries other than ‘Ireland, Belgium’? | [
"director_mapping",
"movie"
] | SELECT name FROM director_mapping WHERE movie_title IN (SELECT title FROM movie WHERE year <= 2022 AND country <> 'Ireland, Belgium'); | [
"Chris Eigeman",
"RZA",
"Eric Stoltz",
"Noah Baumbach",
"Steven Soderbergh",
"John Wynn",
"Paul Bushe",
"Orson Welles",
"Luc Besson",
"George Clooney",
"Spike Lee",
"Spike Lee",
"Sam Raimi",
"Mel Gibson",
"Ethan Hawke",
"Pedro Almodóvar",
"Vincent D Onofrio",
"Atom Egoyan",
"Terr... | 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:9 | How many people in the names table have a height that is less than or equal to the average height of people whose known_for_movie is 'Gangcheolbi', and who worked on movies with titles containing 'La' as a director? | [
"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 LIKE '%La%'); | [
"4"
] | 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:10 | How many people in the names table have a height that is less than or equal to the average height of people born on or before January 1, 1980, and who appear as an actor in movies whose titles do not contain the word 'Two'? | [
"names",
"role_mapping"
] | SELECT COUNT(name) FROM names WHERE height <= (SELECT AVG(height) FROM names WHERE date_of_birth <= '1980-01-01') AND name IN (SELECT name FROM role_mapping WHERE category = 'actor' AND movie_title NOT LIKE '%Two%') | [
"1019"
] | 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:11 | What is the average height of people in the names table whose height is greater than or equal to the average height of people whose known_for_movie is 'Gangcheolbi', less than or equal to the average height of people whose known_for_movie does not contain the substring 'all', and who appear as an actor in movies with title not equal to 'Rüzgar'? | [
"names",
"role_mapping"
] | SELECT avg(height) FROM names WHERE height >= (SELECT AVG(height) FROM names WHERE known_for_movie = 'Gangcheolbi') AND height <= (SELECT AVG(height) FROM names WHERE known_for_movie NOT LIKE '%all%') AND name IN (SELECT name FROM role_mapping WHERE category = 'actor' AND movie_title <> 'Rüzgar') | [
"162.5555555555555556"
] | 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:12 | What is the maximum duration of movies whose duration is less than or equal to the maximum duration of movies which feature people as a actor whose names contain the letter ‘H’? | [
"movie",
"role_mapping"
] | SELECT MAX(duration) FROM movie WHERE duration <= ( SELECT MAX(duration) FROM movie WHERE title IN ( SELECT movie_title FROM role_mapping WHERE name LIKE '%H%')) | [
"188"
] | 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:13 | What is the maximum duration of movies whose worldwide gross income is less than or equal to the minimum worldwide gross income among movies that
1) feature Sergio Peris-Mencheta as an actor, and
2) have a median rating less than or equal to 9 and an average rating greater than 6.5? | [
"movie",
"ratings",
"role_mapping"
] | SELECT MAX(duration) FROM movie WHERE worlwide_gross_income <= (SELECT MIN(worlwide_gross_income) FROM movie WHERE title IN (SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name = 'Sergio Peris-Mencheta') AND title IN (SELECT movie_title FROM ratings WHERE median_rating <= 9 AND avg_rating > 6.5)); | [
"808"
] | 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:14 | What is the average duration of movies that satisfy all of the following conditions?
1) The movie was produced in Argentina, and has a duration greater than or equal to the average duration of movies which was directed by people whose name does not contain the letter ‘a’.
2) The movie’s release year is after 2000, its listed languages include ‘English’, and its worldwide gross income is less than or equal to $5,000,000. | [
"director_mapping",
"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 director_mapping WHERE name NOT LIKE '%a%')) AND country = 'Argentina') AND year > 2000 AND languages LIKE '%English%' AND worlwide_gross_income <= '5000000'; | [
"808.0000000000000000"
] | 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:15 | How many movies classified under the genre ‘Thriller’ have titles that do not contain the word ‘kill’? | [
"genre"
] | SELECT COUNT(movie_title) FROM genre WHERE genre = 'Thriller' AND movie_title NOT LIKE '%kill%' | [
"1438"
] | 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:16 | How many distinct people act in movies whose titles do not end with the word ‘Love’? | [
"role_mapping"
] | SELECT COUNT(DISTINCT name) FROM role_mapping WHERE movie_title NOT LIKE '%Love'; | [
"12387"
] | 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:17 | How many people have a height greater than the average height of all people whose known_for_movie does not contain the string ‘All’? | [
"names"
] | SELECT COUNT(*) FROM names WHERE height > (SELECT AVG(height) FROM names WHERE known_for_movie NOT LIKE '%All%'); | [
"5582"
] | 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:18 | Among movies that
1) were produced in the USA,
2) are in the English language,
3) have a production company name that does not end with the word ‘Pictures’,
4) were directed by people whose names do not end with ‘Lee’,
what is the average duration of those movies? | [
"director_mapping",
"movie"
] | SELECT AVG(duration) AS avg_duration FROM movie WHERE title IN (SELECT movie_title FROM director_mapping WHERE name NOT LIKE '%Lee') AND country = 'USA' AND languages = 'English' AND production_company NOT LIKE '%Pictures'; | [
"93.2469879518072289"
] | 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": true,
"COUNT": false,
"MAX": false,
"MIN": false,
"SUM": false
} |
movie:19 | Which movies have a duration longer than the maximum duration of all movies released after 2018 with worldwide gross income greater than $5,000,000, and also have a director whose name does not start with ‘John’? | [
"director_mapping",
"movie"
] | SELECT title 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 director_mapping WHERE name NOT LIKE 'John%'); | [
"National Theatre Live: Angels in America Part One - Millennium Approaches",
"National Theatre Live: Angels in America Part Two - Perestroika",
"Ang panahon ng halimaw",
"Fabrizio De André: Principe libero",
"Da xiang xi di er zuo",
"La flor",
"National Theatre Live: King Lear",
"Mektoub, My Love: Int... | 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:20 | Among movies that
1) were produced in India,
2) have a duration greater than 100 minutes,
3) have average rating > 5.5 and median_rating > 5,
4) a movie title that does not contain the string ‘love’,
5) cast members whose name does not start with ‘John’,
what is the maximum worldwide gross income among these movies? | [
"movie",
"ratings",
"role_mapping"
] | SELECT MAX(worlwide_gross_income) AS highest_grossing_movie FROM movie WHERE title IN (SELECT movie_title FROM ratings WHERE avg_rating > 5.5 AND median_rating > 5 AND movie_title NOT LIKE '%love%') AND title IN (SELECT movie_title FROM role_mapping WHERE name NOT LIKE 'John%') AND duration > 100 AND country = 'India'; | [
"121956937"
] | 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": false,
"MAX": true,
"MIN": false,
"SUM": false
} |
movie:21 | Among movies that
1) have at least one director whose name does not start with Alex,
2) cast actor named James Reid,
3) have an average rating greater than 5 and whose title does not start with Kirrak,
what is the maximum worldwide gross income of these movies? | [
"director_mapping",
"movie",
"ratings",
"role_mapping"
] | SELECT MAX(worlwide_gross_income) FROM movie WHERE title IN (SELECT movie_title FROM director_mapping WHERE name NOT LIKE 'Alex%') AND title IN (SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name = 'James Reid') AND title IN (SELECT movie_title FROM ratings WHERE avg_rating > 5 AND movie_title NOT LIKE 'Kirrak%'); | [
"60538"
] | 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:22 | Which movie(s) have a duration equal to the maximum duration among all movies that are directed by someone whose name does not start with ‘Josh’? | [
"director_mapping",
"movie"
] | SELECT title FROM movie WHERE duration = ( SELECT MAX(duration) AS max_duration FROM movie WHERE title IN ( SELECT movie_title FROM director_mapping WHERE name NOT LIKE 'Josh%')); | [
"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:23 | Which movies produced in Japan, released after 2015, and have a duration longer than the average duration of movies that (1) have a median rating of 7 and an average rating greater than 6.5, and (2) cast people whose name does not start with ‘Clara’? | [
"movie",
"ratings",
"role_mapping"
] | SELECT title FROM movie WHERE duration > (SELECT avg(duration) FROM movie WHERE title IN (SELECT movie_title FROM ratings WHERE median_rating = 7 AND avg_rating > 6.5) AND title IN (SELECT movie_title FROM role_mapping WHERE name NOT LIKE 'Clara%'))AND year > 2015 AND country = 'Japan'; | [
"Tatara Samurai",
"Koisaika Miyamoto",
"Umi yori mo mada fukaku",
"Mama, gohan mada?",
"Gukôroku",
"Sabaibaru famirî",
"Gyakusatsu kikan",
"Isshuukan furenzu",
"Bokura no gohan wa ashita de matteru",
"Teiichi no kuni",
"Shinjuku suwan II",
"Utsukushii hoshi",
"3-gatsu no raion zenpen",
"Ge... | 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:24 | For movies produced in Argentina with a duration of at least 808 minutes, whose duration is equal to the maximum duration among all movies that have at least one director whose name does not start with Miran, what is their worldwide gross income ? | [
"director_mapping",
"movie"
] | SELECT worlwide_gross_income FROM movie WHERE title IN ( SELECT title FROM movie WHERE duration = ( SELECT MAX(duration) AS max_duration FROM movie WHERE title IN ( SELECT movie_title FROM director_mapping WHERE name NOT LIKE 'Miran%')) AND duration >= 808 AND country = 'Argentina'); | [
"4032"
] | 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:25 | What is the maximum duration of movies that:
1) Were released in 2018,
2) Were produced in the USA,
3) Have a duration longer than 100 minutes, and
4) Do not associated with a director named “John Wynn”? | [
"director_mapping",
"movie"
] | SELECT MAX(duration) FROM movie WHERE NOT EXISTS(SELECT movie_title FROM director_mapping WHERE director_mapping.movie_title = movie.title AND name = 'John Wynn') AND year = 2018 AND duration > 100 AND country = 'USA' | [
"180"
] | 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:26 | What is the latest publication date among all movies that do not associated with any actor named “Pavel Golubev” ? | [
"movie",
"role_mapping"
] | SELECT MAX(date_published) FROM movie WHERE NOT EXISTS( SELECT 1 FROM role_mapping WHERE movie_title = movie.title AND category = 'actor' AND name = 'Pavel Golubev') | [
"2019-12-27 00:00:00"
] | 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:27 | How many distinct movies (by title) are there that:
1) Have titles that start with “The”, and
2) Do not have any director with a height greater than 180? | [
"director_mapping",
"movie",
"names"
] | SELECT COUNT(DISTINCT movie_title) FROM director_mapping WHERE movie_title IN (SELECT title FROM movie WHERE name like 'The%') AND NOT EXISTS(SELECT name FROM names WHERE names.name = director_mapping.name AND height > 180); | [
"4"
] | 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:28 | How many movies are there whose production company:
1) Has produced at least one movie made in the USA and released after 2017,
2) Has no rating record where the movie’s median rating is greater than 5 and the total number of votes is greater than 250? | [
"movie",
"ratings"
] | SELECT COUNT(*) AS num_movies FROM movie WHERE production_company IN (SELECT production_company FROM movie WHERE year > 2017 AND country = 'USA') AND NOT EXISTS(SELECT movie_title FROM ratings WHERE median_rating > 5 AND total_votes > 250 AND movie_title = movie.title); | [
"766"
] | 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:29 | Which movie titles:
1) Do not assoicated with te actors who name end with the word 'Tom',
2) Are not classified under the ‘Thriller’ genre, and
3) Have a rating record with a median rating equal to 7 and an average rating greater than 5.5? | [
"genre",
"movie",
"ratings",
"role_mapping"
] | SELECT title FROM movie WHERE NOT EXISTS(SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name LIKE '%Tom' AND movie_title = movie.title) AND NOT title IN (SELECT movie_title FROM genre WHERE genre = 'Thriller') AND title IN (SELECT movie_title FROM ratings WHERE median_rating = 7 AND avg_rating > 5.5) | [
"Crazy",
"Polytechnique",
"Without",
"Monsoon Shootout",
"Eat with Me",
"Cruel",
"Haraamkhor",
"Victor",
"Aram, Aram",
"Free in Deed",
"Rosa Chumbe",
"Natasha",
"Pikadero",
"Full of Grace",
"The Fits",
"Tikkun",
"Manifesto",
"Blanka",
"How Heavy This Hammer",
"Nun-gil",
"Sile... | 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:30 | Which production companies have produced movies that:
1) Are classified in the ‘Thriller’ genre,
2) Have at least one director whose name ends with “Lee”, and
3) Do not have any rating data where that movie’s median rating is 8 and its average rating is greater than 6? | [
"director_mapping",
"genre",
"movie",
"ratings"
] | SELECT production_company FROM movie WHERE NOT EXISTS(SELECT movie_title FROM ratings WHERE median_rating = 8 AND avg_rating > 6 AND ratings.movie_title = movie.title) AND title IN (SELECT movie_title FROM genre WHERE genre = 'Thriller') AND title IN (SELECT movie_title FROM director_mapping WHERE name like '%Lee'); | [
"Star Cinema",
"CJ E&M Film Financing & Investment Entertainment & Comics",
"Green Fish Pictures"
] | 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:31 | How many movies:
1) Have worldwide gross income greater than $1,000,000,
2) Are in the English language, and
3) Do not have any rating data for that movie where:
- the movie is a USA movie with a duration greater than 100 minutes, and
- its median rating is greater than 5 and its average rating is greater than 5? | [
"movie",
"ratings"
] | SELECT COUNT(title) FROM movie WHERE NOT EXISTS( SELECT 1 FROM ratings WHERE median_rating > 5 AND avg_rating > 5 AND movie.title = ratings.movie_title AND movie.title IN ( SELECT title FROM movie WHERE duration > 100 AND country = 'USA') ) AND worlwide_gross_income > '1000000' AND languages = 'English' | [
"302"
] | 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:32 | What is the shortest duration (minimum runtime) among movies for which there does not exist any case where:
1) The movie has an actor whose name ends with “Charlie”, and
2) That movie is among the known-for movie of a person whose height is greater than the maximum height among all people whose known-for movie ends with “car”? | [
"movie",
"names",
"role_mapping"
] | SELECT MIN(duration) FROM movie WHERE NOT EXISTS( SELECT 1 FROM role_mapping WHERE movie_title = movie.title AND movie_title IN ( SELECT known_for_movie FROM names WHERE height > ( SELECT MAX(height) FROM names WHERE known_for_movie like '%car')) AND category = 'actor' AND name like '%Charlie') | [
"41"
] | 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": false,
"MAX": false,
"MIN": true,
"SUM": false
} |
movie:33 | What is the average height of people who does not exist any data which:
1) Has a height greater than the maximum height of all people whose known_for_movie is ‘Free Fire’,
2) And has a height greater than the maximum height of all people who are born on or after 1970-01-01 and whose known_for_movie is ‘Colossal’,
3) And has a date of birth earlier than 1970-01-01
4) And has a height greater than 200? | [
"names"
] | SELECT AVG(height) FROM names WHERE NOT 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.height > 200 AND T2.name_id = names.name_id) | [
"161.4655996177735308"
] | 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:34 | What is the maximum duration among movies for which there does not exist any data that:
1) Has a production company that also produced at least one movie directed by someone whose name ends with “Bong”,
and whose worldwide gross income is greater than $50,000,000,
2) Has a duration greater than 100,
3) Has country = ‘USA’? | [
"director_mapping",
"movie"
] | SELECT MAX(duration) FROM movie WHERE NOT EXISTS( SELECT 1 FROM movie WHERE production_company IN ( SELECT production_company FROM movie WHERE title IN ( SELECT movie_title FROM director_mapping WHERE name Like '%Bong') AND worlwide_gross_income > 50000000) AND duration > 100 AND country = 'USA' AND country = movie.country) | [
"808"
] | 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": false,
"MAX": true,
"MIN": false,
"SUM": false
} |
movie:35 | What is the average length of the movies that are dramas and have 'Night' in their title? | [
"genre",
"movie"
] | 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) | [
"98.7600000000000000"
] | true | true | 1 | {
"1": 1,
"2": null,
"3": null
} | 1 | nested (height=1, 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:36 | What is the longest runtime of a U.S. movie under 90 minutes that features Frank Grillo? | [
"movie",
"role_mapping"
] | SELECT MAX(duration) AS max_duration FROM movie WHERE title IN (SELECT title FROM movie WHERE title IN (SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name = 'Frank Grillo') AND country = 'USA') AND duration < 90 | [
"86"
] | 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:37 | Which actors who appeared in either "The Great Buddha+" or "Ray & Liz" have a height greater than the tallest person known for "Dusty and Me"? | [
"names",
"role_mapping"
] | SELECT name FROM role_mapping WHERE name IN (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 | 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:38 | How many movies did Andy Collier direct? | [
"director_mapping"
] | SELECT COUNT(DISTINCT movie_title) FROM director_mapping WHERE name = 'Andy Collier' | [
"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:39 | How many movies has Will Steckman acted in? | [
"role_mapping"
] | SELECT COUNT(DISTINCT movie_title) FROM role_mapping WHERE category = 'actor' AND name = 'Will Steckman' | [
"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:40 | What are the titles of the movies with median rating above 5 and average rating above 6 that have the word 'City' in their titles? | [
"ratings"
] | SELECT movie_title FROM ratings WHERE median_rating > 5 AND avg_rating > 6 AND movie_title LIKE '%City%' | [
"The Lost City of Z",
"Valerian and the City of a Thousand Planets",
"Bomb City",
"City of Lies",
"The Dark Side of Life: Mumbai City",
"Tehran: City of Love"
] | 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:41 | What are the heights of people who are known for the movie Dragged Across Concrete? | [
"names"
] | SELECT height FROM names WHERE known_for_movie = 'Dragged Across Concrete' | [
"200"
] | 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:42 | Which movie titles are associated with people who are taller than the tallest person born on or after January 1, 1970 who is known for the movie Colossal, and who have acted in films with titles that include either Cars or Ray & Liz? | [
"names",
"role_mapping"
] | SELECT movie_title FROM role_mapping WHERE name IN (SELECT name FROM names WHERE height > (SELECT MAX(height) FROM names WHERE date_of_birth >= '1970-01-01' AND known_for_movie = 'Colossal') AND name IN (SELECT name FROM role_mapping WHERE category = 'actor' AND (movie_title LIKE '%Cars%' OR movie_title LIKE '%Ray & Liz%'))) | [
"Ray & Liz"
] | 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:43 | Which movie titles have a runtime at least as long as the longest movie that both grossed over 250 worldwide and has an average and median rating above 5, excluding "Kirrak Party" and "Dead Sea"? | [
"movie",
"ratings"
] | SELECT title FROM movie WHERE duration >= ( SELECT MAX(duration) FROM movie WHERE duration >= ( SELECT 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')) AND worlwide_gross_income > 250)) | [
"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:44 | Which movie titles have an average rating of at least the maximum average rating of movies with a median rating above 5 and average rating above 6, excluding the movie Smallfoot, and also have a duration of more than 90 minutes, are in English, have an average rating above 9, a median rating of 10, and are either Love in Kilnerry or The Shawshank Redemption? | [
"movie",
"ratings"
] | SELECT movie_title FROM ratings WHERE avg_rating >= (SELECT MAX(avg_rating) FROM ratings WHERE median_rating > 5 AND avg_rating > 6 AND movie_title <> 'Smallfoot') AND movie_title IN (SELECT title FROM movie WHERE duration > 90 AND languages = 'English' GROUP BY title) AND avg_rating > 9 AND median_rating = 10 AND movie_title IN ('Love in Kilnerry', 'The Shawshank Redemption') | [
"Love in Kilnerry"
] | 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:45 | What is the average duration of movies for which there exists a movie–genre pair such that the movie's duration is at least as long as the average duration of all comedy movies? | [
"genre",
"movie"
] | SELECT AVG(duration) FROM movie WHERE EXISTS(SELECT T2.title FROM movie AS T2 INNER JOIN genre AS T3 ON T2.title = T3.movie_title WHERE T2.duration >= (SELECT AVG(duration) FROM movie WHERE title IN (SELECT movie_title FROM genre WHERE genre = 'Comedy')) AND movie.title = T2.title) | [
"122.9138813610358326"
] | 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:46 | What movie titles are associated with Billy Bob Thornton as an actor? | [
"role_mapping"
] | SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name = 'Billy Bob Thornton' | [
"A Million Little Pieces"
] | 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:47 | What is the height of the tallest person who is known for the movie Peppermint and was born on June 22, 1975? | [
"names"
] | SELECT MAX(height) FROM names WHERE known_for_movie = 'Peppermint' AND date_of_birth = '1975-06-22' | [
"200"
] | 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:48 | What is the longest duration of a movie released in 2018 by El Pampero Cine whose length is greater than the average duration of movies that are longer than the longest movie released after 2018 with a worldwide gross income above 5 million dollars, and that also have a median rating above 5 with more than 100 total votes? | [
"movie",
"ratings"
] | SELECT MAX(duration) AS longest_movie_duration FROM movie WHERE duration > (SELECT AVG(duration) AS average_movie_duration 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 median_rating > 5 AND total_votes > 100 AND movie_title = title GROUP BY movie_title)) AND year = 2018 AND production_company = 'El Pampero Cine' | [
"808"
] | true | true | 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": true,
"MIN": false,
"SUM": false
} |
movie:49 | Which production companies made Argentinian movies that are at least 808 minutes long and have English among their languages, and whose titles also appear among Argentinian films of at least 808 minutes that are at least as long as the longest movie overall—except that if a film titled Inhumane shows up in the director records, compare against the longest movie other than Inhumane? | [
"director_mapping",
"movie"
] | SELECT production_company FROM movie WHERE title IN ( SELECT title 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 duration >= 808 AND country = 'Argentina') AND duration >= 808 AND country = 'Argentina' AND languages LIKE '%English%' | [
"El Pampero Cine"
] | 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:50 | What movies did Rajkummar Rao act in? | [
"role_mapping"
] | SELECT movie_title FROM role_mapping WHERE category = 'actor' AND name = 'Rajkummar Rao' | [
"Judgementall Hai Kya",
"Trapped",
"Newton",
"Behen Hogi Teri",
"Bareilly Ki Barfi",
"Omerta"
] | 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:51 | How many Comedy movies have an average rating greater than 5, a median rating of 7, and more than 100 total votes? | [
"genre",
"movie",
"ratings"
] | SELECT COUNT(title) FROM movie WHERE title IN (SELECT movie_title FROM ratings WHERE avg_rating > 5 AND median_rating = 7) AND title IN (SELECT movie_title FROM ratings WHERE total_votes > 100 GROUP BY movie_title) AND title IN (SELECT movie_title FROM genre WHERE genre = 'Comedy') | [
"602"
] | true | true | 1 | {
"1": 3,
"2": null,
"3": null
} | 3 | nested (height=1, max_breadth=3) | {
"GROUP BY": true,
"HAVING": false,
"LIMIT": false,
"ORDER BY": false,
"WHERE": true
} | {
"AVG": false,
"COUNT": true,
"MAX": false,
"MIN": false,
"SUM": false
} |
movie:52 | What are the birth dates of people born before 1970 who are taller than 200 and whose height is at least as tall as the tallest person with 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') | [
"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:53 | What are the titles of the movies with a median rating of 8 and average rating greater than 7, ordered by average rating and total votes in descending order? | [
"ratings"
] | SELECT movie_title FROM ratings WHERE median_rating = 8 AND avg_rating > 7 ORDER BY avg_rating DESC, total_votes DESC | [
"Tikli and Laxmi Bomb",
"Poeta",
"Three Billboards Outside Ebbing, Missouri",
"Green Book",
"Thondimuthalum Dhriksakshiyum",
"Finding Fatimah",
"Ankur",
"Paws P.I.",
"An American in Paris: The Musical",
"The King and I",
"Logan",
"Hacksaw Ridge",
"Contratiempo",
"Ah-ga-ssi",
"A Matter of... | 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:54 | How many people born before 1960, taller than 200 cm, are at least as tall as the tallest person whose height is greater than 100 and also taller than the tallest person known for Dusty and Me? | [
"names"
] | SELECT COUNT(name) FROM names WHERE height >= (SELECT MAX(height) FROM names WHERE height >= (SELECT MAX(height) FROM names WHERE height > 100) AND height > (SELECT MAX(height) FROM names WHERE known_for_movie = 'Dusty and Me')) AND height > 200 AND date_of_birth < '1960-01-01' | [
"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:55 | Who is the director of the movie 'Qimen Dunjia'? | [
"director_mapping"
] | SELECT name FROM director_mapping WHERE movie_title = 'Qimen Dunjia' | [
"Woo-Ping Yuen"
] | 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:56 | Which Japanese movies released after 2015, shorter than 90 minutes, and featuring actors have both a median rating of 7 and an average rating above 6.5? | [
"movie",
"ratings",
"role_mapping"
] | SELECT title FROM movie WHERE title IN (SELECT title FROM movie WHERE title IN (SELECT movie_title FROM ratings WHERE median_rating = 7 AND avg_rating > 6.5 AND movie_title = title) AND title IN (SELECT movie_title FROM role_mapping WHERE category = 'actor') AND year > 2015 AND duration < 90 AND country = 'Japan') | [
"Hidamari ga kikoeru",
"Zan",
"Gekijouban danjon ni deai o motomeru no wa machigatteiru daro ka: Orion no ya"
] | 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:57 | How many people in the database are taller than 150 cm and born before 1970? | [
"names"
] | SELECT COUNT(height) FROM names WHERE height > 150 AND date_of_birth < '1970-01-01' | [
"1993"
] | 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
} |
SPARTA Benchmark
Paper | Code | Project Page | Leaderboard
SPARTA introduces a groundbreaking benchmark for tree-structured multi-hop question answering (QA) across text and tables, addressing the critical shortcomings of existing datasets like HybridQA and OTT-QA, which suffer from shallow reasoning, annotation errors, and limited scale. By constructing a unified reference fact database that merges source tables with grounding tables derived from unstructured passages, our end-to-end framework automates the generation of thousands of high-fidelity QA pairs—requiring only a quarter of the annotation effort—while incorporating advanced operations like aggregation, grouping, and deep nested predicates. Innovative techniques such as provenance-based refinement and realistic-structure enforcement ensure executable, semantically sound queries that mimic real-world complexity, spanning domains like NBA, movies, and medicine. On SPARTA, state-of-the-art models plummet by over 30 F1 points, exposing gaps in cross-modal reasoning and paving the way for more robust QA systems.
Dataset Structure
The dataset contains 3 configs across 3 domains (Movie, NBA, Medical), each with test and validation splits.
Domains
- Movie: Movie database with films, genres, ratings, and biographical text
- NBA: Basketball statistics with player info, teams, awards, and game narratives
- Medical: Healthcare data with appointments, billing, treatments, and patient records
Configs
| Config | Splits | Description |
|---|---|---|
workload_movie |
test, validation | 565 + 565 Movie domain queries |
workload_nba |
test, validation | 565 + 565 NBA domain queries |
workload_medical |
test, validation | 565 + 565 Medical domain queries |
Splits
- test:
question_id,question,table(3 fields only, answers withheld) - validation: includes SQL query, answer, query metadata (13 fields)
Validation Split Fields
| Field | Type | Description |
|---|---|---|
question_id |
string | Unique query ID ({domain}:{idx}) |
question |
string | Natural language question |
table |
list[string] | Relevant table names |
sql_query |
string | SQL query |
answer |
list[string] | Ground truth answers |
is_nested |
bool | Whether query is nested |
is_aggregated |
bool | Whether query uses aggregation |
height |
int | Query nesting depth |
breadth |
dict | Breadth per level |
max_breadth |
int | Maximum breadth |
type |
string | Query type description |
clause_usage |
dict | SQL clause usage (WHERE, GROUP BY, etc.) |
aggregate_usage |
dict | Aggregate function usage (SUM, COUNT, etc.) |
Usage
from datasets import load_dataset
# Load test split (questions only)
test_ds = load_dataset("pshlego/SPARTA", "workload_nba", split="test")
# Load validation split (with answers and metadata)
val_ds = load_dataset("pshlego/SPARTA", "workload_nba", split="validation")
License
CC BY-NC 4.0
- Downloads last month
- 27