{"case_id": "bird_q000_r0", "question_id": "bird/ice_hockey_draft/6916", "ds": "bird", "db": "ice_hockey_draft", "question": "Please list the names of all the players with a height of over 6'2\" inches.", "evidence": "name of the players refers to PlayerName; height of over 6'2\" inches refers to height_in_inch > '6''2\"' ;", "gold_sql": "SELECT DISTINCT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T2.height_in_inch > '6''2\"'", "pred_sql": "SELECT p.PlayerName\nFROM PlayerInfo p\nJOIN height_info h ON p.height = h.height_id\nWHERE h.height_in_inch > '6''2\"';", "label": "wrong", "unseen": false} {"case_id": "bird_q000_r1", "question_id": "bird/ice_hockey_draft/6916", "ds": "bird", "db": "ice_hockey_draft", "question": "Please list the names of all the players with a height of over 6'2\" inches.", "evidence": "name of the players refers to PlayerName; height of over 6'2\" inches refers to height_in_inch > '6''2\"' ;", "gold_sql": "SELECT DISTINCT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T2.height_in_inch > '6''2\"'", "pred_sql": "SELECT pi.PlayerName\nFROM PlayerInfo pi\nJOIN height_info hi ON pi.height = hi.height_id\nWHERE hi.height_in_inch > '6''2\"';", "label": "wrong", "unseen": false} {"case_id": "bird_q000_r2", "question_id": "bird/ice_hockey_draft/6916", "ds": "bird", "db": "ice_hockey_draft", "question": "Please list the names of all the players with a height of over 6'2\" inches.", "evidence": "name of the players refers to PlayerName; height of over 6'2\" inches refers to height_in_inch > '6''2\"' ;", "gold_sql": "SELECT DISTINCT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T2.height_in_inch > '6''2\"'", "pred_sql": "SELECT p.PlayerName\nFROM PlayerInfo p\nJOIN height_info hi ON p.height = hi.height_id\nWHERE hi.height_in_inch > '6''2\"';", "label": "wrong", "unseen": false} {"case_id": "bird_q000_r3", "question_id": "bird/ice_hockey_draft/6916", "ds": "bird", "db": "ice_hockey_draft", "question": "Please list the names of all the players with a height of over 6'2\" inches.", "evidence": "name of the players refers to PlayerName; height of over 6'2\" inches refers to height_in_inch > '6''2\"' ;", "gold_sql": "SELECT DISTINCT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T2.height_in_inch > '6''2\"'", "pred_sql": "SELECT pi.PlayerName\nFROM PlayerInfo AS pi\nJOIN height_info AS hi ON pi.height = hi.height_id\nWHERE hi.height_in_inch > '6''2\"';", "label": "wrong", "unseen": false} {"case_id": "bird_q001_r0", "question_id": "bird/hockey/7770", "ds": "bird", "db": "hockey", "question": "Among the coaches who are born in the USA, how many of them used to train the Philadelphia Flyers?", "evidence": "born in the USA refers to birthCountry = 'USA'; Philadelphia Flyers is the name of team;", "gold_sql": "SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Philadelphia Flyers' AND T3.birthCountry = 'USA'", "pred_sql": "SELECT COUNT(*) \nFROM Master m\nJOIN Coaches c ON m.coachID = c.coachID\nJOIN Teams t ON c.tmID = t.tmID\nWHERE m.birthCountry = 'USA' \n AND t.name = 'Philadelphia Flyers';", "label": "wrong", "unseen": false} {"case_id": "bird_q001_r1", "question_id": "bird/hockey/7770", "ds": "bird", "db": "hockey", "question": "Among the coaches who are born in the USA, how many of them used to train the Philadelphia Flyers?", "evidence": "born in the USA refers to birthCountry = 'USA'; Philadelphia Flyers is the name of team;", "gold_sql": "SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Philadelphia Flyers' AND T3.birthCountry = 'USA'", "pred_sql": "SELECT COUNT(*) AS coach_count\nFROM Master m\nJOIN Coaches c ON m.coachID = c.coachID\nJOIN Teams t ON c.tmID = t.tmID\nWHERE m.birthCountry = 'USA'\n AND t.name = 'Philadelphia Flyers';", "label": "wrong", "unseen": false} {"case_id": "bird_q001_r2", "question_id": "bird/hockey/7770", "ds": "bird", "db": "hockey", "question": "Among the coaches who are born in the USA, how many of them used to train the Philadelphia Flyers?", "evidence": "born in the USA refers to birthCountry = 'USA'; Philadelphia Flyers is the name of team;", "gold_sql": "SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Philadelphia Flyers' AND T3.birthCountry = 'USA'", "pred_sql": "SELECT COUNT(*)\nFROM Coaches c\nJOIN Teams t ON c.tmID = t.tmID\nJOIN Master m ON c.coachID = m.coachID\nWHERE m.birthCountry = 'USA'\n AND t.name = 'Philadelphia Flyers';", "label": "wrong", "unseen": false} {"case_id": "bird_q001_r3", "question_id": "bird/hockey/7770", "ds": "bird", "db": "hockey", "question": "Among the coaches who are born in the USA, how many of them used to train the Philadelphia Flyers?", "evidence": "born in the USA refers to birthCountry = 'USA'; Philadelphia Flyers is the name of team;", "gold_sql": "SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Philadelphia Flyers' AND T3.birthCountry = 'USA'", "pred_sql": "SELECT COUNT(*) FROM Master m JOIN Coaches c ON m.coachID = c.coachID JOIN Teams t ON c.tmID = t.tmID WHERE m.birthCountry = 'USA' AND t.name = 'Philadelphia Flyers';", "label": "wrong", "unseen": false} {"case_id": "bird_q002_r0", "question_id": "bird/professional_basketball/2815", "ds": "bird", "db": "professional_basketball", "question": "Between the years 1990 and 2007, of the total rebounds achieved by each player, how many managed to exceed 75% of defensive rebounds?", "evidence": "the year 1990 and 2007 refers to year BETWEEN 1990 AND 2007; exceed 75% of defensive rebounds refers to Divide (dRebounds, rebounds) * 100 > 75", "gold_sql": "SELECT COUNT(DISTINCT playerID) FROM player_allstar WHERE CAST(d_rebounds AS REAL) * 100 / rebounds > 75 AND season_id BETWEEN 1990 AND 2007", "pred_sql": "SELECT COUNT(*) FROM players_teams WHERE year BETWEEN 1990 AND 2007 AND (dRebounds * 100.0 / rebounds) > 75", "label": "wrong", "unseen": true} {"case_id": "bird_q002_r1", "question_id": "bird/professional_basketball/2815", "ds": "bird", "db": "professional_basketball", "question": "Between the years 1990 and 2007, of the total rebounds achieved by each player, how many managed to exceed 75% of defensive rebounds?", "evidence": "the year 1990 and 2007 refers to year BETWEEN 1990 AND 2007; exceed 75% of defensive rebounds refers to Divide (dRebounds, rebounds) * 100 > 75", "gold_sql": "SELECT COUNT(DISTINCT playerID) FROM player_allstar WHERE CAST(d_rebounds AS REAL) * 100 / rebounds > 75 AND season_id BETWEEN 1990 AND 2007", "pred_sql": "SELECT COUNT(*) FROM players_teams pt WHERE pt.year BETWEEN 1990 AND 2007 AND (pt.dRebounds * 100.0 / pt.rebounds) > 75;", "label": "wrong", "unseen": true} {"case_id": "bird_q002_r2", "question_id": "bird/professional_basketball/2815", "ds": "bird", "db": "professional_basketball", "question": "Between the years 1990 and 2007, of the total rebounds achieved by each player, how many managed to exceed 75% of defensive rebounds?", "evidence": "the year 1990 and 2007 refers to year BETWEEN 1990 AND 2007; exceed 75% of defensive rebounds refers to Divide (dRebounds, rebounds) * 100 > 75", "gold_sql": "SELECT COUNT(DISTINCT playerID) FROM player_allstar WHERE CAST(d_rebounds AS REAL) * 100 / rebounds > 75 AND season_id BETWEEN 1990 AND 2007", "pred_sql": "SELECT COUNT(*) FROM players_teams pt WHERE pt.year BETWEEN 1990 AND 2007 AND pt.rebounds > 0 AND 100.0 * pt.dRebounds / pt.rebounds > 75;", "label": "wrong", "unseen": true} {"case_id": "bird_q002_r3", "question_id": "bird/professional_basketball/2815", "ds": "bird", "db": "professional_basketball", "question": "Between the years 1990 and 2007, of the total rebounds achieved by each player, how many managed to exceed 75% of defensive rebounds?", "evidence": "the year 1990 and 2007 refers to year BETWEEN 1990 AND 2007; exceed 75% of defensive rebounds refers to Divide (dRebounds, rebounds) * 100 > 75", "gold_sql": "SELECT COUNT(DISTINCT playerID) FROM player_allstar WHERE CAST(d_rebounds AS REAL) * 100 / rebounds > 75 AND season_id BETWEEN 1990 AND 2007", "pred_sql": "SELECT COUNT(*) FROM players_teams pt\nJOIN teams t ON pt.year = t.year\nWHERE pt.year BETWEEN 1990 AND 2007\n AND (pt.dRebounds * 100.0 / pt.rebounds) > 75;", "label": "wrong", "unseen": true} {"case_id": "bird_q003_r0", "question_id": "bird/olympics/5039", "ds": "bird", "db": "olympics", "question": "How many people who are below 30 and participated in the summer season?", "evidence": "people who are below 30 refer to person_id where age < 30; the summer season refers to season = 'Summer';", "gold_sql": "SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.season = 'Summer' AND T2.age < 30", "pred_sql": "SELECT COUNT(*) FROM games_competitor gc JOIN games g ON gc.games_id = g.id WHERE gc.age < 30 AND g.season = 'Summer';", "label": "spurious", "unseen": false} {"case_id": "bird_q003_r1", "question_id": "bird/olympics/5039", "ds": "bird", "db": "olympics", "question": "How many people who are below 30 and participated in the summer season?", "evidence": "people who are below 30 refer to person_id where age < 30; the summer season refers to season = 'Summer';", "gold_sql": "SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.season = 'Summer' AND T2.age < 30", "pred_sql": "SELECT COUNT(*) FROM games_competitor gc JOIN games g ON gc.games_id = g.id WHERE gc.age < 30 AND g.season = 'Summer';", "label": "spurious", "unseen": false} {"case_id": "bird_q003_r2", "question_id": "bird/olympics/5039", "ds": "bird", "db": "olympics", "question": "How many people who are below 30 and participated in the summer season?", "evidence": "people who are below 30 refer to person_id where age < 30; the summer season refers to season = 'Summer';", "gold_sql": "SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.season = 'Summer' AND T2.age < 30", "pred_sql": "SELECT COUNT(*) FROM games_competitor gc JOIN games g ON gc.games_id = g.id WHERE gc.age < 30 AND g.season = 'Summer';", "label": "spurious", "unseen": false} {"case_id": "bird_q003_r3", "question_id": "bird/olympics/5039", "ds": "bird", "db": "olympics", "question": "How many people who are below 30 and participated in the summer season?", "evidence": "people who are below 30 refer to person_id where age < 30; the summer season refers to season = 'Summer';", "gold_sql": "SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.season = 'Summer' AND T2.age < 30", "pred_sql": "SELECT COUNT(*) FROM games_competitor AS gc JOIN games AS g ON gc.games_id = g.id WHERE gc.age < 30 AND g.season = 'Summer';", "label": "spurious", "unseen": false} {"case_id": "bird_q004_r0", "question_id": "bird/address/5176", "ds": "bird", "db": "address", "question": "Among the postal points in California, calculate the percentage of them in post office types.", "evidence": "DIVIDE(COUNT(zip_code where type = 'Post Office'), COUNT(zip_code)) as percentage where name = 'California';", "gold_sql": "SELECT CAST(COUNT(CASE WHEN T2.type = 'Post Office' THEN T2.zip_code ELSE NULL END) AS REAL) * 100 / COUNT(T2.zip_code) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'California'", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN zd.type = 'Post Office' THEN 1 ELSE 0 END) / COUNT(*)\nFROM zip_data AS zd\nJOIN state AS s ON zd.state = s.abbreviation\nWHERE s.name = 'California';", "label": "correct", "unseen": false} {"case_id": "bird_q004_r1", "question_id": "bird/address/5176", "ds": "bird", "db": "address", "question": "Among the postal points in California, calculate the percentage of them in post office types.", "evidence": "DIVIDE(COUNT(zip_code where type = 'Post Office'), COUNT(zip_code)) as percentage where name = 'California';", "gold_sql": "SELECT CAST(COUNT(CASE WHEN T2.type = 'Post Office' THEN T2.zip_code ELSE NULL END) AS REAL) * 100 / COUNT(T2.zip_code) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'California'", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN zd.type = 'Post Office' THEN 1 ELSE 0 END) / COUNT(*) AS percentage\nFROM zip_data zd\nJOIN state s ON zd.state = s.abbreviation\nWHERE s.name = 'California';", "label": "correct", "unseen": false} {"case_id": "bird_q004_r2", "question_id": "bird/address/5176", "ds": "bird", "db": "address", "question": "Among the postal points in California, calculate the percentage of them in post office types.", "evidence": "DIVIDE(COUNT(zip_code where type = 'Post Office'), COUNT(zip_code)) as percentage where name = 'California';", "gold_sql": "SELECT CAST(COUNT(CASE WHEN T2.type = 'Post Office' THEN T2.zip_code ELSE NULL END) AS REAL) * 100 / COUNT(T2.zip_code) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'California'", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN z.type = 'Post Office' THEN 1 ELSE 0 END) / COUNT(*) AS percentage\nFROM zip_data z\nJOIN state s ON z.state = s.abbreviation\nWHERE s.name = 'California';", "label": "correct", "unseen": false} {"case_id": "bird_q004_r3", "question_id": "bird/address/5176", "ds": "bird", "db": "address", "question": "Among the postal points in California, calculate the percentage of them in post office types.", "evidence": "DIVIDE(COUNT(zip_code where type = 'Post Office'), COUNT(zip_code)) as percentage where name = 'California';", "gold_sql": "SELECT CAST(COUNT(CASE WHEN T2.type = 'Post Office' THEN T2.zip_code ELSE NULL END) AS REAL) * 100 / COUNT(T2.zip_code) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'California'", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN zd.type = 'Post Office' THEN 1 ELSE 0 END) / COUNT(*) AS percentage\nFROM zip_data zd\nJOIN state s ON zd.state = s.abbreviation\nWHERE s.name = 'California';", "label": "correct", "unseen": false} {"case_id": "bird_q005_r0", "question_id": "bird/soccer_2016/1966", "ds": "bird", "db": "soccer_2016", "question": "List the ball IDs, scores, and innings numbers in the over ID 20 of match ID \"335988\".", "evidence": "innings numbers refers to Innings_No", "gold_sql": "SELECT Ball_Id, Runs_Scored, Innings_No FROM Batsman_Scored WHERE Match_Id = 335988 AND Over_Id = 20", "pred_sql": "SELECT Batsman_Scored.Ball_Id, Batsman_Scored.Runs_Scored, Batsman_Scored.Innings_No\nFROM Batsman_Scored\nJOIN Match ON Batsman_Scored.Match_Id = Match.Match_Id\nWHERE Batsman_Scored.Over_Id = 20\n AND Batsman_Scored.Match_Id = 335988;", "label": "correct", "unseen": false} {"case_id": "bird_q005_r1", "question_id": "bird/soccer_2016/1966", "ds": "bird", "db": "soccer_2016", "question": "List the ball IDs, scores, and innings numbers in the over ID 20 of match ID \"335988\".", "evidence": "innings numbers refers to Innings_No", "gold_sql": "SELECT Ball_Id, Runs_Scored, Innings_No FROM Batsman_Scored WHERE Match_Id = 335988 AND Over_Id = 20", "pred_sql": "SELECT Ball_Id, Runs_Scored, Innings_No\nFROM Batsman_Scored\nWHERE Over_Id = 20\n AND Match_Id = 335988;", "label": "correct", "unseen": false} {"case_id": "bird_q005_r2", "question_id": "bird/soccer_2016/1966", "ds": "bird", "db": "soccer_2016", "question": "List the ball IDs, scores, and innings numbers in the over ID 20 of match ID \"335988\".", "evidence": "innings numbers refers to Innings_No", "gold_sql": "SELECT Ball_Id, Runs_Scored, Innings_No FROM Batsman_Scored WHERE Match_Id = 335988 AND Over_Id = 20", "pred_sql": "SELECT Ball_Id, Runs_Scored, Innings_No\nFROM Batsman_Scored\nWHERE Match_Id = 335988\n AND Over_Id = 20;", "label": "correct", "unseen": false} {"case_id": "bird_q005_r3", "question_id": "bird/soccer_2016/1966", "ds": "bird", "db": "soccer_2016", "question": "List the ball IDs, scores, and innings numbers in the over ID 20 of match ID \"335988\".", "evidence": "innings numbers refers to Innings_No", "gold_sql": "SELECT Ball_Id, Runs_Scored, Innings_No FROM Batsman_Scored WHERE Match_Id = 335988 AND Over_Id = 20", "pred_sql": "SELECT Ball_Id, Runs_Scored, Innings_No\nFROM Batsman_Scored\nWHERE Match_Id = 335988 AND Over_Id = 20;", "label": "correct", "unseen": false} {"case_id": "bird_q006_r0", "question_id": "bird/public_review_platform/4037", "ds": "bird", "db": "public_review_platform", "question": "How many users have uber review votes for funny from the fans?", "evidence": "users refer to user_id; review_votes_funny = 'uber';", "gold_sql": "SELECT COUNT(DISTINCT user_id) FROM Reviews WHERE review_votes_funny = 'Uber'", "pred_sql": "SELECT COUNT(*) FROM Reviews WHERE review_votes_funny = 'Uber';", "label": "wrong", "unseen": false} {"case_id": "bird_q006_r1", "question_id": "bird/public_review_platform/4037", "ds": "bird", "db": "public_review_platform", "question": "How many users have uber review votes for funny from the fans?", "evidence": "users refer to user_id; review_votes_funny = 'uber';", "gold_sql": "SELECT COUNT(DISTINCT user_id) FROM Reviews WHERE review_votes_funny = 'Uber'", "pred_sql": "SELECT COUNT(*) FROM Reviews r JOIN Users u ON r.user_id = u.user_id WHERE r.review_votes_funny = 'Uber';", "label": "wrong", "unseen": false} {"case_id": "bird_q006_r2", "question_id": "bird/public_review_platform/4037", "ds": "bird", "db": "public_review_platform", "question": "How many users have uber review votes for funny from the fans?", "evidence": "users refer to user_id; review_votes_funny = 'uber';", "gold_sql": "SELECT COUNT(DISTINCT user_id) FROM Reviews WHERE review_votes_funny = 'Uber'", "pred_sql": "SELECT COUNT(*) FROM Reviews JOIN Users ON Reviews.user_id = Users.user_id WHERE Reviews.review_votes_funny = 'Uber';", "label": "wrong", "unseen": false} {"case_id": "bird_q006_r3", "question_id": "bird/public_review_platform/4037", "ds": "bird", "db": "public_review_platform", "question": "How many users have uber review votes for funny from the fans?", "evidence": "users refer to user_id; review_votes_funny = 'uber';", "gold_sql": "SELECT COUNT(DISTINCT user_id) FROM Reviews WHERE review_votes_funny = 'Uber'", "pred_sql": "SELECT COUNT(*)\nFROM Users u\nJOIN Reviews r ON r.user_id = u.user_id\nWHERE r.review_votes_funny = 'Uber';", "label": "wrong", "unseen": false} {"case_id": "bird_q007_r0", "question_id": "bird/movie_platform/20", "ds": "bird", "db": "movie_platform", "question": "What are the movie popularity of the movies released in 2021 that were directed by Steven Spielberg? List the names of the movies and their corresponding popularity.", "evidence": "movie released in 2021 refers to movie_release_year = 2021; popularity refers to movie_popularity;", "gold_sql": "SELECT movie_title, movie_popularity FROM movies WHERE movie_release_year = 2021 AND director_name = 'Steven Spielberg'", "pred_sql": "SELECT movies.movie_title, movies.movie_popularity\nFROM movies\nWHERE movies.movie_release_year = 2021\n AND movies.director_name = 'Steven Spielberg'\nORDER BY movies.movie_title;", "label": "correct", "unseen": false} {"case_id": "bird_q007_r1", "question_id": "bird/movie_platform/20", "ds": "bird", "db": "movie_platform", "question": "What are the movie popularity of the movies released in 2021 that were directed by Steven Spielberg? List the names of the movies and their corresponding popularity.", "evidence": "movie released in 2021 refers to movie_release_year = 2021; popularity refers to movie_popularity;", "gold_sql": "SELECT movie_title, movie_popularity FROM movies WHERE movie_release_year = 2021 AND director_name = 'Steven Spielberg'", "pred_sql": "SELECT m.movie_title, m.movie_popularity\nFROM movies m\nWHERE m.movie_release_year = 2021\n AND m.director_name LIKE '%Steven Spielberg%';", "label": "spurious", "unseen": true} {"case_id": "bird_q007_r2", "question_id": "bird/movie_platform/20", "ds": "bird", "db": "movie_platform", "question": "What are the movie popularity of the movies released in 2021 that were directed by Steven Spielberg? List the names of the movies and their corresponding popularity.", "evidence": "movie released in 2021 refers to movie_release_year = 2021; popularity refers to movie_popularity;", "gold_sql": "SELECT movie_title, movie_popularity FROM movies WHERE movie_release_year = 2021 AND director_name = 'Steven Spielberg'", "pred_sql": "SELECT m.movie_title, m.movie_popularity\nFROM movies m\nWHERE m.movie_release_year = 2021\n AND m.director_name = 'Steven Spielberg';", "label": "correct", "unseen": false} {"case_id": "bird_q007_r3", "question_id": "bird/movie_platform/20", "ds": "bird", "db": "movie_platform", "question": "What are the movie popularity of the movies released in 2021 that were directed by Steven Spielberg? List the names of the movies and their corresponding popularity.", "evidence": "movie released in 2021 refers to movie_release_year = 2021; popularity refers to movie_popularity;", "gold_sql": "SELECT movie_title, movie_popularity FROM movies WHERE movie_release_year = 2021 AND director_name = 'Steven Spielberg'", "pred_sql": "SELECT m.movie_popularity, m.movie_title\nFROM movies m\nWHERE m.movie_release_year = 2021\n AND m.director_name = 'Steven Spielberg';", "label": "wrong", "unseen": false} {"case_id": "bird_q008_r0", "question_id": "bird/movie_3/9110", "ds": "bird", "db": "movie_3", "question": "Please list the titles of all the films that have more than 2 special features.", "evidence": "more than 2 special features refers to Count(special_features) > 2", "gold_sql": "SELECT title FROM ( SELECT title, COUNT(special_features) AS num FROM film GROUP BY title ) AS T ORDER BY T.num > 2", "pred_sql": "SELECT title\nFROM film\nWHERE LENGTH(special_features) - LENGTH(REPLACE(special_features, ',', '')) > 2;", "label": "wrong", "unseen": true} {"case_id": "bird_q008_r1", "question_id": "bird/movie_3/9110", "ds": "bird", "db": "movie_3", "question": "Please list the titles of all the films that have more than 2 special features.", "evidence": "more than 2 special features refers to Count(special_features) > 2", "gold_sql": "SELECT title FROM ( SELECT title, COUNT(special_features) AS num FROM film GROUP BY title ) AS T ORDER BY T.num > 2", "pred_sql": "SELECT title\nFROM film\nWHERE special_features LIKE '%,%,%' AND LENGTH(special_features) > 2;", "label": "wrong", "unseen": true} {"case_id": "bird_q008_r2", "question_id": "bird/movie_3/9110", "ds": "bird", "db": "movie_3", "question": "Please list the titles of all the films that have more than 2 special features.", "evidence": "more than 2 special features refers to Count(special_features) > 2", "gold_sql": "SELECT title FROM ( SELECT title, COUNT(special_features) AS num FROM film GROUP BY title ) AS T ORDER BY T.num > 2", "pred_sql": "SELECT title FROM film WHERE special_features LIKE '%,%' HAVING COUNT(*) > 2;", "label": "wrong", "unseen": true} {"case_id": "bird_q008_r3", "question_id": "bird/movie_3/9110", "ds": "bird", "db": "movie_3", "question": "Please list the titles of all the films that have more than 2 special features.", "evidence": "more than 2 special features refers to Count(special_features) > 2", "gold_sql": "SELECT title FROM ( SELECT title, COUNT(special_features) AS num FROM film GROUP BY title ) AS T ORDER BY T.num > 2", "pred_sql": "SELECT title\nFROM film\nWHERE special_features IS NOT NULL\n AND LENGTH(special_features) > 0\n AND (\n SELECT COUNT(*)\n FROM string_to_array(film.special_features, ',')\n ) > 2;", "label": "wrong", "unseen": true} {"case_id": "bird_q009_r0", "question_id": "bird/synthea/1384", "ds": "bird", "db": "synthea", "question": "When did Mrs. Ira Deckow have the standard pregnancy test?", "evidence": "standard pregnancy test refers to DESCRIPTION = 'Standard pregnancy test' from procedures;", "gold_sql": "SELECT T2.date FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Ira' AND T1.last = 'Deckow' AND T2.description = 'Standard pregnancy test'", "pred_sql": "SELECT pr.DATE\nFROM procedures pr\nJOIN patients p ON pr.PATIENT = p.patient\nWHERE pr.DESCRIPTION = 'Standard pregnancy test'\n AND p.first = 'Ira'\n AND p.last = 'Deckow'\n AND p.prefix = 'Mrs.';", "label": "correct", "unseen": false} {"case_id": "bird_q009_r1", "question_id": "bird/synthea/1384", "ds": "bird", "db": "synthea", "question": "When did Mrs. Ira Deckow have the standard pregnancy test?", "evidence": "standard pregnancy test refers to DESCRIPTION = 'Standard pregnancy test' from procedures;", "gold_sql": "SELECT T2.date FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Ira' AND T1.last = 'Deckow' AND T2.description = 'Standard pregnancy test'", "pred_sql": "SELECT p.DATE\nFROM procedures AS p\nJOIN patients AS pt ON p.PATIENT = pt.patient\nWHERE p.DESCRIPTION = 'Standard pregnancy test'\n AND pt.first = 'Ira'\n AND pt.last = 'Deckow'\n AND pt.prefix = 'Mrs.';", "label": "correct", "unseen": false} {"case_id": "bird_q009_r2", "question_id": "bird/synthea/1384", "ds": "bird", "db": "synthea", "question": "When did Mrs. Ira Deckow have the standard pregnancy test?", "evidence": "standard pregnancy test refers to DESCRIPTION = 'Standard pregnancy test' from procedures;", "gold_sql": "SELECT T2.date FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Ira' AND T1.last = 'Deckow' AND T2.description = 'Standard pregnancy test'", "pred_sql": "SELECT p.birthdate, p.first, p.last, p.prefix, pr.DATE, pr.DESCRIPTION\nFROM patients p\nJOIN procedures pr ON pr.PATIENT = p.patient\nWHERE p.first = 'Ira'\n AND p.last = 'Deckow'\n AND pr.DESCRIPTION = 'Standard pregnancy test';", "label": "wrong", "unseen": true} {"case_id": "bird_q009_r3", "question_id": "bird/synthea/1384", "ds": "bird", "db": "synthea", "question": "When did Mrs. Ira Deckow have the standard pregnancy test?", "evidence": "standard pregnancy test refers to DESCRIPTION = 'Standard pregnancy test' from procedures;", "gold_sql": "SELECT T2.date FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Ira' AND T1.last = 'Deckow' AND T2.description = 'Standard pregnancy test'", "pred_sql": "SELECT p.birthdate, pr.DATE\nFROM patients AS p\nJOIN procedures AS pr ON pr.PATIENT = p.patient\nWHERE p.prefix = 'Mr.'\n AND p.first = 'Ira'\n AND p.last = 'Deckow'\n AND pr.DESCRIPTION = 'Standard pregnancy test';", "label": "wrong", "unseen": false} {"case_id": "bird_q010_r0", "question_id": "bird/hockey/7769", "ds": "bird", "db": "hockey", "question": "Among the coaches who have taught the Philadelphia Flyers, how many of them are born in March?", "evidence": "born in March refers to birthMon = 3; Philadelphia Flyers is the name of team;", "gold_sql": "SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Philadelphia Flyers' AND T3.birthMon = 3", "pred_sql": "SELECT COUNT(*) FROM Coaches c JOIN Teams t ON c.tmID = t.tmID JOIN Master m ON m.coachID = c.coachID WHERE t.name = 'Philadelphia Flyers' AND m.birthMon = '3';", "label": "wrong", "unseen": false} {"case_id": "bird_q010_r1", "question_id": "bird/hockey/7769", "ds": "bird", "db": "hockey", "question": "Among the coaches who have taught the Philadelphia Flyers, how many of them are born in March?", "evidence": "born in March refers to birthMon = 3; Philadelphia Flyers is the name of team;", "gold_sql": "SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Philadelphia Flyers' AND T3.birthMon = 3", "pred_sql": "SELECT COUNT(*) \nFROM Master m\nJOIN Coaches c ON m.coachID = c.coachID\nJOIN Teams t ON c.tmID = t.tmID\nWHERE t.name = 'Philadelphia Flyers' AND m.birthMon = '3';", "label": "wrong", "unseen": false} {"case_id": "bird_q010_r2", "question_id": "bird/hockey/7769", "ds": "bird", "db": "hockey", "question": "Among the coaches who have taught the Philadelphia Flyers, how many of them are born in March?", "evidence": "born in March refers to birthMon = 3; Philadelphia Flyers is the name of team;", "gold_sql": "SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Philadelphia Flyers' AND T3.birthMon = 3", "pred_sql": "SELECT COUNT(*) FROM Coaches AS c\nJOIN Teams AS t ON c.tmID = t.tmID AND c.year = t.year\nJOIN Master AS m ON m.coachID = c.coachID\nWHERE t.name = 'Philadelphia Flyers' AND m.birthMon = '3';", "label": "spurious", "unseen": false} {"case_id": "bird_q010_r3", "question_id": "bird/hockey/7769", "ds": "bird", "db": "hockey", "question": "Among the coaches who have taught the Philadelphia Flyers, how many of them are born in March?", "evidence": "born in March refers to birthMon = 3; Philadelphia Flyers is the name of team;", "gold_sql": "SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Philadelphia Flyers' AND T3.birthMon = 3", "pred_sql": "SELECT COUNT(*) AS march_birth_count\nFROM Coaches c\nJOIN Teams t ON c.tmID = t.tmID AND c.year = t.year\nJOIN Master m ON m.coachID = c.coachID\nWHERE t.name = 'Philadelphia Flyers' AND m.birthMon = '3';", "label": "spurious", "unseen": false} {"case_id": "bird_q011_r0", "question_id": "bird/movie_3/9263", "ds": "bird", "db": "movie_3", "question": "How many payments were made throughout the month of August 2005?", "evidence": "payments made refers to amount; throughout the month of August 2005 refers to payment_date like '2005-08%'", "gold_sql": "SELECT SUM(amount) FROM payment WHERE payment_date LIKE '2005-08%'", "pred_sql": "SELECT COUNT(*) FROM payment WHERE payment_date LIKE '2005-08%';", "label": "wrong", "unseen": false} {"case_id": "bird_q011_r1", "question_id": "bird/movie_3/9263", "ds": "bird", "db": "movie_3", "question": "How many payments were made throughout the month of August 2005?", "evidence": "payments made refers to amount; throughout the month of August 2005 refers to payment_date like '2005-08%'", "gold_sql": "SELECT SUM(amount) FROM payment WHERE payment_date LIKE '2005-08%'", "pred_sql": "SELECT COUNT(*) FROM payment WHERE payment_date LIKE '2005-08%';", "label": "wrong", "unseen": false} {"case_id": "bird_q011_r2", "question_id": "bird/movie_3/9263", "ds": "bird", "db": "movie_3", "question": "How many payments were made throughout the month of August 2005?", "evidence": "payments made refers to amount; throughout the month of August 2005 refers to payment_date like '2005-08%'", "gold_sql": "SELECT SUM(amount) FROM payment WHERE payment_date LIKE '2005-08%'", "pred_sql": "SELECT COUNT(*) FROM payment WHERE payment_date LIKE '2005-08%';", "label": "wrong", "unseen": false} {"case_id": "bird_q011_r3", "question_id": "bird/movie_3/9263", "ds": "bird", "db": "movie_3", "question": "How many payments were made throughout the month of August 2005?", "evidence": "payments made refers to amount; throughout the month of August 2005 refers to payment_date like '2005-08%'", "gold_sql": "SELECT SUM(amount) FROM payment WHERE payment_date LIKE '2005-08%'", "pred_sql": "SELECT COUNT(*) FROM payment WHERE payment_date LIKE '2005-08%';", "label": "wrong", "unseen": false} {"case_id": "bird_q012_r0", "question_id": "bird/human_resources/8979", "ds": "bird", "db": "human_resources", "question": "What is the maximum salary of position \"Trainer\"?", "evidence": "maximum salary refers to maxsalary; Trainee is a positiontitle", "gold_sql": "SELECT maxsalary FROM position WHERE positiontitle = 'Trainee'", "pred_sql": "SELECT maxsalary FROM position WHERE positiontitle = 'Trainer';", "label": "wrong", "unseen": true} {"case_id": "bird_q012_r1", "question_id": "bird/human_resources/8979", "ds": "bird", "db": "human_resources", "question": "What is the maximum salary of position \"Trainer\"?", "evidence": "maximum salary refers to maxsalary; Trainee is a positiontitle", "gold_sql": "SELECT maxsalary FROM position WHERE positiontitle = 'Trainee'", "pred_sql": "SELECT MAXsalary FROM position WHERE positiontitle = 'Trainer';", "label": "wrong", "unseen": true} {"case_id": "bird_q012_r2", "question_id": "bird/human_resources/8979", "ds": "bird", "db": "human_resources", "question": "What is the maximum salary of position \"Trainer\"?", "evidence": "maximum salary refers to maxsalary; Trainee is a positiontitle", "gold_sql": "SELECT maxsalary FROM position WHERE positiontitle = 'Trainee'", "pred_sql": "SELECT maxsalary FROM position WHERE positiontitle = 'Trainer';", "label": "wrong", "unseen": true} {"case_id": "bird_q012_r3", "question_id": "bird/human_resources/8979", "ds": "bird", "db": "human_resources", "question": "What is the maximum salary of position \"Trainer\"?", "evidence": "maximum salary refers to maxsalary; Trainee is a positiontitle", "gold_sql": "SELECT maxsalary FROM position WHERE positiontitle = 'Trainee'", "pred_sql": "SELECT maxsalary FROM position WHERE positiontitle = 'Trainee';", "label": "correct", "unseen": false} {"case_id": "bird_q013_r0", "question_id": "bird/works_cycles/7103", "ds": "bird", "db": "works_cycles", "question": "Calculate the average of the total ordered quantity of products purchased whose shipping method was Cargo Transport 5.", "evidence": "shipping method was Cargo Transport 5 refers to Name = 'Cargo Transport 5'; average = DIVIDE(SUM(OrderQty where Name = 'Cargo Transport 5'), COUNT(ShipMethodID))", "gold_sql": "SELECT CAST(SUM(IIF(T1.ShipMethodID = 5, T3.OrderQty, 0)) AS REAL) / COUNT(T3.ProductID) FROM ShipMethod AS T1 INNER JOIN PurchaseOrderHeader AS T2 ON T1.ShipMethodID = T2.ShipMethodID INNER JOIN PurchaseOrderDetail AS T3 ON T2.PurchaseOrderID = T3.PurchaseOrderID", "pred_sql": "SELECT AVG(po.OrderQty) AS AverageOrderedQuantity\nFROM PurchaseOrderDetail po\nJOIN PurchaseOrderHeader poh ON po.PurchaseOrderID = poh.PurchaseOrderID\nJOIN ShipMethod sm ON poh.ShipMethodID = sm.ShipMethodID\nWHERE sm.Name = 'Cargo Transport 5';", "label": "wrong", "unseen": true} {"case_id": "bird_q013_r1", "question_id": "bird/works_cycles/7103", "ds": "bird", "db": "works_cycles", "question": "Calculate the average of the total ordered quantity of products purchased whose shipping method was Cargo Transport 5.", "evidence": "shipping method was Cargo Transport 5 refers to Name = 'Cargo Transport 5'; average = DIVIDE(SUM(OrderQty where Name = 'Cargo Transport 5'), COUNT(ShipMethodID))", "gold_sql": "SELECT CAST(SUM(IIF(T1.ShipMethodID = 5, T3.OrderQty, 0)) AS REAL) / COUNT(T3.ProductID) FROM ShipMethod AS T1 INNER JOIN PurchaseOrderHeader AS T2 ON T1.ShipMethodID = T2.ShipMethodID INNER JOIN PurchaseOrderDetail AS T3 ON T2.PurchaseOrderID = T3.PurchaseOrderID", "pred_sql": "SELECT AVG(pod.OrderQty) AS AverageOrderedQty\nFROM PurchaseOrderDetail AS pod\nJOIN PurchaseOrderHeader AS poh ON pod.PurchaseOrderID = poh.PurchaseOrderID\nJOIN ShipMethod AS sm ON poh.ShipMethodID = sm.ShipMethodID\nWHERE sm.Name = 'Cargo Transport 5';", "label": "wrong", "unseen": true} {"case_id": "bird_q013_r2", "question_id": "bird/works_cycles/7103", "ds": "bird", "db": "works_cycles", "question": "Calculate the average of the total ordered quantity of products purchased whose shipping method was Cargo Transport 5.", "evidence": "shipping method was Cargo Transport 5 refers to Name = 'Cargo Transport 5'; average = DIVIDE(SUM(OrderQty where Name = 'Cargo Transport 5'), COUNT(ShipMethodID))", "gold_sql": "SELECT CAST(SUM(IIF(T1.ShipMethodID = 5, T3.OrderQty, 0)) AS REAL) / COUNT(T3.ProductID) FROM ShipMethod AS T1 INNER JOIN PurchaseOrderHeader AS T2 ON T1.ShipMethodID = T2.ShipMethodID INNER JOIN PurchaseOrderDetail AS T3 ON T2.PurchaseOrderID = T3.PurchaseOrderID", "pred_sql": "SELECT AVG(pod.OrderQty) FROM PurchaseOrderDetail AS pod JOIN PurchaseOrderHeader AS po ON pod.PurchaseOrderID = po.PurchaseOrderID JOIN ShipMethod AS sm ON po.ShipMethodID = sm.ShipMethodID WHERE sm.Name = 'Cargo Transport 5';", "label": "wrong", "unseen": true} {"case_id": "bird_q013_r3", "question_id": "bird/works_cycles/7103", "ds": "bird", "db": "works_cycles", "question": "Calculate the average of the total ordered quantity of products purchased whose shipping method was Cargo Transport 5.", "evidence": "shipping method was Cargo Transport 5 refers to Name = 'Cargo Transport 5'; average = DIVIDE(SUM(OrderQty where Name = 'Cargo Transport 5'), COUNT(ShipMethodID))", "gold_sql": "SELECT CAST(SUM(IIF(T1.ShipMethodID = 5, T3.OrderQty, 0)) AS REAL) / COUNT(T3.ProductID) FROM ShipMethod AS T1 INNER JOIN PurchaseOrderHeader AS T2 ON T1.ShipMethodID = T2.ShipMethodID INNER JOIN PurchaseOrderDetail AS T3 ON T2.PurchaseOrderID = T3.PurchaseOrderID", "pred_sql": "SELECT AVG(pod.OrderQty) AS avg_order_qty\nFROM PurchaseOrderDetail AS pod\nJOIN PurchaseOrderHeader AS poh ON pod.PurchaseOrderID = poh.PurchaseOrderID\nJOIN ShipMethod AS sm ON poh.ShipMethodID = sm.ShipMethodID\nWHERE sm.Name = 'CARGO TRANSPORT 5';", "label": "wrong", "unseen": true} {"case_id": "bird_q014_r0", "question_id": "bird/talkingdata/1064", "ds": "bird", "db": "talkingdata", "question": "Provide the app users IDs and time for the event ID of 82.", "evidence": "app user IDs refers to app_id; time refers to timestamp;", "gold_sql": "SELECT T1.app_id, T2.timestamp FROM app_events AS T1 INNER JOIN events AS T2 ON T2.event_id = T1.event_id WHERE T2.event_id = 82", "pred_sql": "SELECT app_events.app_id, events.timestamp\nFROM events\nJOIN app_events ON events.event_id = app_events.event_id\nWHERE events.event_id = 82;", "label": "correct", "unseen": false} {"case_id": "bird_q014_r1", "question_id": "bird/talkingdata/1064", "ds": "bird", "db": "talkingdata", "question": "Provide the app users IDs and time for the event ID of 82.", "evidence": "app user IDs refers to app_id; time refers to timestamp;", "gold_sql": "SELECT T1.app_id, T2.timestamp FROM app_events AS T1 INNER JOIN events AS T2 ON T2.event_id = T1.event_id WHERE T2.event_id = 82", "pred_sql": "SELECT app_events.app_id, events.timestamp\nFROM app_events\nJOIN events ON app_events.event_id = events.event_id\nWHERE app_events.event_id = 82;", "label": "correct", "unseen": false} {"case_id": "bird_q014_r2", "question_id": "bird/talkingdata/1064", "ds": "bird", "db": "talkingdata", "question": "Provide the app users IDs and time for the event ID of 82.", "evidence": "app user IDs refers to app_id; time refers to timestamp;", "gold_sql": "SELECT T1.app_id, T2.timestamp FROM app_events AS T1 INNER JOIN events AS T2 ON T2.event_id = T1.event_id WHERE T2.event_id = 82", "pred_sql": "SELECT app_events.app_id, events.timestamp\nFROM app_events\nJOIN events ON app_events.event_id = events.event_id\nWHERE app_events.event_id = 82;", "label": "correct", "unseen": false} {"case_id": "bird_q014_r3", "question_id": "bird/talkingdata/1064", "ds": "bird", "db": "talkingdata", "question": "Provide the app users IDs and time for the event ID of 82.", "evidence": "app user IDs refers to app_id; time refers to timestamp;", "gold_sql": "SELECT T1.app_id, T2.timestamp FROM app_events AS T1 INNER JOIN events AS T2 ON T2.event_id = T1.event_id WHERE T2.event_id = 82", "pred_sql": "SELECT ea.app_id, e.timestamp\nFROM app_events AS ea\nJOIN events AS e ON ea.event_id = e.event_id\nWHERE ea.event_id = 82;", "label": "correct", "unseen": false} {"case_id": "bird_q015_r0", "question_id": "bird/citeseer/4154", "ds": "bird", "db": "citeseer", "question": "How many papers were cited by schmidt99advanced cited word3555?", "evidence": "paper cited by refers to citing_paper_id; citing_paper_id = 'schmidt99advanced';", "gold_sql": "SELECT COUNT(T2.paper_id) FROM cites AS T1 INNER JOIN content AS T2 ON T1.cited_paper_id = T2.paper_id WHERE T1.citing_paper_id = 'schmidt99advanced' AND T2.word_cited_id = 'word3555'", "pred_sql": "SELECT COUNT(*) FROM content c JOIN cites cit ON c.paper_id = cit.citing_paper_id WHERE cit.citing_paper_id = 'schmidt99advanced' AND c.word_cited_id = 'word3555';", "label": "spurious", "unseen": false} {"case_id": "bird_q015_r1", "question_id": "bird/citeseer/4154", "ds": "bird", "db": "citeseer", "question": "How many papers were cited by schmidt99advanced cited word3555?", "evidence": "paper cited by refers to citing_paper_id; citing_paper_id = 'schmidt99advanced';", "gold_sql": "SELECT COUNT(T2.paper_id) FROM cites AS T1 INNER JOIN content AS T2 ON T1.cited_paper_id = T2.paper_id WHERE T1.citing_paper_id = 'schmidt99advanced' AND T2.word_cited_id = 'word3555'", "pred_sql": "SELECT COUNT(*) FROM content c JOIN cites cit ON c.paper_id = cit.cited_paper_id WHERE c.word_cited_id = 'word3555' AND cit.citing_paper_id = 'schmidt99advanced';", "label": "correct", "unseen": false} {"case_id": "bird_q015_r2", "question_id": "bird/citeseer/4154", "ds": "bird", "db": "citeseer", "question": "How many papers were cited by schmidt99advanced cited word3555?", "evidence": "paper cited by refers to citing_paper_id; citing_paper_id = 'schmidt99advanced';", "gold_sql": "SELECT COUNT(T2.paper_id) FROM cites AS T1 INNER JOIN content AS T2 ON T1.cited_paper_id = T2.paper_id WHERE T1.citing_paper_id = 'schmidt99advanced' AND T2.word_cited_id = 'word3555'", "pred_sql": "SELECT COUNT(*) FROM cites c JOIN content co ON c.citing_paper_id = co.paper_id WHERE co.word_cited_id = 'word3555' AND c.citing_paper_id = 'schmidt99advanced'", "label": "spurious", "unseen": false} {"case_id": "bird_q015_r3", "question_id": "bird/citeseer/4154", "ds": "bird", "db": "citeseer", "question": "How many papers were cited by schmidt99advanced cited word3555?", "evidence": "paper cited by refers to citing_paper_id; citing_paper_id = 'schmidt99advanced';", "gold_sql": "SELECT COUNT(T2.paper_id) FROM cites AS T1 INNER JOIN content AS T2 ON T1.cited_paper_id = T2.paper_id WHERE T1.citing_paper_id = 'schmidt99advanced' AND T2.word_cited_id = 'word3555'", "pred_sql": "SELECT COUNT(*) FROM content c JOIN cites s ON c.paper_id = s.citing_paper_id WHERE s.citing_paper_id = 'schmidt99advanced' AND c.word_cited_id = 'word3555';", "label": "spurious", "unseen": false} {"case_id": "bird_q016_r0", "question_id": "bird/sales/5399", "ds": "bird", "db": "sales", "question": "Calculate the total number of sales closed by Michel E. DeFrance?", "evidence": "", "gold_sql": "SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE T2.FirstName = 'Michel' AND T2.MiddleInitial = 'e' AND T2.LastName = 'DeFrance'", "pred_sql": "SELECT COUNT(*) AS TotalSales\nFROM Sales s\nJOIN Employees e ON s.SalesPersonID = e.EmployeeID\nWHERE e.FirstName = 'Michel'\n AND e.MiddleInitial = 'E'\n AND e.LastName = 'DeFrance';", "label": "wrong", "unseen": true} {"case_id": "bird_q016_r1", "question_id": "bird/sales/5399", "ds": "bird", "db": "sales", "question": "Calculate the total number of sales closed by Michel E. DeFrance?", "evidence": "", "gold_sql": "SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE T2.FirstName = 'Michel' AND T2.MiddleInitial = 'e' AND T2.LastName = 'DeFrance'", "pred_sql": "SELECT COUNT(*) FROM Sales AS s JOIN Employees AS e ON s.SalesPersonID = e.EmployeeID WHERE e.FirstName = 'Michel' AND e.MiddleInitial = 'E' AND e.LastName = 'DeFrance';", "label": "wrong", "unseen": true} {"case_id": "bird_q016_r2", "question_id": "bird/sales/5399", "ds": "bird", "db": "sales", "question": "Calculate the total number of sales closed by Michel E. DeFrance?", "evidence": "", "gold_sql": "SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE T2.FirstName = 'Michel' AND T2.MiddleInitial = 'e' AND T2.LastName = 'DeFrance'", "pred_sql": "SELECT COUNT(*) FROM Sales AS s JOIN Employees AS e ON s.SalesPersonID = e.EmployeeID WHERE e.FirstName = 'Michel' AND e.MiddleInitial = 'E' AND e.LastName = 'DeFrance';", "label": "wrong", "unseen": true} {"case_id": "bird_q016_r3", "question_id": "bird/sales/5399", "ds": "bird", "db": "sales", "question": "Calculate the total number of sales closed by Michel E. DeFrance?", "evidence": "", "gold_sql": "SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE T2.FirstName = 'Michel' AND T2.MiddleInitial = 'e' AND T2.LastName = 'DeFrance'", "pred_sql": "SELECT COUNT(*) AS total_sales\nFROM Sales s\nJOIN Employees e ON s.SalesPersonID = e.EmployeeID\nWHERE e.FirstName = 'Michel' AND e.MiddleInitial = 'e' AND e.LastName = 'DeFrance';", "label": "correct", "unseen": false} {"case_id": "bird_q017_r0", "question_id": "bird/simpson_episodes/4298", "ds": "bird", "db": "simpson_episodes", "question": "List all of the information about the music department's casts and crews.", "evidence": "information about the music department refers to category = 'Music Department'", "gold_sql": "SELECT DISTINCT person, name, birthdate, birth_name, birth_place , birth_region, birth_country, height_meters, nickname FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.category = 'Music Department';", "pred_sql": "SELECT * FROM Credit WHERE category = 'Music Department';", "label": "wrong", "unseen": false} {"case_id": "bird_q017_r1", "question_id": "bird/simpson_episodes/4298", "ds": "bird", "db": "simpson_episodes", "question": "List all of the information about the music department's casts and crews.", "evidence": "information about the music department refers to category = 'Music Department'", "gold_sql": "SELECT DISTINCT person, name, birthdate, birth_name, birth_place , birth_region, birth_country, height_meters, nickname FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.category = 'Music Department';", "pred_sql": "SELECT * FROM Credit WHERE category = 'Music Department';", "label": "wrong", "unseen": false} {"case_id": "bird_q017_r2", "question_id": "bird/simpson_episodes/4298", "ds": "bird", "db": "simpson_episodes", "question": "List all of the information about the music department's casts and crews.", "evidence": "information about the music department refers to category = 'Music Department'", "gold_sql": "SELECT DISTINCT person, name, birthdate, birth_name, birth_place , birth_region, birth_country, height_meters, nickname FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.category = 'Music Department';", "pred_sql": "SELECT * FROM Credit WHERE category = 'Music Department';", "label": "wrong", "unseen": false} {"case_id": "bird_q017_r3", "question_id": "bird/simpson_episodes/4298", "ds": "bird", "db": "simpson_episodes", "question": "List all of the information about the music department's casts and crews.", "evidence": "information about the music department refers to category = 'Music Department'", "gold_sql": "SELECT DISTINCT person, name, birthdate, birth_name, birth_place , birth_region, birth_country, height_meters, nickname FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.category = 'Music Department';", "pred_sql": "SELECT * FROM Credit WHERE category = 'Music Department';", "label": "wrong", "unseen": false} {"case_id": "bird_q018_r0", "question_id": "bird/genes/2500", "ds": "bird", "db": "genes", "question": "If a pair of genes is positively correlated, what is the possibility of it being composed of two genes both with over 10 chromosomes?", "evidence": "Positively correlated means Expression_Corr > 0; Possibility = count(the pairs of genes with both chromosomes over 20) / count(pairs of genes that are positively correlated)", "gold_sql": "SELECT CAST(SUM(IIF(T1.Chromosome > 10 AND T3.Chromosome > 10, 1, 0)) AS REAL) * 100 / COUNT(T1.GeneID) FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 INNER JOIN Genes AS T3 ON T3.GeneID = T2.GeneID2 WHERE T2.Expression_Corr > 0", "pred_sql": "SELECT SUM(CASE WHEN g1.Chromosome > 10 AND g2.Chromosome > 10 THEN 1 ELSE 0 END) * 1.0 / COUNT(*) AS possibility\nFROM Interactions i\nJOIN Genes g1 ON i.GeneID1 = g1.GeneID\nJOIN Genes g2 ON i.GeneID2 = g2.GeneID\nWHERE i.Expression_Corr > 0;", "label": "wrong", "unseen": true} {"case_id": "bird_q018_r1", "question_id": "bird/genes/2500", "ds": "bird", "db": "genes", "question": "If a pair of genes is positively correlated, what is the possibility of it being composed of two genes both with over 10 chromosomes?", "evidence": "Positively correlated means Expression_Corr > 0; Possibility = count(the pairs of genes with both chromosomes over 20) / count(pairs of genes that are positively correlated)", "gold_sql": "SELECT CAST(SUM(IIF(T1.Chromosome > 10 AND T3.Chromosome > 10, 1, 0)) AS REAL) * 100 / COUNT(T1.GeneID) FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 INNER JOIN Genes AS T3 ON T3.GeneID = T2.GeneID2 WHERE T2.Expression_Corr > 0", "pred_sql": "SELECT CAST(SUM(CASE WHEN g1.Chromosome > 10 AND g2.Chromosome > 10 THEN 1 ELSE 0 END) AS REAL) * 100.0 / COUNT(*) AS Possibility\nFROM Interactions i\nJOIN Genes g1 ON i.GeneID1 = g1.GeneID\nJOIN Genes g2 ON i.GeneID2 = g2.GeneID\nWHERE i.Expression_Corr > 0;", "label": "correct", "unseen": false} {"case_id": "bird_q018_r2", "question_id": "bird/genes/2500", "ds": "bird", "db": "genes", "question": "If a pair of genes is positively correlated, what is the possibility of it being composed of two genes both with over 10 chromosomes?", "evidence": "Positively correlated means Expression_Corr > 0; Possibility = count(the pairs of genes with both chromosomes over 20) / count(pairs of genes that are positively correlated)", "gold_sql": "SELECT CAST(SUM(IIF(T1.Chromosome > 10 AND T3.Chromosome > 10, 1, 0)) AS REAL) * 100 / COUNT(T1.GeneID) FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 INNER JOIN Genes AS T3 ON T3.GeneID = T2.GeneID2 WHERE T2.Expression_Corr > 0", "pred_sql": "SELECT COUNT(*) FILTER (WHERE g1.Chromosome > 10 AND g2.Chromosome > 10) * 1.0 / COUNT(*) AS Possibility\nFROM Interactions i\nJOIN Genes g1 ON i.GeneID1 = g1.GeneID\nJOIN Genes g2 ON i.GeneID2 = g2.GeneID\nWHERE i.Expression_Corr > 0;", "label": "wrong", "unseen": true} {"case_id": "bird_q018_r3", "question_id": "bird/genes/2500", "ds": "bird", "db": "genes", "question": "If a pair of genes is positively correlated, what is the possibility of it being composed of two genes both with over 10 chromosomes?", "evidence": "Positively correlated means Expression_Corr > 0; Possibility = count(the pairs of genes with both chromosomes over 20) / count(pairs of genes that are positively correlated)", "gold_sql": "SELECT CAST(SUM(IIF(T1.Chromosome > 10 AND T3.Chromosome > 10, 1, 0)) AS REAL) * 100 / COUNT(T1.GeneID) FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 INNER JOIN Genes AS T3 ON T3.GeneID = T2.GeneID2 WHERE T2.Expression_Corr > 0", "pred_sql": "SELECT SUM(CASE WHEN g1.Chromosome > 10 AND g2.Chromosome > 10 THEN 1 ELSE 0 END) * 1.0 / COUNT(*) AS possibility\nFROM Interactions i\nJOIN Genes g1 ON i.GeneID1 = g1.GeneID\nJOIN Genes g2 ON i.GeneID2 = g2.GeneID\nWHERE i.Expression_Corr > 0;", "label": "wrong", "unseen": true} {"case_id": "bird_q019_r0", "question_id": "bird/works_cycles/7110", "ds": "bird", "db": "works_cycles", "question": "Please list the family names of any employees whose middle names begin with C.", "evidence": "family names refers to Last name; employee refers to PersonType = 'EM'; MiddleName starts with 'C'", "gold_sql": "SELECT LastName FROM Person WHERE PersonType = 'EM' AND MiddleName LIKE 'C%'", "pred_sql": "SELECT LastName\nFROM Person\nWHERE PersonType = 'EM' AND MiddleName LIKE 'C%';", "label": "correct", "unseen": false} {"case_id": "bird_q019_r1", "question_id": "bird/works_cycles/7110", "ds": "bird", "db": "works_cycles", "question": "Please list the family names of any employees whose middle names begin with C.", "evidence": "family names refers to Last name; employee refers to PersonType = 'EM'; MiddleName starts with 'C'", "gold_sql": "SELECT LastName FROM Person WHERE PersonType = 'EM' AND MiddleName LIKE 'C%'", "pred_sql": "SELECT p.LastName\nFROM Person p\nWHERE p.PersonType = 'EM'\n AND p.MiddleName LIKE 'C%'", "label": "correct", "unseen": false} {"case_id": "bird_q019_r2", "question_id": "bird/works_cycles/7110", "ds": "bird", "db": "works_cycles", "question": "Please list the family names of any employees whose middle names begin with C.", "evidence": "family names refers to Last name; employee refers to PersonType = 'EM'; MiddleName starts with 'C'", "gold_sql": "SELECT LastName FROM Person WHERE PersonType = 'EM' AND MiddleName LIKE 'C%'", "pred_sql": "SELECT p.LastName\nFROM Person p\nJOIN Employee e ON e.BusinessEntityID = p.BusinessEntityID\nWHERE p.PersonType = 'EM' AND p.MiddleName LIKE 'C%';", "label": "spurious", "unseen": false} {"case_id": "bird_q019_r3", "question_id": "bird/works_cycles/7110", "ds": "bird", "db": "works_cycles", "question": "Please list the family names of any employees whose middle names begin with C.", "evidence": "family names refers to Last name; employee refers to PersonType = 'EM'; MiddleName starts with 'C'", "gold_sql": "SELECT LastName FROM Person WHERE PersonType = 'EM' AND MiddleName LIKE 'C%'", "pred_sql": "SELECT DISTINCT p.LastName\nFROM Person p\nJOIN Employee e ON e.BusinessEntityID = p.BusinessEntityID\nWHERE p.PersonType = 'EM' AND p.MiddleName LIKE 'C%';", "label": "spurious", "unseen": false} {"case_id": "bird_q020_r0", "question_id": "bird/student_loan/4407", "ds": "bird", "db": "student_loan", "question": "What is the longest students absence duration from school?", "evidence": "longest students absence duration MAX(month)", "gold_sql": "SELECT name, month FROM longest_absense_from_school WHERE `month` = ( SELECT MAX(month) FROM longest_absense_from_school )", "pred_sql": "SELECT MAX(month) AS longest_duration FROM longest_absense_from_school;", "label": "wrong", "unseen": false} {"case_id": "bird_q020_r1", "question_id": "bird/student_loan/4407", "ds": "bird", "db": "student_loan", "question": "What is the longest students absence duration from school?", "evidence": "longest students absence duration MAX(month)", "gold_sql": "SELECT name, month FROM longest_absense_from_school WHERE `month` = ( SELECT MAX(month) FROM longest_absense_from_school )", "pred_sql": "SELECT MAX(month) FROM longest_absense_from_school;", "label": "wrong", "unseen": false} {"case_id": "bird_q020_r2", "question_id": "bird/student_loan/4407", "ds": "bird", "db": "student_loan", "question": "What is the longest students absence duration from school?", "evidence": "longest students absence duration MAX(month)", "gold_sql": "SELECT name, month FROM longest_absense_from_school WHERE `month` = ( SELECT MAX(month) FROM longest_absense_from_school )", "pred_sql": "SELECT MAX(month) FROM longest_absense_from_school;", "label": "wrong", "unseen": false} {"case_id": "bird_q020_r3", "question_id": "bird/student_loan/4407", "ds": "bird", "db": "student_loan", "question": "What is the longest students absence duration from school?", "evidence": "longest students absence duration MAX(month)", "gold_sql": "SELECT name, month FROM longest_absense_from_school WHERE `month` = ( SELECT MAX(month) FROM longest_absense_from_school )", "pred_sql": "SELECT MAX(month) FROM longest_absense_from_school;", "label": "wrong", "unseen": false} {"case_id": "bird_q021_r0", "question_id": "bird/food_inspection/8808", "ds": "bird", "db": "food_inspection", "question": "How many owners have 5 or more establishments?", "evidence": "5 or more establishments COUNT(business_id) > = 5;", "gold_sql": "SELECT COUNT(T1.owner_name) FROM ( SELECT owner_name FROM businesses GROUP BY owner_name HAVING COUNT(owner_name) > 5 ) T1", "pred_sql": "SELECT COUNT(*) FROM (SELECT owner_name FROM businesses GROUP BY owner_name HAVING COUNT(*) >= 5);", "label": "wrong", "unseen": true} {"case_id": "bird_q021_r1", "question_id": "bird/food_inspection/8808", "ds": "bird", "db": "food_inspection", "question": "How many owners have 5 or more establishments?", "evidence": "5 or more establishments COUNT(business_id) > = 5;", "gold_sql": "SELECT COUNT(T1.owner_name) FROM ( SELECT owner_name FROM businesses GROUP BY owner_name HAVING COUNT(owner_name) > 5 ) T1", "pred_sql": "SELECT COUNT(*) FROM (SELECT owner_name FROM businesses GROUP BY owner_name HAVING COUNT(*) >= 5)", "label": "wrong", "unseen": true} {"case_id": "bird_q021_r2", "question_id": "bird/food_inspection/8808", "ds": "bird", "db": "food_inspection", "question": "How many owners have 5 or more establishments?", "evidence": "5 or more establishments COUNT(business_id) > = 5;", "gold_sql": "SELECT COUNT(T1.owner_name) FROM ( SELECT owner_name FROM businesses GROUP BY owner_name HAVING COUNT(owner_name) > 5 ) T1", "pred_sql": "SELECT COUNT(*) FROM (SELECT owner_name FROM businesses GROUP BY owner_name HAVING COUNT(*) >= 5);", "label": "wrong", "unseen": true} {"case_id": "bird_q021_r3", "question_id": "bird/food_inspection/8808", "ds": "bird", "db": "food_inspection", "question": "How many owners have 5 or more establishments?", "evidence": "5 or more establishments COUNT(business_id) > = 5;", "gold_sql": "SELECT COUNT(T1.owner_name) FROM ( SELECT owner_name FROM businesses GROUP BY owner_name HAVING COUNT(owner_name) > 5 ) T1", "pred_sql": "SELECT COUNT(*) FROM (SELECT owner_name FROM businesses GROUP BY owner_name HAVING COUNT(*) >= 5);", "label": "wrong", "unseen": true} {"case_id": "bird_q022_r0", "question_id": "bird/codebase_comments/675", "ds": "bird", "db": "codebase_comments", "question": "Provide the tokenized name of the method \"Sky.Excel.ExcelBook.TypeConvert\".", "evidence": "tokenized name refers to NameTokenized; NameTokenized = 'Sky.Excel.ExcelBook.TypeConvert';", "gold_sql": "SELECT NameTokenized FROM Method WHERE Name = 'Sky.Excel.ExcelBook.TypeConvert'", "pred_sql": "SELECT NameTokenized FROM Method WHERE Name = 'Sky.Excel.ExcelBook.TypeConvert';", "label": "correct", "unseen": false} {"case_id": "bird_q022_r1", "question_id": "bird/codebase_comments/675", "ds": "bird", "db": "codebase_comments", "question": "Provide the tokenized name of the method \"Sky.Excel.ExcelBook.TypeConvert\".", "evidence": "tokenized name refers to NameTokenized; NameTokenized = 'Sky.Excel.ExcelBook.TypeConvert';", "gold_sql": "SELECT NameTokenized FROM Method WHERE Name = 'Sky.Excel.ExcelBook.TypeConvert'", "pred_sql": "SELECT NameTokenized FROM Method WHERE Name = 'Sky.Excel.ExcelBook.TypeConvert';", "label": "correct", "unseen": false} {"case_id": "bird_q022_r2", "question_id": "bird/codebase_comments/675", "ds": "bird", "db": "codebase_comments", "question": "Provide the tokenized name of the method \"Sky.Excel.ExcelBook.TypeConvert\".", "evidence": "tokenized name refers to NameTokenized; NameTokenized = 'Sky.Excel.ExcelBook.TypeConvert';", "gold_sql": "SELECT NameTokenized FROM Method WHERE Name = 'Sky.Excel.ExcelBook.TypeConvert'", "pred_sql": "SELECT NameTokenized FROM Method WHERE Name = 'Sky.Excel.ExcelBook.TypeConvert';", "label": "correct", "unseen": false} {"case_id": "bird_q022_r3", "question_id": "bird/codebase_comments/675", "ds": "bird", "db": "codebase_comments", "question": "Provide the tokenized name of the method \"Sky.Excel.ExcelBook.TypeConvert\".", "evidence": "tokenized name refers to NameTokenized; NameTokenized = 'Sky.Excel.ExcelBook.TypeConvert';", "gold_sql": "SELECT NameTokenized FROM Method WHERE Name = 'Sky.Excel.ExcelBook.TypeConvert'", "pred_sql": "SELECT NameTokenized\nFROM Method\nWHERE Name = 'Sky.Excel.ExcelBook.TypeConvert';", "label": "correct", "unseen": false} {"case_id": "bird_q023_r0", "question_id": "bird/movielens/2272", "ds": "bird", "db": "movielens", "question": "Please list down ID of movies acted by top 5 actors based on actor rating.", "evidence": "", "gold_sql": "SELECT T2.movieid FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid GROUP BY T2.actorid ORDER BY AVG(T1.a_quality) DESC LIMIT 5", "pred_sql": "SELECT m2a.movieid\nFROM movies2actors AS m2a\nJOIN actors AS a ON a.actorid = m2a.actorid\nORDER BY a.a_quality DESC\nLIMIT 5;", "label": "wrong", "unseen": true} {"case_id": "bird_q023_r1", "question_id": "bird/movielens/2272", "ds": "bird", "db": "movielens", "question": "Please list down ID of movies acted by top 5 actors based on actor rating.", "evidence": "", "gold_sql": "SELECT T2.movieid FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid GROUP BY T2.actorid ORDER BY AVG(T1.a_quality) DESC LIMIT 5", "pred_sql": "SELECT m2a.movieid\nFROM movies2actors AS m2a\nJOIN actors AS a ON a.actorid = m2a.actorid\nORDER BY a.a_quality DESC\nLIMIT 5;", "label": "wrong", "unseen": true} {"case_id": "bird_q023_r2", "question_id": "bird/movielens/2272", "ds": "bird", "db": "movielens", "question": "Please list down ID of movies acted by top 5 actors based on actor rating.", "evidence": "", "gold_sql": "SELECT T2.movieid FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid GROUP BY T2.actorid ORDER BY AVG(T1.a_quality) DESC LIMIT 5", "pred_sql": "SELECT DISTINCT m.movieid\nFROM movies m\nJOIN movies2actors ma ON m.movieid = ma.movieid\nJOIN actors a ON ma.actorid = a.actorid\nORDER BY a.a_quality DESC\nLIMIT 5;", "label": "wrong", "unseen": true} {"case_id": "bird_q023_r3", "question_id": "bird/movielens/2272", "ds": "bird", "db": "movielens", "question": "Please list down ID of movies acted by top 5 actors based on actor rating.", "evidence": "", "gold_sql": "SELECT T2.movieid FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid GROUP BY T2.actorid ORDER BY AVG(T1.a_quality) DESC LIMIT 5", "pred_sql": "SELECT m.movieid\nFROM movies2actors AS m2a\nJOIN actors AS a ON m2a.actorid = a.actorid\nGROUP BY m2a.movieid\nORDER BY COUNT(*) DESC\nLIMIT 5;", "label": "wrong", "unseen": true} {"case_id": "bird_q024_r0", "question_id": "bird/movie_platform/73", "ds": "bird", "db": "movie_platform", "question": "How many users were trialists when they rated the movie \"A Way of Life\"?", "evidence": "A Way of Life' refers to movie_title; the user was a trialist when he rated the movie refers to user_trialist = 1;", "gold_sql": "SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'When Will I Be Loved' AND T1.user_trialist = 1", "pred_sql": "SELECT COUNT(*) FROM ratings r JOIN movies m ON r.movie_id = m.movie_id WHERE m.movie_title = 'A Way of Life' AND r.user_trialist = 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q024_r1", "question_id": "bird/movie_platform/73", "ds": "bird", "db": "movie_platform", "question": "How many users were trialists when they rated the movie \"A Way of Life\"?", "evidence": "A Way of Life' refers to movie_title; the user was a trialist when he rated the movie refers to user_trialist = 1;", "gold_sql": "SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'When Will I Be Loved' AND T1.user_trialist = 1", "pred_sql": "SELECT COUNT(*) FROM ratings r JOIN movies m ON r.movie_id = m.movie_id WHERE m.movie_title = 'A Way of Life' AND r.user_trialist = 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q024_r2", "question_id": "bird/movie_platform/73", "ds": "bird", "db": "movie_platform", "question": "How many users were trialists when they rated the movie \"A Way of Life\"?", "evidence": "A Way of Life' refers to movie_title; the user was a trialist when he rated the movie refers to user_trialist = 1;", "gold_sql": "SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'When Will I Be Loved' AND T1.user_trialist = 1", "pred_sql": "SELECT COUNT(*) FROM ratings r JOIN movies m ON r.movie_id = m.movie_id WHERE m.movie_title = 'A Way of Life' AND r.user_trialist = 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q024_r3", "question_id": "bird/movie_platform/73", "ds": "bird", "db": "movie_platform", "question": "How many users were trialists when they rated the movie \"A Way of Life\"?", "evidence": "A Way of Life' refers to movie_title; the user was a trialist when he rated the movie refers to user_trialist = 1;", "gold_sql": "SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'When Will I Be Loved' AND T1.user_trialist = 1", "pred_sql": "SELECT COUNT(*) AS trialist_count\nFROM ratings r\nJOIN movies m ON r.movie_id = m.movie_id\nJOIN ratings_users ru ON r.user_id = ru.user_id\nWHERE m.movie_title = 'A Way of Life'\n AND ru.user_trialist = 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q025_r0", "question_id": "bird/talkingdata/1133", "ds": "bird", "db": "talkingdata", "question": "For the event which happened at 14:09:49 on 2016/5/6, in the location coordinate(116, 40), how many apps were active?", "evidence": "at 14:09:49 on 2016/5/6 refers to timestamp = '2016/5/6 14:09:49'; location coordinate(116, 40) refers to longitude = '116' AND latitude = '40'; active refers to is_active = '1';", "gold_sql": "SELECT COUNT(T1.app_id) FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id WHERE T2.timestamp = '2016-05-06 14:09:49' AND T1.is_active = '1' AND T2.longitude = '116' AND T2.latitude = '40'", "pred_sql": "SELECT COUNT(*) FROM app_events AS ae JOIN events AS e ON ae.event_id = e.event_id WHERE e.timestamp = '2016-05-06 14:09:49' AND e.longitude = '116' AND e.latitude = '40' AND ae.is_active = 1;", "label": "correct", "unseen": true} {"case_id": "bird_q025_r1", "question_id": "bird/talkingdata/1133", "ds": "bird", "db": "talkingdata", "question": "For the event which happened at 14:09:49 on 2016/5/6, in the location coordinate(116, 40), how many apps were active?", "evidence": "at 14:09:49 on 2016/5/6 refers to timestamp = '2016/5/6 14:09:49'; location coordinate(116, 40) refers to longitude = '116' AND latitude = '40'; active refers to is_active = '1';", "gold_sql": "SELECT COUNT(T1.app_id) FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id WHERE T2.timestamp = '2016-05-06 14:09:49' AND T1.is_active = '1' AND T2.longitude = '116' AND T2.latitude = '40'", "pred_sql": "SELECT COUNT(*) FROM events e JOIN app_events a ON e.event_id = a.event_id WHERE e.timestamp = '2016-05-06 14:09:49' AND e.longitude = 116.0 AND e.latitude = 40.0 AND a.is_active = 1;", "label": "correct", "unseen": true} {"case_id": "bird_q025_r2", "question_id": "bird/talkingdata/1133", "ds": "bird", "db": "talkingdata", "question": "For the event which happened at 14:09:49 on 2016/5/6, in the location coordinate(116, 40), how many apps were active?", "evidence": "at 14:09:49 on 2016/5/6 refers to timestamp = '2016/5/6 14:09:49'; location coordinate(116, 40) refers to longitude = '116' AND latitude = '40'; active refers to is_active = '1';", "gold_sql": "SELECT COUNT(T1.app_id) FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id WHERE T2.timestamp = '2016-05-06 14:09:49' AND T1.is_active = '1' AND T2.longitude = '116' AND T2.latitude = '40'", "pred_sql": "SELECT COUNT(*) FROM events e JOIN app_events a ON e.event_id = a.event_id WHERE e.timestamp = '2016-05-06 14:09:49' AND e.longitude = 116 AND e.latitude = 40 AND a.is_active = 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q025_r3", "question_id": "bird/talkingdata/1133", "ds": "bird", "db": "talkingdata", "question": "For the event which happened at 14:09:49 on 2016/5/6, in the location coordinate(116, 40), how many apps were active?", "evidence": "at 14:09:49 on 2016/5/6 refers to timestamp = '2016/5/6 14:09:49'; location coordinate(116, 40) refers to longitude = '116' AND latitude = '40'; active refers to is_active = '1';", "gold_sql": "SELECT COUNT(T1.app_id) FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id WHERE T2.timestamp = '2016-05-06 14:09:49' AND T1.is_active = '1' AND T2.longitude = '116' AND T2.latitude = '40'", "pred_sql": "SELECT COUNT(*) \nFROM events e\nJOIN app_events ae ON e.event_id = ae.event_id\nWHERE e.timestamp = '2016-05-06 14:09:49'\n AND e.longitude = 116\n AND e.latitude = 40\n AND ae.is_active = 1;", "label": "correct", "unseen": true} {"case_id": "bird_q026_r0", "question_id": "bird/university/8126", "ds": "bird", "db": "university", "question": "Calculate number of male students in Emory University in 2011.", "evidence": "in 2011 refers to year 2011; number of male students refers to SUBTRACT(num_students, DIVIDE(MULTIPLY(num_students, pct_male_students), 100)); in Emory University refers to university_name = 'Emory University'", "gold_sql": "SELECT CAST((T1.num_students - (T1.num_students * T1.pct_female_students)) AS REAL) / 100 FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Emory University' AND T1.year = 2011", "pred_sql": "SELECT (ny.num_students - (ny.num_students * ny.pct_female_students / 100.0)) AS male_students\nFROM university u\nJOIN university_year ny ON u.id = ny.university_id\nWHERE u.university_name = 'Emory University' AND ny.year = 2011;", "label": "wrong", "unseen": true} {"case_id": "bird_q026_r1", "question_id": "bird/university/8126", "ds": "bird", "db": "university", "question": "Calculate number of male students in Emory University in 2011.", "evidence": "in 2011 refers to year 2011; number of male students refers to SUBTRACT(num_students, DIVIDE(MULTIPLY(num_students, pct_male_students), 100)); in Emory University refers to university_name = 'Emory University'", "gold_sql": "SELECT CAST((T1.num_students - (T1.num_students * T1.pct_female_students)) AS REAL) / 100 FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Emory University' AND T1.year = 2011", "pred_sql": "SELECT uv.num_students - (uv.num_students * (100.0 - ury.pct_female_students) / 100.0) AS male_students\nFROM university u\nJOIN university_year uv ON u.id = uv.university_id\nJOIN university_ranking_year ury ON uv.id = ury.university_id\nWHERE u.university_name = 'Emory University'\n AND ury.year = 2011;", "label": "wrong", "unseen": true} {"case_id": "bird_q026_r2", "question_id": "bird/university/8126", "ds": "bird", "db": "university", "question": "Calculate number of male students in Emory University in 2011.", "evidence": "in 2011 refers to year 2011; number of male students refers to SUBTRACT(num_students, DIVIDE(MULTIPLY(num_students, pct_male_students), 100)); in Emory University refers to university_name = 'Emory University'", "gold_sql": "SELECT CAST((T1.num_students - (T1.num_students * T1.pct_female_students)) AS REAL) / 100 FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Emory University' AND T1.year = 2011", "pred_sql": "SELECT (uy.num_students - (uy.num_students * uy.pct_female_students) / 100.0) AS male_students\nFROM university u\nJOIN university_year uy ON u.id = uy.university_id\nWHERE u.university_name = 'Emory University' AND uy.year = 2011;", "label": "wrong", "unseen": true} {"case_id": "bird_q026_r3", "question_id": "bird/university/8126", "ds": "bird", "db": "university", "question": "Calculate number of male students in Emory University in 2011.", "evidence": "in 2011 refers to year 2011; number of male students refers to SUBTRACT(num_students, DIVIDE(MULTIPLY(num_students, pct_male_students), 100)); in Emory University refers to university_name = 'Emory University'", "gold_sql": "SELECT CAST((T1.num_students - (T1.num_students * T1.pct_female_students)) AS REAL) / 100 FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Emory University' AND T1.year = 2011", "pred_sql": "SELECT (uy.num_students * (100 - uyr.pct_female_students)) / 100 AS male_students\nFROM university u\nJOIN university_year uyr ON u.id = uyr.university_id\nWHERE u.university_name = 'Emory University'\n AND uyr.year = 2011;", "label": "wrong", "unseen": true} {"case_id": "bird_q027_r0", "question_id": "bird/works_cycles/7083", "ds": "bird", "db": "works_cycles", "question": "What percentage of people named Mary who wants Receive Email promotions of AdventureWorks and selected partners are store contacts?", "evidence": "wants Receive Email promotions of AdventureWorks and selected partners refers to EmailPromotion = 2; store contact refers to PersonType = 'SC'; percentage = DIVIDE(count(BusinessEntityID(FirstName = 'Marry'&EmailPromotion = '2')),count(BusinessEntityID)))", "gold_sql": "SELECT CAST(SUM(CASE WHEN EmailPromotion = 2 THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN PersonType = 'SC' THEN 1 ELSE 0 END) FROM Person WHERE FirstName = 'Mary'", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN p.EmailPromotion = 2 THEN 1 ELSE 0 END) / COUNT(*) AS percentage\nFROM Person p\nWHERE p.FirstName = 'Mary'\n AND p.PersonType = 'SC';", "label": "wrong", "unseen": true} {"case_id": "bird_q027_r1", "question_id": "bird/works_cycles/7083", "ds": "bird", "db": "works_cycles", "question": "What percentage of people named Mary who wants Receive Email promotions of AdventureWorks and selected partners are store contacts?", "evidence": "wants Receive Email promotions of AdventureWorks and selected partners refers to EmailPromotion = 2; store contact refers to PersonType = 'SC'; percentage = DIVIDE(count(BusinessEntityID(FirstName = 'Marry'&EmailPromotion = '2')),count(BusinessEntityID)))", "gold_sql": "SELECT CAST(SUM(CASE WHEN EmailPromotion = 2 THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN PersonType = 'SC' THEN 1 ELSE 0 END) FROM Person WHERE FirstName = 'Mary'", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN p.PersonType = 'SC' THEN 1 ELSE 0 END) / COUNT(*) AS Percentage\nFROM Person p\nJOIN EmailAddress ea ON p.BusinessEntityID = ea.BusinessEntityID\nWHERE p.FirstName = 'Marry' AND p.EmailPromotion = 2;", "label": "wrong", "unseen": true} {"case_id": "bird_q027_r2", "question_id": "bird/works_cycles/7083", "ds": "bird", "db": "works_cycles", "question": "What percentage of people named Mary who wants Receive Email promotions of AdventureWorks and selected partners are store contacts?", "evidence": "wants Receive Email promotions of AdventureWorks and selected partners refers to EmailPromotion = 2; store contact refers to PersonType = 'SC'; percentage = DIVIDE(count(BusinessEntityID(FirstName = 'Marry'&EmailPromotion = '2')),count(BusinessEntityID)))", "gold_sql": "SELECT CAST(SUM(CASE WHEN EmailPromotion = 2 THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN PersonType = 'SC' THEN 1 ELSE 0 END) FROM Person WHERE FirstName = 'Mary'", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN p.PersonType = 'SC' THEN 1 ELSE 0 END) / COUNT(*) AS percentage\nFROM Person p\nJOIN EmailAddress ea ON ea.BusinessEntityID = p.BusinessEntityID\nWHERE p.FirstName = 'Mary' AND p.EmailPromotion = 2;", "label": "wrong", "unseen": true} {"case_id": "bird_q027_r3", "question_id": "bird/works_cycles/7083", "ds": "bird", "db": "works_cycles", "question": "What percentage of people named Mary who wants Receive Email promotions of AdventureWorks and selected partners are store contacts?", "evidence": "wants Receive Email promotions of AdventureWorks and selected partners refers to EmailPromotion = 2; store contact refers to PersonType = 'SC'; percentage = DIVIDE(count(BusinessEntityID(FirstName = 'Marry'&EmailPromotion = '2')),count(BusinessEntityID)))", "gold_sql": "SELECT CAST(SUM(CASE WHEN EmailPromotion = 2 THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN PersonType = 'SC' THEN 1 ELSE 0 END) FROM Person WHERE FirstName = 'Mary'", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN p.PersonType = 'SC' THEN 1 ELSE 0 END) / COUNT(*) AS percentage\nFROM Person p\nWHERE p.FirstName = 'Mary'\n AND p.EmailPromotion = 2;", "label": "wrong", "unseen": true} {"case_id": "bird_q028_r0", "question_id": "bird/beer_factory/5338", "ds": "bird", "db": "beer_factory", "question": "List out the root beer ID for the brand Bulldog, Bundaberg, Dad's, Dog n Suds and Virgil's.", "evidence": "Bulldog, Bundaberg, Dad's, Dog n Suds and Virgil's refers to BrandName IN('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s');", "gold_sql": "SELECT T1.RootBeerID FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T2.BrandID = T1.BrandID WHERE T2.BrandName IN ('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s')", "pred_sql": "SELECT r.RootBeerID\nFROM rootbeer AS r\nJOIN rootbeerbrand AS b\n ON r.BrandID = b.BrandID\nWHERE b.BrandName IN ('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s');", "label": "correct", "unseen": false} {"case_id": "bird_q028_r1", "question_id": "bird/beer_factory/5338", "ds": "bird", "db": "beer_factory", "question": "List out the root beer ID for the brand Bulldog, Bundaberg, Dad's, Dog n Suds and Virgil's.", "evidence": "Bulldog, Bundaberg, Dad's, Dog n Suds and Virgil's refers to BrandName IN('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s');", "gold_sql": "SELECT T1.RootBeerID FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T2.BrandID = T1.BrandID WHERE T2.BrandName IN ('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s')", "pred_sql": "SELECT rb.RootBeerID\nFROM rootbeer rb\nJOIN rootbeerbrand rbb ON rb.BrandID = rbb.BrandID\nWHERE rbb.BrandName IN ('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s');", "label": "correct", "unseen": false} {"case_id": "bird_q028_r2", "question_id": "bird/beer_factory/5338", "ds": "bird", "db": "beer_factory", "question": "List out the root beer ID for the brand Bulldog, Bundaberg, Dad's, Dog n Suds and Virgil's.", "evidence": "Bulldog, Bundaberg, Dad's, Dog n Suds and Virgil's refers to BrandName IN('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s');", "gold_sql": "SELECT T1.RootBeerID FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T2.BrandID = T1.BrandID WHERE T2.BrandName IN ('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s')", "pred_sql": "SELECT r.RootBeerID\nFROM rootbeer r\nJOIN rootbeerbrand b ON r.BrandID = b.BrandID\nWHERE b.BrandName IN ('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s');", "label": "correct", "unseen": false} {"case_id": "bird_q028_r3", "question_id": "bird/beer_factory/5338", "ds": "bird", "db": "beer_factory", "question": "List out the root beer ID for the brand Bulldog, Bundaberg, Dad's, Dog n Suds and Virgil's.", "evidence": "Bulldog, Bundaberg, Dad's, Dog n Suds and Virgil's refers to BrandName IN('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s');", "gold_sql": "SELECT T1.RootBeerID FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T2.BrandID = T1.BrandID WHERE T2.BrandName IN ('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s')", "pred_sql": "SELECT r.RootBeerID\nFROM rootbeer r\nJOIN rootbeerbrand b ON r.BrandID = b.BrandID\nWHERE b.BrandName IN ('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s');", "label": "correct", "unseen": false} {"case_id": "bird_q029_r0", "question_id": "bird/retails/6721", "ds": "bird", "db": "retails", "question": "How much is the profit for smoke turquoise purple blue salmon that was delivered in person on 5/7/1996?", "evidence": "SUBTRACT(MULTIPLY(l_extendedprice, (SUBTRACT(1, l_discount)), MULTIPLY(ps_supplycost, l_quantity))) where p_name = 'smoke turquoise purple blue salmon' and l_receiptdate = '1996-05-07' and l_shipinstruct = 'DELIVER IN PERSON';", "gold_sql": "SELECT T1.l_extendedprice * (1 - T1.l_discount) - T2.ps_supplycost * T1.l_quantity AS num FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.l_suppkey = T2.ps_suppkey INNER JOIN part AS T3 ON T2.ps_partkey = T3.p_partkey WHERE T1.l_receiptdate = '1996-05-07' AND T1.l_shipinstruct = 'DELIVER IN PERSON' AND T3.p_name = 'smoke turquoise purple blue salmon'", "pred_sql": "SELECT (l.l_extendedprice * (1 - l.l_discount) - ps.ps_supplycost * l.l_quantity) AS profit\nFROM lineitem l\nJOIN part p ON l.l_partkey = p.p_partkey\nJOIN partsupp ps ON l.l_partkey = ps.ps_partkey AND l.l_suppkey = ps.ps_suppkey\nWHERE p.p_name = 'smoke turquoise purple blue salmon'\n AND l.l_receiptdate = '1996-05-07'\n AND l.l_shipinstruct = 'DELIVER IN PERSON';", "label": "spurious", "unseen": true} {"case_id": "bird_q029_r1", "question_id": "bird/retails/6721", "ds": "bird", "db": "retails", "question": "How much is the profit for smoke turquoise purple blue salmon that was delivered in person on 5/7/1996?", "evidence": "SUBTRACT(MULTIPLY(l_extendedprice, (SUBTRACT(1, l_discount)), MULTIPLY(ps_supplycost, l_quantity))) where p_name = 'smoke turquoise purple blue salmon' and l_receiptdate = '1996-05-07' and l_shipinstruct = 'DELIVER IN PERSON';", "gold_sql": "SELECT T1.l_extendedprice * (1 - T1.l_discount) - T2.ps_supplycost * T1.l_quantity AS num FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.l_suppkey = T2.ps_suppkey INNER JOIN part AS T3 ON T2.ps_partkey = T3.p_partkey WHERE T1.l_receiptdate = '1996-05-07' AND T1.l_shipinstruct = 'DELIVER IN PERSON' AND T3.p_name = 'smoke turquoise purple blue salmon'", "pred_sql": "SELECT (l.l_extendedprice * (1 - l.l_discount) - ps.ps_supplycost * l.l_quantity) AS profit\nFROM lineitem l\nJOIN part p ON l.l_partkey = p.p_partkey\nJOIN partsupp ps ON l.l_partkey = ps.ps_partkey AND l.l_suppkey = ps.ps_suppkey\nWHERE p.p_name = 'smoke turquoise purple blue salmon'\n AND l.l_receiptdate = '1996-05-07'\n AND l.l_shipinstruct = 'DELIVER IN PERSON';", "label": "spurious", "unseen": true} {"case_id": "bird_q029_r2", "question_id": "bird/retails/6721", "ds": "bird", "db": "retails", "question": "How much is the profit for smoke turquoise purple blue salmon that was delivered in person on 5/7/1996?", "evidence": "SUBTRACT(MULTIPLY(l_extendedprice, (SUBTRACT(1, l_discount)), MULTIPLY(ps_supplycost, l_quantity))) where p_name = 'smoke turquoise purple blue salmon' and l_receiptdate = '1996-05-07' and l_shipinstruct = 'DELIVER IN PERSON';", "gold_sql": "SELECT T1.l_extendedprice * (1 - T1.l_discount) - T2.ps_supplycost * T1.l_quantity AS num FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.l_suppkey = T2.ps_suppkey INNER JOIN part AS T3 ON T2.ps_partkey = T3.p_partkey WHERE T1.l_receiptdate = '1996-05-07' AND T1.l_shipinstruct = 'DELIVER IN PERSON' AND T3.p_name = 'smoke turquoise purple blue salmon'", "pred_sql": "SELECT (l.l_extendedprice * (1 - l.l_discount) - ps.ps_supplycost * l.l_quantity) AS profit\nFROM lineitem l\nJOIN partsupp ps ON l.l_suppkey = ps.ps_suppkey AND l.l_partkey = ps.ps_partkey\nJOIN part p ON l.l_partkey = p.p_partkey\nWHERE l.l_receiptdate = '1996-05-07'\n AND l.l_shipinstruct = 'DELIVER IN PERSON'\n AND p.p_name = 'smoke turquoise purple blue salmon';", "label": "spurious", "unseen": true} {"case_id": "bird_q029_r3", "question_id": "bird/retails/6721", "ds": "bird", "db": "retails", "question": "How much is the profit for smoke turquoise purple blue salmon that was delivered in person on 5/7/1996?", "evidence": "SUBTRACT(MULTIPLY(l_extendedprice, (SUBTRACT(1, l_discount)), MULTIPLY(ps_supplycost, l_quantity))) where p_name = 'smoke turquoise purple blue salmon' and l_receiptdate = '1996-05-07' and l_shipinstruct = 'DELIVER IN PERSON';", "gold_sql": "SELECT T1.l_extendedprice * (1 - T1.l_discount) - T2.ps_supplycost * T1.l_quantity AS num FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.l_suppkey = T2.ps_suppkey INNER JOIN part AS T3 ON T2.ps_partkey = T3.p_partkey WHERE T1.l_receiptdate = '1996-05-07' AND T1.l_shipinstruct = 'DELIVER IN PERSON' AND T3.p_name = 'smoke turquoise purple blue salmon'", "pred_sql": "SELECT (l.l_extendedprice * (1 - l.l_discount) - ps.ps_supplycost * l.l_quantity) AS profit\nFROM lineitem AS l\nJOIN partsupp AS ps ON ps.ps_partkey = l.l_partkey AND ps.ps_suppkey = l.l_suppkey\nJOIN part AS p ON p.p_partkey = l.l_partkey\nWHERE p.p_name = 'smoke turquoise purple blue salmon'\n AND l.l_receiptdate = '1996-05-07'\n AND l.l_shipinstruct = 'DELIVER IN PERSON';", "label": "spurious", "unseen": true} {"case_id": "bird_q030_r0", "question_id": "bird/olympics/4920", "ds": "bird", "db": "olympics", "question": "Among all the Olympic competitors from Finland, how many of them are female?", "evidence": "competitors from Finland refer to id where region_name = 'Finland'; female refers to gender = 'F';", "gold_sql": "SELECT COUNT(T3.id) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Finland' AND T3.gender = 'F'", "pred_sql": "SELECT COUNT(*) FROM person p JOIN person_region pr ON p.id = pr.person_id JOIN noc_region nr ON pr.region_id = nr.id WHERE nr.region_name = 'Finland' AND p.gender = 'F';", "label": "correct", "unseen": false} {"case_id": "bird_q030_r1", "question_id": "bird/olympics/4920", "ds": "bird", "db": "olympics", "question": "Among all the Olympic competitors from Finland, how many of them are female?", "evidence": "competitors from Finland refer to id where region_name = 'Finland'; female refers to gender = 'F';", "gold_sql": "SELECT COUNT(T3.id) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Finland' AND T3.gender = 'F'", "pred_sql": "SELECT COUNT(*) \nFROM person_region pr\nJOIN noc_region nr ON pr.region_id = nr.id\nJOIN person p ON pr.person_id = p.id\nWHERE nr.region_name = 'Finland'\n AND p.gender = 'F';", "label": "correct", "unseen": false} {"case_id": "bird_q030_r2", "question_id": "bird/olympics/4920", "ds": "bird", "db": "olympics", "question": "Among all the Olympic competitors from Finland, how many of them are female?", "evidence": "competitors from Finland refer to id where region_name = 'Finland'; female refers to gender = 'F';", "gold_sql": "SELECT COUNT(T3.id) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Finland' AND T3.gender = 'F'", "pred_sql": "SELECT COUNT(*) FROM person p JOIN person_region pr ON p.id = pr.person_id JOIN noc_region nr ON pr.region_id = nr.id WHERE nr.region_name = 'Finland' AND p.gender = 'F';", "label": "correct", "unseen": false} {"case_id": "bird_q030_r3", "question_id": "bird/olympics/4920", "ds": "bird", "db": "olympics", "question": "Among all the Olympic competitors from Finland, how many of them are female?", "evidence": "competitors from Finland refer to id where region_name = 'Finland'; female refers to gender = 'F';", "gold_sql": "SELECT COUNT(T3.id) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Finland' AND T3.gender = 'F'", "pred_sql": "SELECT COUNT(*) FROM person p JOIN person_region pr ON p.id = pr.person_id JOIN noc_region nr ON pr.region_id = nr.id WHERE nr.region_name = 'Finland' AND p.gender = 'F';", "label": "correct", "unseen": false} {"case_id": "bird_q031_r0", "question_id": "bird/professional_basketball/2901", "ds": "bird", "db": "professional_basketball", "question": "Which player selected by Portland in 2nd draftRound won Rookie of the Year in 1971?", "evidence": "2nd draftRound refers to draftRound = 2; won Rookie of the Year refers to award = 'Rookie of the Year'; in 1971 refers to draftYear = 1971", "gold_sql": "SELECT T1.playerID FROM draft AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Rookie of the Year' AND T1.draftYear = 1971 AND T1.draftRound = 2", "pred_sql": "SELECT d.playerID\nFROM draft d\nJOIN awards_players ap ON ap.playerID = d.playerID\nJOIN teams t ON t.tmID = d.tmID AND t.year = d.draftYear\nWHERE d.draftYear = 1971\n AND d.draftRound = 2\n AND ap.award = 'Rookie of the Year'\n AND t.name = 'Portland Trail Blazers';", "label": "wrong", "unseen": true} {"case_id": "bird_q031_r1", "question_id": "bird/professional_basketball/2901", "ds": "bird", "db": "professional_basketball", "question": "Which player selected by Portland in 2nd draftRound won Rookie of the Year in 1971?", "evidence": "2nd draftRound refers to draftRound = 2; won Rookie of the Year refers to award = 'Rookie of the Year'; in 1971 refers to draftYear = 1971", "gold_sql": "SELECT T1.playerID FROM draft AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Rookie of the Year' AND T1.draftYear = 1971 AND T1.draftRound = 2", "pred_sql": "SELECT p.firstName, p.lastName\nFROM players p\nJOIN draft d ON p.playerID = d.playerID\nJOIN awards_players ap ON p.playerID = ap.playerID\nJOIN teams t ON d.tmID = t.tmID\nWHERE d.draftYear = 1971\n AND d.draftRound = 2\n AND t.name = 'Portland'\n AND ap.award = 'Rookie of the Year';", "label": "wrong", "unseen": true} {"case_id": "bird_q031_r2", "question_id": "bird/professional_basketball/2901", "ds": "bird", "db": "professional_basketball", "question": "Which player selected by Portland in 2nd draftRound won Rookie of the Year in 1971?", "evidence": "2nd draftRound refers to draftRound = 2; won Rookie of the Year refers to award = 'Rookie of the Year'; in 1971 refers to draftYear = 1971", "gold_sql": "SELECT T1.playerID FROM draft AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Rookie of the Year' AND T1.draftYear = 1971 AND T1.draftRound = 2", "pred_sql": "SELECT p.firstName, p.lastName\nFROM draft d\nJOIN awards_players ap ON d.playerID = ap.playerID\nJOIN players p ON ap.playerID = p.playerID\nWHERE d.draftYear = 1971\n AND d.draftRound = 2\n AND ap.award = 'Rookie of the Year'\n AND d.tmID = 'ANA';", "label": "wrong", "unseen": true} {"case_id": "bird_q031_r3", "question_id": "bird/professional_basketball/2901", "ds": "bird", "db": "professional_basketball", "question": "Which player selected by Portland in 2nd draftRound won Rookie of the Year in 1971?", "evidence": "2nd draftRound refers to draftRound = 2; won Rookie of the Year refers to award = 'Rookie of the Year'; in 1971 refers to draftYear = 1971", "gold_sql": "SELECT T1.playerID FROM draft AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Rookie of the Year' AND T1.draftYear = 1971 AND T1.draftRound = 2", "pred_sql": "SELECT draft.playerID\nFROM draft\nJOIN awards_players ON draft.playerID = awards_players.playerID\nWHERE awards_players.award = 'Rookie of the Year'\n AND awards_players.year = 1971\n AND draft.draftYear = 1971\n AND draft.draftRound = 2\n AND draft.tmID = 'POR';", "label": "wrong", "unseen": true} {"case_id": "bird_q032_r0", "question_id": "bird/synthea/1446", "ds": "bird", "db": "synthea", "question": "How many of the patients who have stopped taking medication for 'coronary heart disease' are still alive?", "evidence": "patients who have stopped taking medication for 'coronary heart disease' refer to PATIENT where REASONDESCRIPTION = 'Coronary Heart Disease' and STOP is not null from medications; if deathdate is null, it means this patient is still alive;", "gold_sql": "SELECT COUNT(DISTINCT T2.patient) FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.REASONDESCRIPTION = 'Coronary Heart Disease' AND T1.STOP IS NOT NULL AND T2.deathdate IS NULL", "pred_sql": "SELECT COUNT(*) FROM medications AS m JOIN patients AS p ON m.PATIENT = p.patient WHERE m.REASONDESCRIPTION = 'Coronary Heart Disease' AND m.STOP IS NOT NULL AND p.deathdate IS NULL;", "label": "wrong", "unseen": false} {"case_id": "bird_q032_r1", "question_id": "bird/synthea/1446", "ds": "bird", "db": "synthea", "question": "How many of the patients who have stopped taking medication for 'coronary heart disease' are still alive?", "evidence": "patients who have stopped taking medication for 'coronary heart disease' refer to PATIENT where REASONDESCRIPTION = 'Coronary Heart Disease' and STOP is not null from medications; if deathdate is null, it means this patient is still alive;", "gold_sql": "SELECT COUNT(DISTINCT T2.patient) FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.REASONDESCRIPTION = 'Coronary Heart Disease' AND T1.STOP IS NOT NULL AND T2.deathdate IS NULL", "pred_sql": "SELECT COUNT(*) FROM medications m\nJOIN patients p ON m.PATIENT = p.patient\nWHERE m.REASONDESCRIPTION = 'Coronary Heart Disease'\n AND m.STOP IS NOT NULL\n AND p.deathdate IS NULL;", "label": "wrong", "unseen": false} {"case_id": "bird_q032_r2", "question_id": "bird/synthea/1446", "ds": "bird", "db": "synthea", "question": "How many of the patients who have stopped taking medication for 'coronary heart disease' are still alive?", "evidence": "patients who have stopped taking medication for 'coronary heart disease' refer to PATIENT where REASONDESCRIPTION = 'Coronary Heart Disease' and STOP is not null from medications; if deathdate is null, it means this patient is still alive;", "gold_sql": "SELECT COUNT(DISTINCT T2.patient) FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.REASONDESCRIPTION = 'Coronary Heart Disease' AND T1.STOP IS NOT NULL AND T2.deathdate IS NULL", "pred_sql": "SELECT COUNT(*) FROM medications m\nJOIN patients p ON m.PATIENT = p.patient\nWHERE m.REASONDESCRIPTION = 'Coronary Heart Disease'\n AND m.STOP IS NOT NULL\n AND p.deathdate IS NULL;", "label": "wrong", "unseen": false} {"case_id": "bird_q032_r3", "question_id": "bird/synthea/1446", "ds": "bird", "db": "synthea", "question": "How many of the patients who have stopped taking medication for 'coronary heart disease' are still alive?", "evidence": "patients who have stopped taking medication for 'coronary heart disease' refer to PATIENT where REASONDESCRIPTION = 'Coronary Heart Disease' and STOP is not null from medications; if deathdate is null, it means this patient is still alive;", "gold_sql": "SELECT COUNT(DISTINCT T2.patient) FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.REASONDESCRIPTION = 'Coronary Heart Disease' AND T1.STOP IS NOT NULL AND T2.deathdate IS NULL", "pred_sql": "SELECT COUNT(*)\nFROM medications m\nJOIN patients p ON m.PATIENT = p.patient\nWHERE m.REASONDESCRIPTION = 'Coronary Heart Disease'\n AND m.STOP IS NOT NULL\n AND p.deathdate IS NULL;", "label": "wrong", "unseen": false} {"case_id": "bird_q033_r0", "question_id": "bird/movielens/2254", "ds": "bird", "db": "movielens", "question": "What is the average number of casts of movies that are from the USA?", "evidence": "USA is a country", "gold_sql": "SELECT AVG(T2.cast_num) FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid WHERE T1.country = 'USA'", "pred_sql": "SELECT AVG(cnt) AS avg_casts\nFROM (\n SELECT COUNT(*) AS cnt\n FROM movies2actors ma\n JOIN movies m ON m.movieid = ma.movieid\n WHERE m.country = 'USA'\n GROUP BY ma.movieid\n);", "label": "wrong", "unseen": true} {"case_id": "bird_q033_r1", "question_id": "bird/movielens/2254", "ds": "bird", "db": "movielens", "question": "What is the average number of casts of movies that are from the USA?", "evidence": "USA is a country", "gold_sql": "SELECT AVG(T2.cast_num) FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid WHERE T1.country = 'USA'", "pred_sql": "SELECT AVG(m2a.cast_num) AS avg_casts\nFROM movies2actors m2a\nJOIN movies m ON m2a.movieid = m.movieid\nWHERE m.country = 'USA';", "label": "correct", "unseen": false} {"case_id": "bird_q033_r2", "question_id": "bird/movielens/2254", "ds": "bird", "db": "movielens", "question": "What is the average number of casts of movies that are from the USA?", "evidence": "USA is a country", "gold_sql": "SELECT AVG(T2.cast_num) FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid WHERE T1.country = 'USA'", "pred_sql": "SELECT AVG(occ) AS avg_casts\nFROM (\n SELECT COUNT(*) AS occ\n FROM movies2actors AS p\n JOIN movies AS f ON p.movieid = f.movieid\n WHERE f.country = 'USA'\n GROUP BY p.movieid\n) AS q;", "label": "wrong", "unseen": true} {"case_id": "bird_q033_r3", "question_id": "bird/movielens/2254", "ds": "bird", "db": "movielens", "question": "What is the average number of casts of movies that are from the USA?", "evidence": "USA is a country", "gold_sql": "SELECT AVG(T2.cast_num) FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid WHERE T1.country = 'USA'", "pred_sql": "SELECT AVG(m2a.cast_num) FROM movies m JOIN movies2actors m2a ON m.movieid = m2a.movieid WHERE m.country = 'USA';", "label": "correct", "unseen": false} {"case_id": "bird_q034_r0", "question_id": "bird/legislator/4791", "ds": "bird", "db": "legislator", "question": "List the official full names and genders of legislators who have Collins as their last name.", "evidence": "genders refers to gender_bio; Collins is a last_name", "gold_sql": "SELECT official_full_name, gender_bio FROM current WHERE last_name = 'Collins'", "pred_sql": "SELECT h.official_full_name, h.gender_bio\nFROM historical h\nWHERE h.last_name = 'Collins'\nUNION\nSELECT c.official_full_name, c.gender_bio\nFROM current c\nWHERE c.last_name = 'Collins';", "label": "wrong", "unseen": false} {"case_id": "bird_q034_r1", "question_id": "bird/legislator/4791", "ds": "bird", "db": "legislator", "question": "List the official full names and genders of legislators who have Collins as their last name.", "evidence": "genders refers to gender_bio; Collins is a last_name", "gold_sql": "SELECT official_full_name, gender_bio FROM current WHERE last_name = 'Collins'", "pred_sql": "SELECT official_full_name, gender_bio\nFROM historical\nWHERE last_name = 'Collins'\nUNION\nSELECT official_full_name, gender_bio FROM current WHERE last_name = 'Collins';", "label": "wrong", "unseen": false} {"case_id": "bird_q034_r2", "question_id": "bird/legislator/4791", "ds": "bird", "db": "legislator", "question": "List the official full names and genders of legislators who have Collins as their last name.", "evidence": "genders refers to gender_bio; Collins is a last_name", "gold_sql": "SELECT official_full_name, gender_bio FROM current WHERE last_name = 'Collins'", "pred_sql": "SELECT official_full_name, gender_bio\nFROM current\nWHERE last_name = 'Collins'\nUNION\nSELECT official_full_name, gender_bio\nFROM historical\nWHERE last_name = 'Collins';", "label": "wrong", "unseen": false} {"case_id": "bird_q034_r3", "question_id": "bird/legislator/4791", "ds": "bird", "db": "legislator", "question": "List the official full names and genders of legislators who have Collins as their last name.", "evidence": "genders refers to gender_bio; Collins is a last_name", "gold_sql": "SELECT official_full_name, gender_bio FROM current WHERE last_name = 'Collins'", "pred_sql": "SELECT official_full_name, gender_bio\nFROM current\nWHERE last_name = 'Collins';", "label": "correct", "unseen": false} {"case_id": "bird_q035_r0", "question_id": "bird/mondial_geo/8504", "ds": "bird", "db": "mondial_geo", "question": "What is the population density of the nation whose capital city is in the Distrito Federal province, and what portion of its gross domestic product is devoted to its industries?", "evidence": "ation and country are synonyms; Gross domestic product = GDP; Portion of GDP devoted to industries appears in economy.Industry; Population Density = Population / Area", "gold_sql": "SELECT T1.Population / T1.Area, T2.Industry FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Province = 'Distrito Federal'", "pred_sql": "SELECT (country.Population * 1.0) / country.Area AS population_density, economy.Industry\nFROM country\nJOIN economy ON country.Code = economy.Country\nWHERE country.Capital = 'Distrito Federal';", "label": "wrong", "unseen": true} {"case_id": "bird_q035_r1", "question_id": "bird/mondial_geo/8504", "ds": "bird", "db": "mondial_geo", "question": "What is the population density of the nation whose capital city is in the Distrito Federal province, and what portion of its gross domestic product is devoted to its industries?", "evidence": "ation and country are synonyms; Gross domestic product = GDP; Portion of GDP devoted to industries appears in economy.Industry; Population Density = Population / Area", "gold_sql": "SELECT T1.Population / T1.Area, T2.Industry FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Province = 'Distrito Federal'", "pred_sql": "SELECT (c.Population * 1.0) / c.Area AS population_density,\n e.Industry\nFROM country c\nJOIN economy e ON c.Code = e.Country\nWHERE c.Province = 'Distrito Federal';", "label": "spurious", "unseen": false} {"case_id": "bird_q035_r2", "question_id": "bird/mondial_geo/8504", "ds": "bird", "db": "mondial_geo", "question": "What is the population density of the nation whose capital city is in the Distrito Federal province, and what portion of its gross domestic product is devoted to its industries?", "evidence": "ation and country are synonyms; Gross domestic product = GDP; Portion of GDP devoted to industries appears in economy.Industry; Population Density = Population / Area", "gold_sql": "SELECT T1.Population / T1.Area, T2.Industry FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Province = 'Distrito Federal'", "pred_sql": "SELECT \n (country.Population * 1.0) / country.Area AS PopulationDensity,\n economy.Industry\nFROM country\nJOIN economy ON economy.Country = country.Code\nWHERE country.Capital = 'Distrito Federal';", "label": "wrong", "unseen": true} {"case_id": "bird_q035_r3", "question_id": "bird/mondial_geo/8504", "ds": "bird", "db": "mondial_geo", "question": "What is the population density of the nation whose capital city is in the Distrito Federal province, and what portion of its gross domestic product is devoted to its industries?", "evidence": "ation and country are synonyms; Gross domestic product = GDP; Portion of GDP devoted to industries appears in economy.Industry; Population Density = Population / Area", "gold_sql": "SELECT T1.Population / T1.Area, T2.Industry FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Province = 'Distrito Federal'", "pred_sql": "SELECT c.Population / c.Area AS PopulationDensity, e.Industry\nFROM country c\nJOIN economy e ON c.Code = e.Country\nWHERE c.Capital = 'Distrito Federal';", "label": "wrong", "unseen": true} {"case_id": "bird_q036_r0", "question_id": "bird/trains/714", "ds": "bird", "db": "trains", "question": "How many wheels do the long cars have?", "evidence": "long cars refers to len = 'long'", "gold_sql": "SELECT SUM(wheels) FROM cars WHERE len = 'long'", "pred_sql": "SELECT COUNT(*) FROM cars WHERE len = 'long';", "label": "wrong", "unseen": false} {"case_id": "bird_q036_r1", "question_id": "bird/trains/714", "ds": "bird", "db": "trains", "question": "How many wheels do the long cars have?", "evidence": "long cars refers to len = 'long'", "gold_sql": "SELECT SUM(wheels) FROM cars WHERE len = 'long'", "pred_sql": "SELECT COUNT(*) FROM cars WHERE len = 'long';", "label": "wrong", "unseen": false} {"case_id": "bird_q036_r2", "question_id": "bird/trains/714", "ds": "bird", "db": "trains", "question": "How many wheels do the long cars have?", "evidence": "long cars refers to len = 'long'", "gold_sql": "SELECT SUM(wheels) FROM cars WHERE len = 'long'", "pred_sql": "SELECT COUNT(*) FROM cars WHERE len = 'long';", "label": "wrong", "unseen": false} {"case_id": "bird_q036_r3", "question_id": "bird/trains/714", "ds": "bird", "db": "trains", "question": "How many wheels do the long cars have?", "evidence": "long cars refers to len = 'long'", "gold_sql": "SELECT SUM(wheels) FROM cars WHERE len = 'long'", "pred_sql": "SELECT COUNT(*) FROM cars WHERE len = 'long';", "label": "wrong", "unseen": false} {"case_id": "bird_q037_r0", "question_id": "bird/olympics/4997", "ds": "bird", "db": "olympics", "question": "How many 10-year old athletes participated in the Gymnastics Men's Parallel Bars, Teams event?", "evidence": "10-year old athletes refer to competitor_id where age = 10; Gymnastics Men's Parallel Bars, Teams refer to event_name = 'Gymnastics Men''s Parallel Bars, Teams';", "gold_sql": "SELECT COUNT(T2.person_id) FROM competitor_event AS T1 INNER JOIN games_competitor AS T2 ON T1.competitor_id = T2.id INNER JOIN event AS T3 ON T1.event_id = T3.id WHERE T3.event_name LIKE 'Gymnastics Men%s Parallel Bars, Teams' AND T2.age = 10", "pred_sql": "SELECT COUNT(*) AS participant_count\nFROM games_competitor gc\nJOIN competitor_event ce ON gc.id = ce.competitor_id\nJOIN event e ON ce.event_id = e.id\nWHERE gc.age = 10\n AND e.event_name = 'Gymnastics Men''s Parallel Bars, Teams';", "label": "spurious", "unseen": false} {"case_id": "bird_q037_r1", "question_id": "bird/olympics/4997", "ds": "bird", "db": "olympics", "question": "How many 10-year old athletes participated in the Gymnastics Men's Parallel Bars, Teams event?", "evidence": "10-year old athletes refer to competitor_id where age = 10; Gymnastics Men's Parallel Bars, Teams refer to event_name = 'Gymnastics Men''s Parallel Bars, Teams';", "gold_sql": "SELECT COUNT(T2.person_id) FROM competitor_event AS T1 INNER JOIN games_competitor AS T2 ON T1.competitor_id = T2.id INNER JOIN event AS T3 ON T1.event_id = T3.id WHERE T3.event_name LIKE 'Gymnastics Men%s Parallel Bars, Teams' AND T2.age = 10", "pred_sql": "SELECT COUNT(*) AS count_athletes\nFROM games_competitor gc\nJOIN competitor_event ce ON ce.competitor_id = gc.id\nJOIN event e ON e.id = ce.event_id\nWHERE gc.age = 10\n AND e.event_name = 'Gymnastics Men''s Parallel Bars, Teams';", "label": "spurious", "unseen": false} {"case_id": "bird_q037_r2", "question_id": "bird/olympics/4997", "ds": "bird", "db": "olympics", "question": "How many 10-year old athletes participated in the Gymnastics Men's Parallel Bars, Teams event?", "evidence": "10-year old athletes refer to competitor_id where age = 10; Gymnastics Men's Parallel Bars, Teams refer to event_name = 'Gymnastics Men''s Parallel Bars, Teams';", "gold_sql": "SELECT COUNT(T2.person_id) FROM competitor_event AS T1 INNER JOIN games_competitor AS T2 ON T1.competitor_id = T2.id INNER JOIN event AS T3 ON T1.event_id = T3.id WHERE T3.event_name LIKE 'Gymnastics Men%s Parallel Bars, Teams' AND T2.age = 10", "pred_sql": "SELECT COUNT(*)\nFROM competitor_event AS ce\nJOIN games_competitor AS gc ON ce.competitor_id = gc.id\nJOIN event AS e ON ce.event_id = e.id\nWHERE gc.age = 10\n AND e.event_name = 'Gymnastics Men''s Parallel Bars, Teams';", "label": "spurious", "unseen": false} {"case_id": "bird_q037_r3", "question_id": "bird/olympics/4997", "ds": "bird", "db": "olympics", "question": "How many 10-year old athletes participated in the Gymnastics Men's Parallel Bars, Teams event?", "evidence": "10-year old athletes refer to competitor_id where age = 10; Gymnastics Men's Parallel Bars, Teams refer to event_name = 'Gymnastics Men''s Parallel Bars, Teams';", "gold_sql": "SELECT COUNT(T2.person_id) FROM competitor_event AS T1 INNER JOIN games_competitor AS T2 ON T1.competitor_id = T2.id INNER JOIN event AS T3 ON T1.event_id = T3.id WHERE T3.event_name LIKE 'Gymnastics Men%s Parallel Bars, Teams' AND T2.age = 10", "pred_sql": "SELECT COUNT(*) FROM competitor_event ce JOIN event e ON ce.event_id = e.id JOIN games_competitor gc ON ce.competitor_id = gc.id WHERE e.event_name = 'Gymnastics Men''s Parallel Bars, Teams' AND gc.age = 10;", "label": "spurious", "unseen": false} {"case_id": "bird_q038_r0", "question_id": "bird/shipping/5608", "ds": "bird", "db": "shipping", "question": "What is the full name of the driver who transported the first shipment of the company?", "evidence": "first shipment of the company refers to Min(ship_date); full name refers to first_name, last_name", "gold_sql": "SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id ORDER BY T1.ship_date ASC LIMIT 1", "pred_sql": "SELECT d.first_name, d.last_name\nFROM shipment s\nJOIN driver d ON s.driver_id = d.driver_id\nORDER BY s.ship_date ASC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "bird_q038_r1", "question_id": "bird/shipping/5608", "ds": "bird", "db": "shipping", "question": "What is the full name of the driver who transported the first shipment of the company?", "evidence": "first shipment of the company refers to Min(ship_date); full name refers to first_name, last_name", "gold_sql": "SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id ORDER BY T1.ship_date ASC LIMIT 1", "pred_sql": "SELECT driver.first_name, driver.last_name\nFROM shipment\nJOIN driver ON shipment.driver_id = driver.driver_id\nORDER BY shipment.ship_date ASC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "bird_q038_r2", "question_id": "bird/shipping/5608", "ds": "bird", "db": "shipping", "question": "What is the full name of the driver who transported the first shipment of the company?", "evidence": "first shipment of the company refers to Min(ship_date); full name refers to first_name, last_name", "gold_sql": "SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id ORDER BY T1.ship_date ASC LIMIT 1", "pred_sql": "SELECT driver.first_name, driver.last_name FROM shipment JOIN driver ON shipment.driver_id = driver.driver_id ORDER BY shipment.ship_date ASC LIMIT 1", "label": "correct", "unseen": false} {"case_id": "bird_q038_r3", "question_id": "bird/shipping/5608", "ds": "bird", "db": "shipping", "question": "What is the full name of the driver who transported the first shipment of the company?", "evidence": "first shipment of the company refers to Min(ship_date); full name refers to first_name, last_name", "gold_sql": "SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id ORDER BY T1.ship_date ASC LIMIT 1", "pred_sql": "SELECT d.first_name, d.last_name\nFROM shipment s\nJOIN driver d ON s.driver_id = d.driver_id\nORDER BY s.ship_date ASC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "bird_q039_r0", "question_id": "bird/books/5995", "ds": "bird", "db": "books", "question": "Which language is the rarest among all the books?", "evidence": "language written in refers to language_name; rarest refers to Min(Count(book_id))", "gold_sql": "SELECT T2.language_name FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id GROUP BY T2.language_name ORDER BY COUNT(T2.language_name) ASC LIMIT 1", "pred_sql": "SELECT l.language_name\nFROM book b\nJOIN book_language l ON b.language_id = l.language_id\nGROUP BY l.language_name\nORDER BY COUNT(*) ASC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "bird_q039_r1", "question_id": "bird/books/5995", "ds": "bird", "db": "books", "question": "Which language is the rarest among all the books?", "evidence": "language written in refers to language_name; rarest refers to Min(Count(book_id))", "gold_sql": "SELECT T2.language_name FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id GROUP BY T2.language_name ORDER BY COUNT(T2.language_name) ASC LIMIT 1", "pred_sql": "SELECT bll.language_name\nFROM book book\nJOIN book_language bll ON book.language_id = bll.language_id\nGROUP BY bll.language_id\nORDER BY COUNT(book.book_id) ASC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q039_r2", "question_id": "bird/books/5995", "ds": "bird", "db": "books", "question": "Which language is the rarest among all the books?", "evidence": "language written in refers to language_name; rarest refers to Min(Count(book_id))", "gold_sql": "SELECT T2.language_name FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id GROUP BY T2.language_name ORDER BY COUNT(T2.language_name) ASC LIMIT 1", "pred_sql": "SELECT bl.language_name\nFROM book_language AS bl\nJOIN book AS bk ON bk.language_id = bl.language_id\nGROUP BY bk.language_id\nORDER BY COUNT(bk.book_id) ASC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q039_r3", "question_id": "bird/books/5995", "ds": "bird", "db": "books", "question": "Which language is the rarest among all the books?", "evidence": "language written in refers to language_name; rarest refers to Min(Count(book_id))", "gold_sql": "SELECT T2.language_name FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id GROUP BY T2.language_name ORDER BY COUNT(T2.language_name) ASC LIMIT 1", "pred_sql": "SELECT bl.language_name\nFROM book AS b\nJOIN book_language AS bl ON b.language_id = bl.language_id\nGROUP BY bl.language_name\nORDER BY COUNT(*) ASC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "bird_q040_r0", "question_id": "bird/simpson_episodes/4204", "ds": "bird", "db": "simpson_episodes", "question": "How many episodes was Dell Hake not included in the credit list?", "evidence": "\"Dell Hake\" is the person; not included in the credit list refers to credited = ''", "gold_sql": "SELECT COUNT(*) FROM Credit WHERE person = 'Dell Hake' AND credited = 'false';", "pred_sql": "SELECT COUNT(*) FROM Credit WHERE person = 'Dell Hake' AND credited = 'false';", "label": "correct", "unseen": false} {"case_id": "bird_q040_r1", "question_id": "bird/simpson_episodes/4204", "ds": "bird", "db": "simpson_episodes", "question": "How many episodes was Dell Hake not included in the credit list?", "evidence": "\"Dell Hake\" is the person; not included in the credit list refers to credited = ''", "gold_sql": "SELECT COUNT(*) FROM Credit WHERE person = 'Dell Hake' AND credited = 'false';", "pred_sql": "SELECT COUNT(*) FROM Credit WHERE person = 'Dell Hake' AND credited = 'false';", "label": "correct", "unseen": false} {"case_id": "bird_q040_r2", "question_id": "bird/simpson_episodes/4204", "ds": "bird", "db": "simpson_episodes", "question": "How many episodes was Dell Hake not included in the credit list?", "evidence": "\"Dell Hake\" is the person; not included in the credit list refers to credited = ''", "gold_sql": "SELECT COUNT(*) FROM Credit WHERE person = 'Dell Hake' AND credited = 'false';", "pred_sql": "SELECT COUNT(*) FROM Credit WHERE person = 'Dell Hake' AND credited = 'false';", "label": "correct", "unseen": false} {"case_id": "bird_q040_r3", "question_id": "bird/simpson_episodes/4204", "ds": "bird", "db": "simpson_episodes", "question": "How many episodes was Dell Hake not included in the credit list?", "evidence": "\"Dell Hake\" is the person; not included in the credit list refers to credited = ''", "gold_sql": "SELECT COUNT(*) FROM Credit WHERE person = 'Dell Hake' AND credited = 'false';", "pred_sql": "SELECT COUNT(*) FROM Credit WHERE person = 'Dell Hake' AND credited = 'false';", "label": "correct", "unseen": false} {"case_id": "bird_q041_r0", "question_id": "bird/synthea/1386", "ds": "bird", "db": "synthea", "question": "State the average period of Ms. Angelena Kertzmann's several normal pregnancies.", "evidence": "DIVIDE(SUBTRACT(stop time - start time), COUNT(DESCRIPTION = 'Normal pregnancy')));", "gold_sql": "SELECT CAST(SUM(strftime('%J', T2.STOP) - strftime('%J', T2.START)) AS REAL) / COUNT(T2.PATIENT) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Angelena' AND T1.last = 'Kertzmann' AND T2.description = 'Normal pregnancy'", "pred_sql": "SELECT AVG(julianday(c.STOP) - julianday(c.START)) AS average_period\nFROM conditions c\nJOIN patients p ON c.PATIENT = p.patient\nWHERE p.first = 'Angelena' AND p.last = 'Kertzmann' AND c.DESCRIPTION = 'Normal pregnancy';", "label": "spurious", "unseen": false} {"case_id": "bird_q041_r1", "question_id": "bird/synthea/1386", "ds": "bird", "db": "synthea", "question": "State the average period of Ms. Angelena Kertzmann's several normal pregnancies.", "evidence": "DIVIDE(SUBTRACT(stop time - start time), COUNT(DESCRIPTION = 'Normal pregnancy')));", "gold_sql": "SELECT CAST(SUM(strftime('%J', T2.STOP) - strftime('%J', T2.START)) AS REAL) / COUNT(T2.PATIENT) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Angelena' AND T1.last = 'Kertzmann' AND T2.description = 'Normal pregnancy'", "pred_sql": "SELECT AVG(julianday(c.STOP) - julianday(c.START)) AS avg_period\nFROM conditions c\nJOIN patients p ON c.PATIENT = p.patient\nWHERE p.first = 'Angelena' AND p.last = 'Kertzmann'\n AND c.DESCRIPTION = 'Normal pregnancy';", "label": "spurious", "unseen": false} {"case_id": "bird_q041_r2", "question_id": "bird/synthea/1386", "ds": "bird", "db": "synthea", "question": "State the average period of Ms. Angelena Kertzmann's several normal pregnancies.", "evidence": "DIVIDE(SUBTRACT(stop time - start time), COUNT(DESCRIPTION = 'Normal pregnancy')));", "gold_sql": "SELECT CAST(SUM(strftime('%J', T2.STOP) - strftime('%J', T2.START)) AS REAL) / COUNT(T2.PATIENT) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Angelena' AND T1.last = 'Kertzmann' AND T2.description = 'Normal pregnancy'", "pred_sql": "SELECT AVG(julianday(c.STOP) - julianday(c.START)) AS avg_period\nFROM conditions c\nJOIN patients p ON p.patient = c.PATIENT\nWHERE p.first = 'Angelena'\n AND p.last = 'Kertzmann'\n AND c.DESCRIPTION = 'Normal pregnancy';", "label": "spurious", "unseen": false} {"case_id": "bird_q041_r3", "question_id": "bird/synthea/1386", "ds": "bird", "db": "synthea", "question": "State the average period of Ms. Angelena Kertzmann's several normal pregnancies.", "evidence": "DIVIDE(SUBTRACT(stop time - start time), COUNT(DESCRIPTION = 'Normal pregnancy')));", "gold_sql": "SELECT CAST(SUM(strftime('%J', T2.STOP) - strftime('%J', T2.START)) AS REAL) / COUNT(T2.PATIENT) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Angelena' AND T1.last = 'Kertzmann' AND T2.description = 'Normal pregnancy'", "pred_sql": "SELECT AVG(julianday(c.STOP) - julianday(c.START)) AS avg_period\nFROM conditions c\nJOIN patients p ON c.PATIENT = p.patient\nWHERE p.first = 'Angelena' AND p.last = 'Kertzmann' AND p.prefix = 'Ms.' AND c.DESCRIPTION = 'Normal pregnancy';", "label": "spurious", "unseen": false} {"case_id": "bird_q042_r0", "question_id": "bird/talkingdata/1188", "ds": "bird", "db": "talkingdata", "question": "How many users who are under 30 years old use device model of Galaxy Note 2?", "evidence": "under 30 refers to age < 30;", "gold_sql": "SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'Galaxy Note 2' AND T1.age < 30", "pred_sql": "SELECT COUNT(*) FROM gender_age ga JOIN phone_brand_device_model2 pbdm ON ga.device_id = pbdm.device_id WHERE ga.age < 30 AND pbdm.device_model = 'Galaxy Note 2';", "label": "correct", "unseen": false} {"case_id": "bird_q042_r1", "question_id": "bird/talkingdata/1188", "ds": "bird", "db": "talkingdata", "question": "How many users who are under 30 years old use device model of Galaxy Note 2?", "evidence": "under 30 refers to age < 30;", "gold_sql": "SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'Galaxy Note 2' AND T1.age < 30", "pred_sql": "SELECT COUNT(*)\nFROM phone_brand_device_model2 AS p\nJOIN gender_age AS g ON p.device_id = g.device_id\nWHERE p.device_model = 'Galaxy Note 2'\n AND g.age < 30;", "label": "correct", "unseen": false} {"case_id": "bird_q042_r2", "question_id": "bird/talkingdata/1188", "ds": "bird", "db": "talkingdata", "question": "How many users who are under 30 years old use device model of Galaxy Note 2?", "evidence": "under 30 refers to age < 30;", "gold_sql": "SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'Galaxy Note 2' AND T1.age < 30", "pred_sql": "SELECT COUNT(*)\nFROM phone_brand_device_model2 pb\nJOIN gender_age ga\n ON ga.device_id = pb.device_id\nWHERE pb.device_model = 'Galaxy Note 2'\n AND ga.age < 30;", "label": "correct", "unseen": false} {"case_id": "bird_q042_r3", "question_id": "bird/talkingdata/1188", "ds": "bird", "db": "talkingdata", "question": "How many users who are under 30 years old use device model of Galaxy Note 2?", "evidence": "under 30 refers to age < 30;", "gold_sql": "SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'Galaxy Note 2' AND T1.age < 30", "pred_sql": "SELECT COUNT(*)\nFROM phone_brand_device_model2 AS p\nJOIN gender_age AS g\n ON p.device_id = g.device_id\nWHERE p.device_model = 'Galaxy Note 2'\n AND g.age < 30;", "label": "correct", "unseen": false} {"case_id": "bird_q043_r0", "question_id": "bird/works_cycles/7269", "ds": "bird", "db": "works_cycles", "question": "What product has the fewest online orders from one customer? List the product's class, line of business, and list price.", "evidence": "fewest online orders refer to MIN(Quantity);", "gold_sql": "SELECT T2.Class, T2.ProductLine, T2.ListPrice FROM ShoppingCartItem AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID ORDER BY SUM(Quantity) LIMIT 1", "pred_sql": "SELECT p.Class, p.ProductLine, p.ListPrice\nFROM Product p\nJOIN SalesOrderDetail s ON s.ProductID = p.ProductID\nJOIN SalesOrderHeader h ON h.SalesOrderID = s.SalesOrderID\nWHERE h.OnlineOrderFlag = 1\nGROUP BY p.ProductID\nORDER BY SUM(s.OrderQty) ASC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q043_r1", "question_id": "bird/works_cycles/7269", "ds": "bird", "db": "works_cycles", "question": "What product has the fewest online orders from one customer? List the product's class, line of business, and list price.", "evidence": "fewest online orders refer to MIN(Quantity);", "gold_sql": "SELECT T2.Class, T2.ProductLine, T2.ListPrice FROM ShoppingCartItem AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID ORDER BY SUM(Quantity) LIMIT 1", "pred_sql": "SELECT p.Class, p.ProductLine, p.ListPrice\nFROM Product p\nJOIN SalesOrderDetail sod ON p.ProductID = sod.ProductID\nJOIN SalesOrderHeader soh ON sod.SalesOrderID = soh.SalesOrderID\nWHERE soh.OnlineOrderFlag = 0\nGROUP BY p.ProductID\nORDER BY COUNT(*) ASC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q043_r2", "question_id": "bird/works_cycles/7269", "ds": "bird", "db": "works_cycles", "question": "What product has the fewest online orders from one customer? List the product's class, line of business, and list price.", "evidence": "fewest online orders refer to MIN(Quantity);", "gold_sql": "SELECT T2.Class, T2.ProductLine, T2.ListPrice FROM ShoppingCartItem AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID ORDER BY SUM(Quantity) LIMIT 1", "pred_sql": "SELECT p.Class, p.ProductLine, p.ListPrice\nFROM Product p\nJOIN TransactionHistory th ON p.ProductID = th.ProductID\nGROUP BY p.ProductID\nORDER BY COUNT(*) ASC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q043_r3", "question_id": "bird/works_cycles/7269", "ds": "bird", "db": "works_cycles", "question": "What product has the fewest online orders from one customer? List the product's class, line of business, and list price.", "evidence": "fewest online orders refer to MIN(Quantity);", "gold_sql": "SELECT T2.Class, T2.ProductLine, T2.ListPrice FROM ShoppingCartItem AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID ORDER BY SUM(Quantity) LIMIT 1", "pred_sql": "SELECT p.Class, p.ProductLine, p.ListPrice\nFROM Product p\nJOIN SalesOrderDetail sod ON p.ProductID = sod.ProductID\nGROUP BY p.ProductID\nORDER BY MIN(sod.OrderQty) ASC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q044_r0", "question_id": "bird/works_cycles/7396", "ds": "bird", "db": "works_cycles", "question": "What is the average profit of all the low class universal road frames? Indicate how many variety of sizes are there and the available colors.", "evidence": "low class refers to Class = 'L'; universal refers to Style = 'U'; road frame is a name of product subcategory; average profit = AVG(SUBTRACT(ListPrice, StandardCost);", "gold_sql": "SELECT AVG(T1.ListPrice - T1.StandardCost), COUNT(DISTINCT T1.Size) , COUNT(DISTINCT T1.Style) FROM Product AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductSubcategoryID = T2.ProductSubcategoryID WHERE T1.Class = 'L' AND T2.Name = 'Road Frames' GROUP BY T1.Class, T1.Color", "pred_sql": "SELECT AVG(p.ListPrice - p.StandardCost) AS average_profit, COUNT(DISTINCT p.Size) AS variety_sizes, GROUP_CONCAT(DISTINCT p.Color) AS available_colors\nFROM Product p\nJOIN ProductSubcategory ps ON p.ProductSubcategoryID = ps.ProductSubcategoryID\nWHERE p.Class = 'L'\n AND p.Style = 'U'\n AND ps.Name = 'Road Frames';", "label": "wrong", "unseen": true} {"case_id": "bird_q044_r1", "question_id": "bird/works_cycles/7396", "ds": "bird", "db": "works_cycles", "question": "What is the average profit of all the low class universal road frames? Indicate how many variety of sizes are there and the available colors.", "evidence": "low class refers to Class = 'L'; universal refers to Style = 'U'; road frame is a name of product subcategory; average profit = AVG(SUBTRACT(ListPrice, StandardCost);", "gold_sql": "SELECT AVG(T1.ListPrice - T1.StandardCost), COUNT(DISTINCT T1.Size) , COUNT(DISTINCT T1.Style) FROM Product AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductSubcategoryID = T2.ProductSubcategoryID WHERE T1.Class = 'L' AND T2.Name = 'Road Frames' GROUP BY T1.Class, T1.Color", "pred_sql": "SELECT AVG(p.ListPrice - p.StandardCost) AS Average_Profit,\n COUNT(DISTINCT p.Size) AS Variety_of_Sizes,\n COUNT(DISTINCT p.Color) AS Available_Colors\nFROM Product p\nJOIN ProductSubcategory ps ON p.ProductSubcategoryID = ps.ProductSubcategoryID\nWHERE p.Style = 'U'\n AND p.Class = 'L'\n AND ps.Name = 'Road Frames';", "label": "wrong", "unseen": true} {"case_id": "bird_q044_r2", "question_id": "bird/works_cycles/7396", "ds": "bird", "db": "works_cycles", "question": "What is the average profit of all the low class universal road frames? Indicate how many variety of sizes are there and the available colors.", "evidence": "low class refers to Class = 'L'; universal refers to Style = 'U'; road frame is a name of product subcategory; average profit = AVG(SUBTRACT(ListPrice, StandardCost);", "gold_sql": "SELECT AVG(T1.ListPrice - T1.StandardCost), COUNT(DISTINCT T1.Size) , COUNT(DISTINCT T1.Style) FROM Product AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductSubcategoryID = T2.ProductSubcategoryID WHERE T1.Class = 'L' AND T2.Name = 'Road Frames' GROUP BY T1.Class, T1.Color", "pred_sql": "SELECT AVG(p.ListPrice - p.StandardCost) AS average_profit, COUNT(DISTINCT p.Size) AS variety, COUNT(DISTINCT p.Color) AS colors\nFROM Product p\nJOIN ProductSubcategory ps ON p.ProductSubcategoryID = ps.ProductSubcategoryID\nWHERE p.Class = 'L' AND p.Style = 'U' AND ps.Name = 'Road Frames';", "label": "wrong", "unseen": true} {"case_id": "bird_q044_r3", "question_id": "bird/works_cycles/7396", "ds": "bird", "db": "works_cycles", "question": "What is the average profit of all the low class universal road frames? Indicate how many variety of sizes are there and the available colors.", "evidence": "low class refers to Class = 'L'; universal refers to Style = 'U'; road frame is a name of product subcategory; average profit = AVG(SUBTRACT(ListPrice, StandardCost);", "gold_sql": "SELECT AVG(T1.ListPrice - T1.StandardCost), COUNT(DISTINCT T1.Size) , COUNT(DISTINCT T1.Style) FROM Product AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductSubcategoryID = T2.ProductSubcategoryID WHERE T1.Class = 'L' AND T2.Name = 'Road Frames' GROUP BY T1.Class, T1.Color", "pred_sql": "SELECT AVG(p.ListPrice - p.StandardCost) AS AverageProfit, COUNT(DISTINCT p.Size) AS VarietyOfSizes, COUNT(DISTINCT p.Color) AS AvailableColors\nFROM Product p\nJOIN ProductSubcategory ps ON p.ProductSubcategoryID = ps.ProductSubcategoryID\nWHERE p.Class = 'L'\n AND p.Style = 'U'\n AND ps.Name = 'Road Frames';", "label": "wrong", "unseen": true} {"case_id": "bird_q045_r0", "question_id": "bird/university/8117", "ds": "bird", "db": "university", "question": "Give the criteria name where Harvard University scored 100.", "evidence": "Harvard University refers to university_name = 'Harvard University'; scored 100 refers to score = 100", "gold_sql": "SELECT DISTINCT T3.criteria_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN ranking_criteria AS T3 ON T3.id = T2.ranking_criteria_id WHERE T1.university_name = 'Harvard University' AND T2.score = 100", "pred_sql": "SELECT rc.criteria_name\nFROM university_ranking_year AS ury\nJOIN ranking_criteria AS rc ON ury.ranking_criteria_id = rc.id\nJOIN university AS u ON ury.university_id = u.id\nWHERE u.university_name = 'Harvard University'\n AND ury.score = 100;", "label": "wrong", "unseen": false} {"case_id": "bird_q045_r1", "question_id": "bird/university/8117", "ds": "bird", "db": "university", "question": "Give the criteria name where Harvard University scored 100.", "evidence": "Harvard University refers to university_name = 'Harvard University'; scored 100 refers to score = 100", "gold_sql": "SELECT DISTINCT T3.criteria_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN ranking_criteria AS T3 ON T3.id = T2.ranking_criteria_id WHERE T1.university_name = 'Harvard University' AND T2.score = 100", "pred_sql": "SELECT rc.criteria_name\nFROM university u\nJOIN university_ranking_year ury ON u.id = ury.university_id\nJOIN ranking_criteria rc ON ury.ranking_criteria_id = rc.id\nWHERE u.university_name = 'Harvard University' AND ury.score = 100;", "label": "wrong", "unseen": false} {"case_id": "bird_q045_r2", "question_id": "bird/university/8117", "ds": "bird", "db": "university", "question": "Give the criteria name where Harvard University scored 100.", "evidence": "Harvard University refers to university_name = 'Harvard University'; scored 100 refers to score = 100", "gold_sql": "SELECT DISTINCT T3.criteria_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN ranking_criteria AS T3 ON T3.id = T2.ranking_criteria_id WHERE T1.university_name = 'Harvard University' AND T2.score = 100", "pred_sql": "SELECT DISTINCT rc.criteria_name\nFROM university u\nJOIN university_ranking_year ury ON ury.university_id = u.id\nJOIN ranking_criteria rc ON rc.id = ury.ranking_criteria_id\nWHERE u.university_name = 'Harvard University'\n AND ury.score = 100;", "label": "correct", "unseen": false} {"case_id": "bird_q045_r3", "question_id": "bird/university/8117", "ds": "bird", "db": "university", "question": "Give the criteria name where Harvard University scored 100.", "evidence": "Harvard University refers to university_name = 'Harvard University'; scored 100 refers to score = 100", "gold_sql": "SELECT DISTINCT T3.criteria_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN ranking_criteria AS T3 ON T3.id = T2.ranking_criteria_id WHERE T1.university_name = 'Harvard University' AND T2.score = 100", "pred_sql": "SELECT rc.criteria_name\nFROM university u\nJOIN university_ranking_year ury ON u.id = ury.university_id\nJOIN ranking_criteria rc ON ury.ranking_criteria_id = rc.id\nWHERE u.university_name = 'Harvard University' AND ury.score = 100;", "label": "wrong", "unseen": false} {"case_id": "bird_q046_r0", "question_id": "bird/human_resources/8949", "ds": "bird", "db": "human_resources", "question": "By what percentage is the average salary of Trainees higher than the minimum salary of this postion?", "evidence": "AVG(salary); Trainee is a position title; minimum salary refers to minsalary; calculation = DIVIDE(SUBTRACT(AVG(salary), minsalary), minsalary) * 100", "gold_sql": "SELECT 100 * (AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) - CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL)) / CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL) AS per FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'", "pred_sql": "SELECT 100.0 * (AVG(CAST(REPLACE(REPLACE(e.salary, 'US$', ''), ',', '') AS REAL)) - (SELECT CAST(REPLACE(REPLACE(p.minsalary, 'US$', ''), ',', '') AS REAL) FROM position p WHERE p.positiontitle = 'Trainee')) / (SELECT CAST(REPLACE(REPLACE(p.minsalary, 'US$', ''), ',', '') AS REAL) FROM position p WHERE p.positiontitle = 'Trainee') AS percentage\nFROM employee e\nJOIN position p ON e.positionID = p.positionID\nWHERE p.positiontitle = 'Trainee';", "label": "spurious", "unseen": true} {"case_id": "bird_q046_r1", "question_id": "bird/human_resources/8949", "ds": "bird", "db": "human_resources", "question": "By what percentage is the average salary of Trainees higher than the minimum salary of this postion?", "evidence": "AVG(salary); Trainee is a position title; minimum salary refers to minsalary; calculation = DIVIDE(SUBTRACT(AVG(salary), minsalary), minsalary) * 100", "gold_sql": "SELECT 100 * (AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) - CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL)) / CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL) AS per FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'", "pred_sql": "SELECT 100.0 * (AVG(CAST(REPLACE(REPLACE(employee.salary, 'US$', ''), ',', '') AS REAL)) - p.minsalary) / p.minsalary AS percent_higher\nFROM employee\nJOIN position p ON employee.positionID = p.positionID\nWHERE p.positiontitle = 'Trainee';", "label": "wrong", "unseen": true} {"case_id": "bird_q046_r2", "question_id": "bird/human_resources/8949", "ds": "bird", "db": "human_resources", "question": "By what percentage is the average salary of Trainees higher than the minimum salary of this postion?", "evidence": "AVG(salary); Trainee is a position title; minimum salary refers to minsalary; calculation = DIVIDE(SUBTRACT(AVG(salary), minsalary), minsalary) * 100", "gold_sql": "SELECT 100 * (AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) - CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL)) / CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL) AS per FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'", "pred_sql": "SELECT 100.0 * (AVG(CAST(REPLACE(REPLACE(e.salary, 'US$', ''), ',', '') AS REAL)) - p.minsalary) / p.minsalary AS percentage_higher\nFROM employee e\nJOIN position p ON e.positionID = p.positionID\nWHERE p.positiontitle = 'Trainee';", "label": "wrong", "unseen": true} {"case_id": "bird_q046_r3", "question_id": "bird/human_resources/8949", "ds": "bird", "db": "human_resources", "question": "By what percentage is the average salary of Trainees higher than the minimum salary of this postion?", "evidence": "AVG(salary); Trainee is a position title; minimum salary refers to minsalary; calculation = DIVIDE(SUBTRACT(AVG(salary), minsalary), minsalary) * 100", "gold_sql": "SELECT 100 * (AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) - CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL)) / CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL) AS per FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'", "pred_sql": "SELECT 100.0 * (AVG(CAST(REPLACE(REPLACE(REPLACE(employee.salary, '$',''), ',', ''), '.','') AS REAL)) - (SELECT minsalary FROM position WHERE positiontitle = 'Trainee')) / (SELECT minsalary FROM position WHERE positiontitle = 'Trainee') AS percentage_increase FROM employee JOIN position ON employee.positionID = position.positionID WHERE position.positiontitle = 'Trainee';", "label": "wrong", "unseen": true} {"case_id": "bird_q047_r0", "question_id": "bird/ice_hockey_draft/6937", "ds": "bird", "db": "ice_hockey_draft", "question": "How many games did the tallest player have ever played?", "evidence": "tallest player refers to MAX(height_in_cm);", "gold_sql": "SELECT T1.GP FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.ELITEID = ( SELECT t.ELITEID FROM PlayerInfo t ORDER BY t.height DESC LIMIT 1 )", "pred_sql": "SELECT SUM(season_status.GP)\nFROM SeasonStatus AS season_status\nJOIN PlayerInfo AS player_info ON season_status.ELITEID = player_info.ELITEID\nJOIN height_info AS height_info ON player_info.height = height_info.height_id\nWHERE height_info.height_in_cm = (\n SELECT MAX(height_in_cm) FROM height_info\n);", "label": "wrong", "unseen": false} {"case_id": "bird_q047_r1", "question_id": "bird/ice_hockey_draft/6937", "ds": "bird", "db": "ice_hockey_draft", "question": "How many games did the tallest player have ever played?", "evidence": "tallest player refers to MAX(height_in_cm);", "gold_sql": "SELECT T1.GP FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.ELITEID = ( SELECT t.ELITEID FROM PlayerInfo t ORDER BY t.height DESC LIMIT 1 )", "pred_sql": "SELECT ss.GP\nFROM SeasonStatus ss\nJOIN PlayerInfo pi ON ss.ELITEID = pi.ELITEID\nJOIN height_info hi ON pi.height = hi.height_id\nORDER BY hi.height_in_cm DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q047_r2", "question_id": "bird/ice_hockey_draft/6937", "ds": "bird", "db": "ice_hockey_draft", "question": "How many games did the tallest player have ever played?", "evidence": "tallest player refers to MAX(height_in_cm);", "gold_sql": "SELECT T1.GP FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.ELITEID = ( SELECT t.ELITEID FROM PlayerInfo t ORDER BY t.height DESC LIMIT 1 )", "pred_sql": "SELECT s.GP\nFROM SeasonStatus s\nJOIN PlayerInfo p ON s.ELITEID = p.ELITEID\nJOIN height_info h ON p.height = h.height_id\nWHERE h.height_in_cm = (\n SELECT MAX(height_in_cm)\n FROM height_info\n);", "label": "spurious", "unseen": false} {"case_id": "bird_q047_r3", "question_id": "bird/ice_hockey_draft/6937", "ds": "bird", "db": "ice_hockey_draft", "question": "How many games did the tallest player have ever played?", "evidence": "tallest player refers to MAX(height_in_cm);", "gold_sql": "SELECT T1.GP FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.ELITEID = ( SELECT t.ELITEID FROM PlayerInfo t ORDER BY t.height DESC LIMIT 1 )", "pred_sql": "SELECT ss.GP\nFROM SeasonStatus ss\nJOIN PlayerInfo pi ON ss.ELITEID = pi.ELITEID\nJOIN height_info hi ON pi.height = hi.height_id\nORDER BY hi.height_in_cm DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q048_r0", "question_id": "bird/mondial_geo/8357", "ds": "bird", "db": "mondial_geo", "question": "How many mountains are there in the country with the most land area?", "evidence": "", "gold_sql": "SELECT COUNT(Mountain) FROM geo_mountain WHERE Country = ( SELECT Code FROM country ORDER BY Area DESC LIMIT 1 )", "pred_sql": "SELECT COUNT(*) FROM mountain INNER JOIN geo_mountain ON mountain.Name = geo_mountain.Mountain INNER JOIN country ON geo_mountain.Country = country.Code ORDER BY country.Area DESC LIMIT 1", "label": "wrong", "unseen": true} {"case_id": "bird_q048_r1", "question_id": "bird/mondial_geo/8357", "ds": "bird", "db": "mondial_geo", "question": "How many mountains are there in the country with the most land area?", "evidence": "", "gold_sql": "SELECT COUNT(Mountain) FROM geo_mountain WHERE Country = ( SELECT Code FROM country ORDER BY Area DESC LIMIT 1 )", "pred_sql": "SELECT COUNT(*) FROM mountain JOIN geo_mountain ON mountain.Name = geo_mountain.Mountain JOIN country ON geo_mountain.Country = country.Code ORDER BY country.Area DESC LIMIT 1", "label": "wrong", "unseen": true} {"case_id": "bird_q048_r2", "question_id": "bird/mondial_geo/8357", "ds": "bird", "db": "mondial_geo", "question": "How many mountains are there in the country with the most land area?", "evidence": "", "gold_sql": "SELECT COUNT(Mountain) FROM geo_mountain WHERE Country = ( SELECT Code FROM country ORDER BY Area DESC LIMIT 1 )", "pred_sql": "SELECT COUNT(*) FROM mountain m JOIN geo_mountain gm ON m.Name = gm.Mountain JOIN country c ON gm.Country = c.Code ORDER BY c.Area DESC LIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q048_r3", "question_id": "bird/mondial_geo/8357", "ds": "bird", "db": "mondial_geo", "question": "How many mountains are there in the country with the most land area?", "evidence": "", "gold_sql": "SELECT COUNT(Mountain) FROM geo_mountain WHERE Country = ( SELECT Code FROM country ORDER BY Area DESC LIMIT 1 )", "pred_sql": "SELECT COUNT(*) \nFROM geo_mountain gm\nJOIN country co ON gm.Country = co.Code\nORDER BY co.Area DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q049_r0", "question_id": "bird/regional_sales/2667", "ds": "bird", "db": "regional_sales", "question": "Mention the customer names and IDs which ordered total net profit of above 5000 USD through online channel.", "evidence": "IDs refers to CustomerID; total net profit of above 5000 USD refers to SUM(Subtract(Unit Price, Unit Cost)) > 5000", "gold_sql": "SELECT DISTINCT `Customer Names`, CustomerID FROM ( SELECT T2.`Customer Names`, T2.CustomerID , SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) AS T FROM `Sales Orders` T1 INNER JOIN Customers T2 ON T2.CustomerID = T1._CustomerID WHERE T1.`Sales Channel` = 'Online' GROUP BY T2.CustomerID ) WHERE T > 5000", "pred_sql": "SELECT c.`Customer Names`, c.CustomerID\nFROM Customers c\nJOIN `Sales Orders` so ON c.CustomerID = so._CustomerID\nWHERE so.`Sales Channel` = 'Online'\n AND (CAST(REPLACE(so.`Unit Price`, ',', '') AS REAL) - CAST(REPLACE(so.`Unit Cost`, ',', '') AS REAL)) > 5000\nORDER BY c.`Customer Names`;", "label": "wrong", "unseen": true} {"case_id": "bird_q049_r1", "question_id": "bird/regional_sales/2667", "ds": "bird", "db": "regional_sales", "question": "Mention the customer names and IDs which ordered total net profit of above 5000 USD through online channel.", "evidence": "IDs refers to CustomerID; total net profit of above 5000 USD refers to SUM(Subtract(Unit Price, Unit Cost)) > 5000", "gold_sql": "SELECT DISTINCT `Customer Names`, CustomerID FROM ( SELECT T2.`Customer Names`, T2.CustomerID , SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) AS T FROM `Sales Orders` T1 INNER JOIN Customers T2 ON T2.CustomerID = T1._CustomerID WHERE T1.`Sales Channel` = 'Online' GROUP BY T2.CustomerID ) WHERE T > 5000", "pred_sql": "SELECT c.`Customer Names`, c.CustomerID\nFROM `Sales Orders` so\nJOIN Customers c ON so._CustomerID = c.CustomerID\nWHERE so.`Sales Channel` = 'Online'\nGROUP BY so._CustomerID\nHAVING SUM(CAST(REPLACE(so.`Unit Price`, ',', '') AS REAL) - CAST(REPLACE(so.`Unit Cost`, ',', '') AS REAL)) > 5000;", "label": "spurious", "unseen": false} {"case_id": "bird_q049_r2", "question_id": "bird/regional_sales/2667", "ds": "bird", "db": "regional_sales", "question": "Mention the customer names and IDs which ordered total net profit of above 5000 USD through online channel.", "evidence": "IDs refers to CustomerID; total net profit of above 5000 USD refers to SUM(Subtract(Unit Price, Unit Cost)) > 5000", "gold_sql": "SELECT DISTINCT `Customer Names`, CustomerID FROM ( SELECT T2.`Customer Names`, T2.CustomerID , SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) AS T FROM `Sales Orders` T1 INNER JOIN Customers T2 ON T2.CustomerID = T1._CustomerID WHERE T1.`Sales Channel` = 'Online' GROUP BY T2.CustomerID ) WHERE T > 5000", "pred_sql": "SELECT c.`Customer Names`, c.CustomerID\nFROM `Sales Orders` so\nJOIN Customers c ON so._CustomerID = c.CustomerID\nWHERE so.`Sales Channel` = 'Online'\n AND ( (CAST(REPLACE(so.`Unit Price`, ',', '') AS REAL) -\n CAST(REPLACE(so.`Unit Cost`, ',', '') AS REAL)) ) > 5000;", "label": "wrong", "unseen": true} {"case_id": "bird_q049_r3", "question_id": "bird/regional_sales/2667", "ds": "bird", "db": "regional_sales", "question": "Mention the customer names and IDs which ordered total net profit of above 5000 USD through online channel.", "evidence": "IDs refers to CustomerID; total net profit of above 5000 USD refers to SUM(Subtract(Unit Price, Unit Cost)) > 5000", "gold_sql": "SELECT DISTINCT `Customer Names`, CustomerID FROM ( SELECT T2.`Customer Names`, T2.CustomerID , SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) AS T FROM `Sales Orders` T1 INNER JOIN Customers T2 ON T2.CustomerID = T1._CustomerID WHERE T1.`Sales Channel` = 'Online' GROUP BY T2.CustomerID ) WHERE T > 5000", "pred_sql": "SELECT c.`Customer Names`, c.CustomerID\nFROM Customers c\nJOIN `Sales Orders` so ON so._CustomerID = c.CustomerID\nWHERE so.`Sales Channel` = 'Online'\nGROUP BY c.CustomerID, c.`Customer Names`\nHAVING SUM( CAST(REPLACE(so.`Unit Price`, ',', '') AS REAL) - CAST(REPLACE(so.`Unit Cost`, ',', '') AS REAL) ) > 5000;", "label": "correct", "unseen": false} {"case_id": "bird_q050_r0", "question_id": "bird/shakespeare/3002", "ds": "bird", "db": "shakespeare", "question": "How many scenes are there in the 5th act of \"History of Henry VIII\"?", "evidence": "5th act refers to Act = 5; \"History of Henry VIII\" refers to LongTitle = 'History of Henry VIII'", "gold_sql": "SELECT SUM(T2.Scene) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 5 AND T1.LongTitle = 'History of Henry VIII'", "pred_sql": "SELECT COUNT(*) FROM chapters AS c JOIN works AS w ON c.work_id = w.id WHERE w.LongTitle = 'History of Henry VIII' AND c.Act = 5;", "label": "wrong", "unseen": false} {"case_id": "bird_q050_r1", "question_id": "bird/shakespeare/3002", "ds": "bird", "db": "shakespeare", "question": "How many scenes are there in the 5th act of \"History of Henry VIII\"?", "evidence": "5th act refers to Act = 5; \"History of Henry VIII\" refers to LongTitle = 'History of Henry VIII'", "gold_sql": "SELECT SUM(T2.Scene) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 5 AND T1.LongTitle = 'History of Henry VIII'", "pred_sql": "SELECT COUNT(*) FROM chapters AS c JOIN works AS w ON c.work_id = w.id WHERE c.Act = 5 AND w.LongTitle = 'History of Henry VIII';", "label": "wrong", "unseen": false} {"case_id": "bird_q050_r2", "question_id": "bird/shakespeare/3002", "ds": "bird", "db": "shakespeare", "question": "How many scenes are there in the 5th act of \"History of Henry VIII\"?", "evidence": "5th act refers to Act = 5; \"History of Henry VIII\" refers to LongTitle = 'History of Henry VIII'", "gold_sql": "SELECT SUM(T2.Scene) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 5 AND T1.LongTitle = 'History of Henry VIII'", "pred_sql": "SELECT COUNT(*) FROM chapters c JOIN works w ON c.work_id = w.id WHERE c.Act = 5 AND w.LongTitle = 'History of Henry VIII';", "label": "wrong", "unseen": false} {"case_id": "bird_q050_r3", "question_id": "bird/shakespeare/3002", "ds": "bird", "db": "shakespeare", "question": "How many scenes are there in the 5th act of \"History of Henry VIII\"?", "evidence": "5th act refers to Act = 5; \"History of Henry VIII\" refers to LongTitle = 'History of Henry VIII'", "gold_sql": "SELECT SUM(T2.Scene) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 5 AND T1.LongTitle = 'History of Henry VIII'", "pred_sql": "SELECT COUNT(*) FROM chapters JOIN works ON chapters.work_id = works.id WHERE works.LongTitle = 'History of Henry VIII' AND chapters.Act = 5;", "label": "wrong", "unseen": false} {"case_id": "bird_q051_r0", "question_id": "bird/image_and_language/7591", "ds": "bird", "db": "image_and_language", "question": "How many images have \"picture\" as their attribute class?", "evidence": "images have \"picture\" as their attribute class refer to IMG_ID where ATT_CLASS = 'picture';", "gold_sql": "SELECT COUNT(T2.IMG_ID) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'picture'", "pred_sql": "SELECT COUNT(*) FROM IMG_OBJ_ATT AS ioa JOIN ATT_CLASSES AS ac ON ioa.ATT_CLASS_ID = ac.ATT_CLASS_ID WHERE ac.ATT_CLASS = 'picture';", "label": "correct", "unseen": false} {"case_id": "bird_q051_r1", "question_id": "bird/image_and_language/7591", "ds": "bird", "db": "image_and_language", "question": "How many images have \"picture\" as their attribute class?", "evidence": "images have \"picture\" as their attribute class refer to IMG_ID where ATT_CLASS = 'picture';", "gold_sql": "SELECT COUNT(T2.IMG_ID) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'picture'", "pred_sql": "SELECT COUNT(*) FROM IMG_OBJ_ATT AS ioa JOIN ATT_CLASSES AS ac ON ioa.ATT_CLASS_ID = ac.ATT_CLASS_ID WHERE ac.ATT_CLASS = 'picture';", "label": "correct", "unseen": false} {"case_id": "bird_q051_r2", "question_id": "bird/image_and_language/7591", "ds": "bird", "db": "image_and_language", "question": "How many images have \"picture\" as their attribute class?", "evidence": "images have \"picture\" as their attribute class refer to IMG_ID where ATT_CLASS = 'picture';", "gold_sql": "SELECT COUNT(T2.IMG_ID) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'picture'", "pred_sql": "SELECT COUNT(*) AS image_count\nFROM IMG_OBJ_ATT ioa\nJOIN ATT_CLASSES ac ON ioa.ATT_CLASS_ID = ac.ATT_CLASS_ID\nWHERE ac.ATT_CLASS = 'picture';", "label": "correct", "unseen": false} {"case_id": "bird_q051_r3", "question_id": "bird/image_and_language/7591", "ds": "bird", "db": "image_and_language", "question": "How many images have \"picture\" as their attribute class?", "evidence": "images have \"picture\" as their attribute class refer to IMG_ID where ATT_CLASS = 'picture';", "gold_sql": "SELECT COUNT(T2.IMG_ID) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'picture'", "pred_sql": "SELECT COUNT(*) FROM IMG_OBJ_ATT AS ioa JOIN ATT_CLASSES AS ac ON ioa.ATT_CLASS_ID = ac.ATT_CLASS_ID WHERE ac.ATT_CLASS = 'picture';", "label": "correct", "unseen": false} {"case_id": "bird_q052_r0", "question_id": "bird/retails/6875", "ds": "bird", "db": "retails", "question": "How many suppliers for the part \"hot spring dodger dim light\" are in Vietnam?", "evidence": "part \"hot spring dodger dim light\" refers to p_name = 'hot spring dodger dim light'; Vietnam refers to n_name = 'VIETNAM'", "gold_sql": "SELECT COUNT(T3.s_name) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey INNER JOIN nation AS T4 ON T3.s_nationkey = T4.n_nationkey WHERE T1.p_name = 'hot spring dodger dim light' AND T4.n_name = 'VIETNAM'", "pred_sql": "SELECT COUNT(*)\nFROM supplier s\nJOIN partsupp ps ON s.s_suppkey = ps.ps_suppkey\nJOIN part p ON ps.ps_partkey = p.p_partkey\nJOIN nation n ON s.s_nationkey = n.n_nationkey\nWHERE p.p_name = 'hot spring dodger dim light'\n AND n.n_name = 'VIETNAM';", "label": "spurious", "unseen": false} {"case_id": "bird_q052_r1", "question_id": "bird/retails/6875", "ds": "bird", "db": "retails", "question": "How many suppliers for the part \"hot spring dodger dim light\" are in Vietnam?", "evidence": "part \"hot spring dodger dim light\" refers to p_name = 'hot spring dodger dim light'; Vietnam refers to n_name = 'VIETNAM'", "gold_sql": "SELECT COUNT(T3.s_name) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey INNER JOIN nation AS T4 ON T3.s_nationkey = T4.n_nationkey WHERE T1.p_name = 'hot spring dodger dim light' AND T4.n_name = 'VIETNAM'", "pred_sql": "SELECT COUNT(*) FROM supplier s JOIN nation n ON s.s_nationkey = n.n_nationkey JOIN partsupp ps ON ps.ps_suppkey = s.s_suppkey JOIN part p ON p.p_partkey = ps.ps_partkey WHERE p.p_name = 'hot spring dodger dim light' AND n.n_name = 'VIETNAM';", "label": "spurious", "unseen": false} {"case_id": "bird_q052_r2", "question_id": "bird/retails/6875", "ds": "bird", "db": "retails", "question": "How many suppliers for the part \"hot spring dodger dim light\" are in Vietnam?", "evidence": "part \"hot spring dodger dim light\" refers to p_name = 'hot spring dodger dim light'; Vietnam refers to n_name = 'VIETNAM'", "gold_sql": "SELECT COUNT(T3.s_name) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey INNER JOIN nation AS T4 ON T3.s_nationkey = T4.n_nationkey WHERE T1.p_name = 'hot spring dodger dim light' AND T4.n_name = 'VIETNAM'", "pred_sql": "SELECT COUNT(*)\nFROM supplier s\nJOIN partsupp ps ON s.s_suppkey = ps.ps_suppkey\nJOIN part p ON ps.ps_partkey = p.p_partkey\nJOIN nation n ON s.s_nationkey = n.n_nationkey\nWHERE p.p_name = 'hot spring dodger dim light'\n AND n.n_name = 'VIETNAM';", "label": "spurious", "unseen": false} {"case_id": "bird_q052_r3", "question_id": "bird/retails/6875", "ds": "bird", "db": "retails", "question": "How many suppliers for the part \"hot spring dodger dim light\" are in Vietnam?", "evidence": "part \"hot spring dodger dim light\" refers to p_name = 'hot spring dodger dim light'; Vietnam refers to n_name = 'VIETNAM'", "gold_sql": "SELECT COUNT(T3.s_name) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey INNER JOIN nation AS T4 ON T3.s_nationkey = T4.n_nationkey WHERE T1.p_name = 'hot spring dodger dim light' AND T4.n_name = 'VIETNAM'", "pred_sql": "SELECT COUNT(*) AS supplier_count\nFROM part p\nJOIN partsupp ps ON p.p_partkey = ps.ps_partkey\nJOIN supplier s ON ps.ps_suppkey = s.s_suppkey\nJOIN nation n ON s.s_nationkey = n.n_nationkey\nWHERE p.p_name = 'hot spring dodger dim light'\n AND n.n_name = 'VIETNAM';", "label": "spurious", "unseen": false} {"case_id": "bird_q053_r0", "question_id": "bird/books/6083", "ds": "bird", "db": "books", "question": "How many books were ordered by customer Kandy Adamec?", "evidence": "", "gold_sql": "SELECT COUNT(*) FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T3.first_name = 'Kandy' AND T3.last_name = 'Adamec'", "pred_sql": "SELECT COUNT(*) \nFROM order_line AS ol\nJOIN cust_order AS co ON ol.order_id = co.order_id\nJOIN customer AS c ON co.customer_id = c.customer_id\nWHERE c.first_name = 'Kandy' AND c.last_name = 'Adamec';", "label": "correct", "unseen": false} {"case_id": "bird_q053_r1", "question_id": "bird/books/6083", "ds": "bird", "db": "books", "question": "How many books were ordered by customer Kandy Adamec?", "evidence": "", "gold_sql": "SELECT COUNT(*) FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T3.first_name = 'Kandy' AND T3.last_name = 'Adamec'", "pred_sql": "SELECT COUNT(*) \nFROM cust_order co\nJOIN customer c ON co.customer_id = c.customer_id\nJOIN order_line ol ON co.order_id = ol.order_id\nWHERE c.first_name = 'Kandy' AND c.last_name = 'Adamec';", "label": "correct", "unseen": false} {"case_id": "bird_q053_r2", "question_id": "bird/books/6083", "ds": "bird", "db": "books", "question": "How many books were ordered by customer Kandy Adamec?", "evidence": "", "gold_sql": "SELECT COUNT(*) FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T3.first_name = 'Kandy' AND T3.last_name = 'Adamec'", "pred_sql": "SELECT COUNT(*) FROM order_line ol JOIN cust_order co ON ol.order_id = co.order_id JOIN customer c ON co.customer_id = c.customer_id WHERE c.first_name = 'Kandy' AND c.last_name = 'Adamec';", "label": "correct", "unseen": false} {"case_id": "bird_q053_r3", "question_id": "bird/books/6083", "ds": "bird", "db": "books", "question": "How many books were ordered by customer Kandy Adamec?", "evidence": "", "gold_sql": "SELECT COUNT(*) FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T3.first_name = 'Kandy' AND T3.last_name = 'Adamec'", "pred_sql": "SELECT COUNT(*) FROM order_line AS ol JOIN cust_order AS co ON ol.order_id = co.order_id JOIN customer AS c ON co.customer_id = c.customer_id WHERE c.first_name = 'Kandy' AND c.last_name = 'Adamec';", "label": "correct", "unseen": false} {"case_id": "bird_q054_r0", "question_id": "bird/student_loan/4549", "ds": "bird", "db": "student_loan", "question": "Provide the name of disabled male students that are unemployed.", "evidence": "disabled male students that are unemployed refers to unemployed.name = male.name = disabled.name;", "gold_sql": "SELECT T2.NAME FROM unemployed AS T1 INNER JOIN male AS T2 ON T1.name = T2.name INNER JOIN disabled AS T3 ON T3.name = T2.name", "pred_sql": "SELECT p.name\nFROM person AS p\nJOIN disabled AS d ON p.name = d.name\nJOIN male AS m ON p.name = m.name\nJOIN unemployed AS u ON p.name = u.name;", "label": "correct", "unseen": false} {"case_id": "bird_q054_r1", "question_id": "bird/student_loan/4549", "ds": "bird", "db": "student_loan", "question": "Provide the name of disabled male students that are unemployed.", "evidence": "disabled male students that are unemployed refers to unemployed.name = male.name = disabled.name;", "gold_sql": "SELECT T2.NAME FROM unemployed AS T1 INNER JOIN male AS T2 ON T1.name = T2.name INNER JOIN disabled AS T3 ON T3.name = T2.name", "pred_sql": "SELECT disabled.name\nFROM disabled\nJOIN male ON disabled.name = male.name\nJOIN unemployed ON disabled.name = unemployed.name;", "label": "correct", "unseen": false} {"case_id": "bird_q054_r2", "question_id": "bird/student_loan/4549", "ds": "bird", "db": "student_loan", "question": "Provide the name of disabled male students that are unemployed.", "evidence": "disabled male students that are unemployed refers to unemployed.name = male.name = disabled.name;", "gold_sql": "SELECT T2.NAME FROM unemployed AS T1 INNER JOIN male AS T2 ON T1.name = T2.name INNER JOIN disabled AS T3 ON T3.name = T2.name", "pred_sql": "SELECT d.name\nFROM disabled d\nJOIN male m ON d.name = m.name\nJOIN unemployed u ON d.name = u.name;", "label": "correct", "unseen": false} {"case_id": "bird_q054_r3", "question_id": "bird/student_loan/4549", "ds": "bird", "db": "student_loan", "question": "Provide the name of disabled male students that are unemployed.", "evidence": "disabled male students that are unemployed refers to unemployed.name = male.name = disabled.name;", "gold_sql": "SELECT T2.NAME FROM unemployed AS T1 INNER JOIN male AS T2 ON T1.name = T2.name INNER JOIN disabled AS T3 ON T3.name = T2.name", "pred_sql": "SELECT d.name\nFROM disabled AS d\nJOIN male AS m ON m.name = d.name\nJOIN unemployed AS u ON u.name = d.name;", "label": "correct", "unseen": false} {"case_id": "bird_q055_r0", "question_id": "bird/food_inspection_2/6215", "ds": "bird", "db": "food_inspection_2", "question": "What is the title of the employee that inspected the establishment with license number 1576687?", "evidence": "license number 1576687 refers to license_no = 1576687", "gold_sql": "SELECT DISTINCT T1.title FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.license_no = 1576687", "pred_sql": "SELECT e.title\nFROM inspection AS i\nJOIN employee AS e ON i.employee_id = e.employee_id\nWHERE i.license_no = 1576687;", "label": "wrong", "unseen": false} {"case_id": "bird_q055_r1", "question_id": "bird/food_inspection_2/6215", "ds": "bird", "db": "food_inspection_2", "question": "What is the title of the employee that inspected the establishment with license number 1576687?", "evidence": "license number 1576687 refers to license_no = 1576687", "gold_sql": "SELECT DISTINCT T1.title FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.license_no = 1576687", "pred_sql": "SELECT e.title\nFROM employee e\nJOIN inspection i ON i.employee_id = e.employee_id\nWHERE i.license_no = 1576687;", "label": "wrong", "unseen": false} {"case_id": "bird_q055_r2", "question_id": "bird/food_inspection_2/6215", "ds": "bird", "db": "food_inspection_2", "question": "What is the title of the employee that inspected the establishment with license number 1576687?", "evidence": "license number 1576687 refers to license_no = 1576687", "gold_sql": "SELECT DISTINCT T1.title FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.license_no = 1576687", "pred_sql": "SELECT e.title\nFROM inspection i\nJOIN employee e ON i.employee_id = e.employee_id\nWHERE i.license_no = 1576687;", "label": "wrong", "unseen": false} {"case_id": "bird_q055_r3", "question_id": "bird/food_inspection_2/6215", "ds": "bird", "db": "food_inspection_2", "question": "What is the title of the employee that inspected the establishment with license number 1576687?", "evidence": "license number 1576687 refers to license_no = 1576687", "gold_sql": "SELECT DISTINCT T1.title FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.license_no = 1576687", "pred_sql": "SELECT e.title\nFROM employee AS e\nJOIN inspection AS i ON i.employee_id = e.employee_id\nWHERE i.license_no = 1576687;", "label": "wrong", "unseen": false} {"case_id": "bird_q056_r0", "question_id": "bird/restaurant/1690", "ds": "bird", "db": "restaurant", "question": "What restaurant on Drive Street in San Rafael doesn't serve American food?", "evidence": "Drive Street refers to street_name = 'drive'; San Rafael refers to city = 'san rafael'; American food refers to food_type <> 'american'", "gold_sql": "SELECT T1.label FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'drive' AND T1.food_type != 'american' AND T2.city = 'san rafael'", "pred_sql": "SELECT generalinfo.id_restaurant\nFROM generalinfo\nJOIN location ON generalinfo.id_restaurant = location.id_restaurant\nWHERE location.street_name = 'drive'\n AND location.city = 'san rafael'\n AND generalinfo.food_type <> 'american';", "label": "wrong", "unseen": false} {"case_id": "bird_q056_r1", "question_id": "bird/restaurant/1690", "ds": "bird", "db": "restaurant", "question": "What restaurant on Drive Street in San Rafael doesn't serve American food?", "evidence": "Drive Street refers to street_name = 'drive'; San Rafael refers to city = 'san rafael'; American food refers to food_type <> 'american'", "gold_sql": "SELECT T1.label FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'drive' AND T1.food_type != 'american' AND T2.city = 'san rafael'", "pred_sql": "SELECT gi.label\nFROM generalinfo AS gi\nJOIN location AS l ON l.id_restaurant = gi.id_restaurant\nWHERE l.street_name LIKE '%drive%' AND gi.food_type <> 'american';", "label": "wrong", "unseen": false} {"case_id": "bird_q056_r2", "question_id": "bird/restaurant/1690", "ds": "bird", "db": "restaurant", "question": "What restaurant on Drive Street in San Rafael doesn't serve American food?", "evidence": "Drive Street refers to street_name = 'drive'; San Rafael refers to city = 'san rafael'; American food refers to food_type <> 'american'", "gold_sql": "SELECT T1.label FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'drive' AND T1.food_type != 'american' AND T2.city = 'san rafael'", "pred_sql": "SELECT DISTINCT generalinfo.label\nFROM generalinfo\nJOIN location ON generalinfo.id_restaurant = location.id_restaurant\nWHERE location.street_name = 'drive'\n AND location.city = 'san rafael'\n AND generalinfo.food_type <> 'american';", "label": "spurious", "unseen": false} {"case_id": "bird_q056_r3", "question_id": "bird/restaurant/1690", "ds": "bird", "db": "restaurant", "question": "What restaurant on Drive Street in San Rafael doesn't serve American food?", "evidence": "Drive Street refers to street_name = 'drive'; San Rafael refers to city = 'san rafael'; American food refers to food_type <> 'american'", "gold_sql": "SELECT T1.label FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'drive' AND T1.food_type != 'american' AND T2.city = 'san rafael'", "pred_sql": "SELECT generalinfo.label\nFROM generalinfo\nJOIN location ON generalinfo.id_restaurant = location.id_restaurant\nWHERE location.street_name = 'drive'\n AND location.city = 'san rafael'\n AND generalinfo.food_type <> 'american';", "label": "correct", "unseen": false} {"case_id": "bird_q057_r0", "question_id": "bird/college_completion/3753", "ds": "bird", "db": "college_completion", "question": "What is the average SAT value for incoming students in all of the schools located in the state with the lowest state appropriations to higher education in fiscal year 2011 per resident?", "evidence": "average = DIVIDE(SUM(med_sat_value), SUM(chronname)); SAT value for incoming students refers to med_sat_value; lowest state appropriations to higher education in fiscal year 2011 per resident refers to MIN(state_appr_value);", "gold_sql": "SELECT AVG(t1.med_sat_value) FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON t1.state = t2.state ORDER BY t2.state_appr_value LIMIT 1", "pred_sql": "SELECT AVG(i.med_sat_value)\nFROM institution_details i\nJOIN state_sector_details s ON i.state = s.state\nORDER BY s.state_appr_value ASC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "bird_q057_r1", "question_id": "bird/college_completion/3753", "ds": "bird", "db": "college_completion", "question": "What is the average SAT value for incoming students in all of the schools located in the state with the lowest state appropriations to higher education in fiscal year 2011 per resident?", "evidence": "average = DIVIDE(SUM(med_sat_value), SUM(chronname)); SAT value for incoming students refers to med_sat_value; lowest state appropriations to higher education in fiscal year 2011 per resident refers to MIN(state_appr_value);", "gold_sql": "SELECT AVG(t1.med_sat_value) FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON t1.state = t2.state ORDER BY t2.state_appr_value LIMIT 1", "pred_sql": "SELECT AVG(institution_details.med_sat_value)\nFROM institution_details\nJOIN state_sector_details ON institution_details.state = state_sector_details.state\nWHERE state_sector_details.stateid = (\n SELECT stateid\n FROM state_sector_details\n WHERE year = 2011\n ORDER BY state_appr_value ASC\n LIMIT 1\n);", "label": "wrong", "unseen": true} {"case_id": "bird_q057_r2", "question_id": "bird/college_completion/3753", "ds": "bird", "db": "college_completion", "question": "What is the average SAT value for incoming students in all of the schools located in the state with the lowest state appropriations to higher education in fiscal year 2011 per resident?", "evidence": "average = DIVIDE(SUM(med_sat_value), SUM(chronname)); SAT value for incoming students refers to med_sat_value; lowest state appropriations to higher education in fiscal year 2011 per resident refers to MIN(state_appr_value);", "gold_sql": "SELECT AVG(t1.med_sat_value) FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON t1.state = t2.state ORDER BY t2.state_appr_value LIMIT 1", "pred_sql": "SELECT AVG(id.med_sat_value)\nFROM institution_details AS id\nJOIN state_sector_details AS ssd\n ON id.state = ssd.state\nWHERE ssd.state_appr_value IS NOT NULL\nORDER BY ssd.state_appr_value ASC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "bird_q057_r3", "question_id": "bird/college_completion/3753", "ds": "bird", "db": "college_completion", "question": "What is the average SAT value for incoming students in all of the schools located in the state with the lowest state appropriations to higher education in fiscal year 2011 per resident?", "evidence": "average = DIVIDE(SUM(med_sat_value), SUM(chronname)); SAT value for incoming students refers to med_sat_value; lowest state appropriations to higher education in fiscal year 2011 per resident refers to MIN(state_appr_value);", "gold_sql": "SELECT AVG(t1.med_sat_value) FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON t1.state = t2.state ORDER BY t2.state_appr_value LIMIT 1", "pred_sql": "SELECT AVG(institution_details.med_sat_value)\nFROM institution_details\nJOIN state_sector_details ON institution_details.state = state_sector_details.state\nWHERE state_sector_details.state_appr_value IS NOT NULL\nORDER BY state_sector_details.state_appr_value ASC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "bird_q058_r0", "question_id": "bird/soccer_2016/1796", "ds": "bird", "db": "soccer_2016", "question": "Please list the bowling skills of all the players from Australia.", "evidence": "Australia refers to Country_Name = 'Australia'", "gold_sql": "SELECT T2.Bowling_Skill FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id INNER JOIN Country AS T3 ON T1.Country_Name = T3.Country_Id WHERE T3.Country_Name = 'Australia' GROUP BY T2.Bowling_Skill", "pred_sql": "SELECT Bowling_Style.Bowling_skill\nFROM Player\nJOIN Country ON Player.Country_Name = Country.Country_Id\nJOIN Bowling_Style ON Player.Bowling_skill = Bowling_Style.Bowling_Id\nWHERE Country.Country_Name = 'Australia';", "label": "wrong", "unseen": false} {"case_id": "bird_q058_r1", "question_id": "bird/soccer_2016/1796", "ds": "bird", "db": "soccer_2016", "question": "Please list the bowling skills of all the players from Australia.", "evidence": "Australia refers to Country_Name = 'Australia'", "gold_sql": "SELECT T2.Bowling_Skill FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id INNER JOIN Country AS T3 ON T1.Country_Name = T3.Country_Id WHERE T3.Country_Name = 'Australia' GROUP BY T2.Bowling_Skill", "pred_sql": "SELECT DISTINCT B.Bowling_skill\nFROM Player AS P\nJOIN Country AS C ON P.Country_Name = C.Country_Id\nJOIN Bowling_Style AS B ON P.Bowling_skill = B.Bowling_Id\nWHERE C.Country_Name = 'Australia';", "label": "correct", "unseen": false} {"case_id": "bird_q058_r2", "question_id": "bird/soccer_2016/1796", "ds": "bird", "db": "soccer_2016", "question": "Please list the bowling skills of all the players from Australia.", "evidence": "Australia refers to Country_Name = 'Australia'", "gold_sql": "SELECT T2.Bowling_Skill FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id INNER JOIN Country AS T3 ON T1.Country_Name = T3.Country_Id WHERE T3.Country_Name = 'Australia' GROUP BY T2.Bowling_Skill", "pred_sql": "SELECT bs.Bowling_skill\nFROM Player p\nJOIN Country c ON p.Country_Name = c.Country_Id\nJOIN Bowling_Style bs ON p.Bowling_skill = bs.Bowling_Id\nWHERE LOWER(c.Country_Name) = 'australia';", "label": "wrong", "unseen": false} {"case_id": "bird_q058_r3", "question_id": "bird/soccer_2016/1796", "ds": "bird", "db": "soccer_2016", "question": "Please list the bowling skills of all the players from Australia.", "evidence": "Australia refers to Country_Name = 'Australia'", "gold_sql": "SELECT T2.Bowling_Skill FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id INNER JOIN Country AS T3 ON T1.Country_Name = T3.Country_Id WHERE T3.Country_Name = 'Australia' GROUP BY T2.Bowling_Skill", "pred_sql": "SELECT DISTINCT bs.Bowling_skill\nFROM Player p\nJOIN Country c ON p.Country_Name = c.Country_Id\nJOIN Bowling_Style bs ON p.Bowling_skill = bs.Bowling_Id\nWHERE c.Country_Name = 'Australia';", "label": "correct", "unseen": false} {"case_id": "bird_q059_r0", "question_id": "bird/hockey/7702", "ds": "bird", "db": "hockey", "question": "How many years did player Id \"cleghsp01\" make to the Stanley Cup finals?", "evidence": "the number of years refers to count(year)", "gold_sql": "SELECT COUNT(year) FROM ScoringSC WHERE playerID = 'cleghsp01'", "pred_sql": "SELECT COUNT(DISTINCT year) FROM ScoringSC WHERE playerID = 'cleghsp01';", "label": "spurious", "unseen": false} {"case_id": "bird_q059_r1", "question_id": "bird/hockey/7702", "ds": "bird", "db": "hockey", "question": "How many years did player Id \"cleghsp01\" make to the Stanley Cup finals?", "evidence": "the number of years refers to count(year)", "gold_sql": "SELECT COUNT(year) FROM ScoringSC WHERE playerID = 'cleghsp01'", "pred_sql": "SELECT COUNT(*) FROM ScoringSC WHERE playerID = 'cleghsp01';", "label": "spurious", "unseen": false} {"case_id": "bird_q059_r2", "question_id": "bird/hockey/7702", "ds": "bird", "db": "hockey", "question": "How many years did player Id \"cleghsp01\" make to the Stanley Cup finals?", "evidence": "the number of years refers to count(year)", "gold_sql": "SELECT COUNT(year) FROM ScoringSC WHERE playerID = 'cleghsp01'", "pred_sql": "SELECT COUNT(*) FROM ScoringSC WHERE playerID = 'cleghsp01';", "label": "spurious", "unseen": false} {"case_id": "bird_q059_r3", "question_id": "bird/hockey/7702", "ds": "bird", "db": "hockey", "question": "How many years did player Id \"cleghsp01\" make to the Stanley Cup finals?", "evidence": "the number of years refers to count(year)", "gold_sql": "SELECT COUNT(year) FROM ScoringSC WHERE playerID = 'cleghsp01'", "pred_sql": "SELECT COUNT(*) FROM ScoringSC WHERE playerID = 'cleghsp01';", "label": "spurious", "unseen": false} {"case_id": "bird_q060_r0", "question_id": "bird/car_retails/1582", "ds": "bird", "db": "car_retails", "question": "State top 3 emails of UK Sales Rep who have the highest credit limit.", "evidence": "UK is a country; Sales Rep is a job title;", "gold_sql": "SELECT T2.email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep' AND T1.country = 'UK' GROUP BY T1.customerName, T2.email ORDER BY SUM(T1.creditLimit) DESC LIMIT 3", "pred_sql": "SELECT e.email\nFROM employees e\nJOIN customers c ON e.employeeNumber = c.salesRepEmployeeNumber\nWHERE e.jobTitle = 'Sales Rep'\n AND c.country = 'UK'\nORDER BY c.creditLimit DESC\nLIMIT 3;", "label": "spurious", "unseen": false} {"case_id": "bird_q060_r1", "question_id": "bird/car_retails/1582", "ds": "bird", "db": "car_retails", "question": "State top 3 emails of UK Sales Rep who have the highest credit limit.", "evidence": "UK is a country; Sales Rep is a job title;", "gold_sql": "SELECT T2.email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep' AND T1.country = 'UK' GROUP BY T1.customerName, T2.email ORDER BY SUM(T1.creditLimit) DESC LIMIT 3", "pred_sql": "SELECT e.email\nFROM employees e\nJOIN customers c ON e.employeeNumber = c.salesRepEmployeeNumber\nWHERE e.jobTitle = 'Sales Rep'\n AND c.country = 'UK'\nORDER BY c.creditLimit DESC\nLIMIT 3;", "label": "spurious", "unseen": false} {"case_id": "bird_q060_r2", "question_id": "bird/car_retails/1582", "ds": "bird", "db": "car_retails", "question": "State top 3 emails of UK Sales Rep who have the highest credit limit.", "evidence": "UK is a country; Sales Rep is a job title;", "gold_sql": "SELECT T2.email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep' AND T1.country = 'UK' GROUP BY T1.customerName, T2.email ORDER BY SUM(T1.creditLimit) DESC LIMIT 3", "pred_sql": "SELECT e.email\nFROM employees e\nJOIN customers c ON e.employeeNumber = c.salesRepEmployeeNumber\nWHERE e.jobTitle = 'Sales Rep'\n AND c.country = 'UK'\nORDER BY c.creditLimit DESC\nLIMIT 3;", "label": "spurious", "unseen": false} {"case_id": "bird_q060_r3", "question_id": "bird/car_retails/1582", "ds": "bird", "db": "car_retails", "question": "State top 3 emails of UK Sales Rep who have the highest credit limit.", "evidence": "UK is a country; Sales Rep is a job title;", "gold_sql": "SELECT T2.email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep' AND T1.country = 'UK' GROUP BY T1.customerName, T2.email ORDER BY SUM(T1.creditLimit) DESC LIMIT 3", "pred_sql": "SELECT e.email\nFROM employees e\nJOIN customers c ON e.employeeNumber = c.salesRepEmployeeNumber\nWHERE e.jobTitle = 'Sales Rep' AND c.country = 'UK'\nORDER BY c.creditLimit DESC\nLIMIT 3;", "label": "spurious", "unseen": false} {"case_id": "bird_q061_r0", "question_id": "bird/chicago_crime/8660", "ds": "bird", "db": "chicago_crime", "question": "Calculate the average population of community areas in the West side.", "evidence": "the West side refers to side = 'West'; average population = avg(population) where side = 'West'", "gold_sql": "SELECT AVG(population) FROM Community_Area WHERE side = 'West '", "pred_sql": "SELECT AVG(CAST(Community_Area.population AS INTEGER)) AS avg_population\nFROM Community_Area\nWHERE Community_Area.side = 'West';", "label": "wrong", "unseen": true} {"case_id": "bird_q061_r1", "question_id": "bird/chicago_crime/8660", "ds": "bird", "db": "chicago_crime", "question": "Calculate the average population of community areas in the West side.", "evidence": "the West side refers to side = 'West'; average population = avg(population) where side = 'West'", "gold_sql": "SELECT AVG(population) FROM Community_Area WHERE side = 'West '", "pred_sql": "SELECT AVG(CAST(REPLACE(population, ',', '') AS REAL)) FROM Community_Area WHERE side = 'West';", "label": "wrong", "unseen": true} {"case_id": "bird_q061_r2", "question_id": "bird/chicago_crime/8660", "ds": "bird", "db": "chicago_crime", "question": "Calculate the average population of community areas in the West side.", "evidence": "the West side refers to side = 'West'; average population = avg(population) where side = 'West'", "gold_sql": "SELECT AVG(population) FROM Community_Area WHERE side = 'West '", "pred_sql": "SELECT AVG(CAST(REPLACE(population, ',', '') AS REAL)) AS avg_population\nFROM Community_Area\nWHERE side = 'West';", "label": "wrong", "unseen": true} {"case_id": "bird_q061_r3", "question_id": "bird/chicago_crime/8660", "ds": "bird", "db": "chicago_crime", "question": "Calculate the average population of community areas in the West side.", "evidence": "the West side refers to side = 'West'; average population = avg(population) where side = 'West'", "gold_sql": "SELECT AVG(population) FROM Community_Area WHERE side = 'West '", "pred_sql": "SELECT AVG(CAST(REPLACE(population, ',', '') AS INTEGER)) AS average_population\nFROM Community_Area\nWHERE side = 'West';", "label": "wrong", "unseen": true} {"case_id": "bird_q062_r0", "question_id": "bird/video_games/3307", "ds": "bird", "db": "video_games", "question": "How many more games were sold on game platform ID 50 than on game platform ID 51 in region ID 1?", "evidence": "result = subtract(sum(num_sales where game_platform_id = 50), sum(num_sales where game_platform_id = 51))", "gold_sql": "SELECT (SUM(CASE WHEN T.game_platform_id = 50 THEN T.num_sales ELSE 0 END) - SUM(CASE WHEN T.game_platform_id = 51 THEN T.num_sales ELSE 0 END)) * 100000 AS nums FROM region_sales AS T WHERE T.region_id = 1", "pred_sql": "SELECT SUM(CASE WHEN gpl.id = 50 THEN rs.num_sales END) -\n SUM(CASE WHEN gpl.id = 51 THEN rs.num_sales END) AS sales_diff\nFROM region_sales rs\nJOIN game_platform gpl ON gpl.id = rs.game_platform_id\nWHERE rs.region_id = 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q062_r1", "question_id": "bird/video_games/3307", "ds": "bird", "db": "video_games", "question": "How many more games were sold on game platform ID 50 than on game platform ID 51 in region ID 1?", "evidence": "result = subtract(sum(num_sales where game_platform_id = 50), sum(num_sales where game_platform_id = 51))", "gold_sql": "SELECT (SUM(CASE WHEN T.game_platform_id = 50 THEN T.num_sales ELSE 0 END) - SUM(CASE WHEN T.game_platform_id = 51 THEN T.num_sales ELSE 0 END)) * 100000 AS nums FROM region_sales AS T WHERE T.region_id = 1", "pred_sql": "SELECT\n SUM(CASE WHEN game_platform_id = 50 THEN num_sales ELSE 0 END)\n - SUM(CASE WHEN game_platform_id = 51 THEN num_sales ELSE 0 END) AS difference\nFROM region_sales\nWHERE region_id = 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q062_r2", "question_id": "bird/video_games/3307", "ds": "bird", "db": "video_games", "question": "How many more games were sold on game platform ID 50 than on game platform ID 51 in region ID 1?", "evidence": "result = subtract(sum(num_sales where game_platform_id = 50), sum(num_sales where game_platform_id = 51))", "gold_sql": "SELECT (SUM(CASE WHEN T.game_platform_id = 50 THEN T.num_sales ELSE 0 END) - SUM(CASE WHEN T.game_platform_id = 51 THEN T.num_sales ELSE 0 END)) * 100000 AS nums FROM region_sales AS T WHERE T.region_id = 1", "pred_sql": "SELECT SUM(CASE WHEN gp.id = 50 THEN rs.num_sales ELSE 0 END) - SUM(CASE WHEN gp.id = 51 THEN rs.num_sales ELSE 0 END) AS sales_difference\nFROM region_sales AS rs\nJOIN game_platform AS gp ON gp.id = rs.game_platform_id\nWHERE rs.region_id = 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q062_r3", "question_id": "bird/video_games/3307", "ds": "bird", "db": "video_games", "question": "How many more games were sold on game platform ID 50 than on game platform ID 51 in region ID 1?", "evidence": "result = subtract(sum(num_sales where game_platform_id = 50), sum(num_sales where game_platform_id = 51))", "gold_sql": "SELECT (SUM(CASE WHEN T.game_platform_id = 50 THEN T.num_sales ELSE 0 END) - SUM(CASE WHEN T.game_platform_id = 51 THEN T.num_sales ELSE 0 END)) * 100000 AS nums FROM region_sales AS T WHERE T.region_id = 1", "pred_sql": "SELECT (SUM(CASE WHEN game_platform_id = 50 THEN num_sales ELSE 0 END) -\n SUM(CASE WHEN game_platform_id = 51 THEN num_sales ELSE 0 END)) AS diff\nFROM region_sales\nWHERE region_id = 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q063_r0", "question_id": "bird/shakespeare/3000", "ds": "bird", "db": "shakespeare", "question": "In \"Florence. Without the walls. A tucket afar off\", what is the id of the character that was mentioned in \"His name, I pray you.\"?", "evidence": "\"Florence. Without the walls. A tucket afar off\" refers to chapters.Description = 'Florence. Without the walls. A tucket afar off.'; \"His name, I pray you.\" refers to PlainText = 'His name, I pray you.'", "gold_sql": "SELECT T1.character_id FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id WHERE T1.PlainText = 'His name, I pray you.' AND T2.Description = 'Florence. Without the walls. A tucket afar off.'", "pred_sql": "SELECT DISTINCT p.character_id\nFROM paragraphs p\nJOIN chapters c ON p.chapter_id = c.id\nWHERE c.Description = 'Florence. Without the walls. A tucket afar off.'\n AND p.PlainText = 'His name, I pray you.';", "label": "spurious", "unseen": false} {"case_id": "bird_q063_r1", "question_id": "bird/shakespeare/3000", "ds": "bird", "db": "shakespeare", "question": "In \"Florence. Without the walls. A tucket afar off\", what is the id of the character that was mentioned in \"His name, I pray you.\"?", "evidence": "\"Florence. Without the walls. A tucket afar off\" refers to chapters.Description = 'Florence. Without the walls. A tucket afar off.'; \"His name, I pray you.\" refers to PlainText = 'His name, I pray you.'", "gold_sql": "SELECT T1.character_id FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id WHERE T1.PlainText = 'His name, I pray you.' AND T2.Description = 'Florence. Without the walls. A tucket afar off.'", "pred_sql": "SELECT paragraphs.character_id\nFROM paragraphs\nJOIN chapters ON paragraphs.chapter_id = chapters.id\nWHERE chapters.Description = 'Florence. Without the walls. A tucket afar off.'\n AND paragraphs.PlainText = 'His name, I pray you.';", "label": "correct", "unseen": false} {"case_id": "bird_q063_r2", "question_id": "bird/shakespeare/3000", "ds": "bird", "db": "shakespeare", "question": "In \"Florence. Without the walls. A tucket afar off\", what is the id of the character that was mentioned in \"His name, I pray you.\"?", "evidence": "\"Florence. Without the walls. A tucket afar off\" refers to chapters.Description = 'Florence. Without the walls. A tucket afar off.'; \"His name, I pray you.\" refers to PlainText = 'His name, I pray you.'", "gold_sql": "SELECT T1.character_id FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id WHERE T1.PlainText = 'His name, I pray you.' AND T2.Description = 'Florence. Without the walls. A tucket afar off.'", "pred_sql": "SELECT p.character_id\nFROM paragraphs p\nJOIN chapters c ON p.chapter_id = c.id\nWHERE c.Description = 'Florence. Without the walls. A tucket afar off.'\n AND p.PlainText = 'His name, I pray you.';", "label": "correct", "unseen": false} {"case_id": "bird_q063_r3", "question_id": "bird/shakespeare/3000", "ds": "bird", "db": "shakespeare", "question": "In \"Florence. Without the walls. A tucket afar off\", what is the id of the character that was mentioned in \"His name, I pray you.\"?", "evidence": "\"Florence. Without the walls. A tucket afar off\" refers to chapters.Description = 'Florence. Without the walls. A tucket afar off.'; \"His name, I pray you.\" refers to PlainText = 'His name, I pray you.'", "gold_sql": "SELECT T1.character_id FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id WHERE T1.PlainText = 'His name, I pray you.' AND T2.Description = 'Florence. Without the walls. A tucket afar off.'", "pred_sql": "SELECT paragraphs.character_id\nFROM paragraphs\nJOIN chapters ON paragraphs.chapter_id = chapters.id\nWHERE chapters.Description = 'Florence. Without the walls. A tucket afar off.'\n AND paragraphs.PlainText = 'His name, I pray you.';", "label": "correct", "unseen": false} {"case_id": "bird_q064_r0", "question_id": "bird/shipping/5642", "ds": "bird", "db": "shipping", "question": "Give the phone of drivers who transported shipment weight of greater than 20000 pounds.", "evidence": "shipment weight of greater than 20000 pounds refers to Sum(weight) > 20000", "gold_sql": "SELECT T2.phone FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id GROUP BY T2.driver_id HAVING SUM(T1.weight) > 20000", "pred_sql": "SELECT DISTINCT driver.phone\nFROM driver\nJOIN shipment ON driver.driver_id = shipment.driver_id\nWHERE shipment.weight > 20000;", "label": "wrong", "unseen": true} {"case_id": "bird_q064_r1", "question_id": "bird/shipping/5642", "ds": "bird", "db": "shipping", "question": "Give the phone of drivers who transported shipment weight of greater than 20000 pounds.", "evidence": "shipment weight of greater than 20000 pounds refers to Sum(weight) > 20000", "gold_sql": "SELECT T2.phone FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id GROUP BY T2.driver_id HAVING SUM(T1.weight) > 20000", "pred_sql": "SELECT DISTINCT driver.phone\nFROM driver\nJOIN shipment ON shipment.driver_id = driver.driver_id\nWHERE shipment.weight > 20000;", "label": "wrong", "unseen": true} {"case_id": "bird_q064_r2", "question_id": "bird/shipping/5642", "ds": "bird", "db": "shipping", "question": "Give the phone of drivers who transported shipment weight of greater than 20000 pounds.", "evidence": "shipment weight of greater than 20000 pounds refers to Sum(weight) > 20000", "gold_sql": "SELECT T2.phone FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id GROUP BY T2.driver_id HAVING SUM(T1.weight) > 20000", "pred_sql": "SELECT DISTINCT d.phone\nFROM driver d\nJOIN shipment s ON s.driver_id = d.driver_id\nGROUP BY d.driver_id\nHAVING SUM(s.weight) > 20000;", "label": "spurious", "unseen": false} {"case_id": "bird_q064_r3", "question_id": "bird/shipping/5642", "ds": "bird", "db": "shipping", "question": "Give the phone of drivers who transported shipment weight of greater than 20000 pounds.", "evidence": "shipment weight of greater than 20000 pounds refers to Sum(weight) > 20000", "gold_sql": "SELECT T2.phone FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id GROUP BY T2.driver_id HAVING SUM(T1.weight) > 20000", "pred_sql": "SELECT d.phone\nFROM driver d\nJOIN shipment s ON d.driver_id = s.driver_id\nGROUP BY d.driver_id\nHAVING SUM(s.weight) > 20000;", "label": "correct", "unseen": false} {"case_id": "bird_q065_r0", "question_id": "bird/shooting/2474", "ds": "bird", "db": "shooting", "question": "From the 'Injured' statuses of the subject, what is the ratio of weapons used are knife against handgun?", "evidence": "the 'Shoot and Miss' status refers to subject_statuses = 'Shoot and Miss'; knife refers to subject_weapon = 'knife'; toy handgun refers to subject_weapon = 'toy handgun'; ratio = divide(count(case_number where subject_weapon = 'knife'), count(case_number where subject_weapon = 'toy handgun')) where subject_statuses = 'Shoot and Miss'", "gold_sql": "SELECT CAST(SUM(T1.subject_weapon = 'Knife') AS REAL) * 100 / SUM(T1.subject_weapon = 'Handgun') FROM incidents AS T1 INNER JOIN subjects AS T2 ON T1.case_number = T2.case_number WHERE T1.subject_statuses = 'Injured'", "pred_sql": "SELECT SUM(CASE WHEN subject_weapon = 'Knife' THEN 1 ELSE 0 END) * 1.0 / NULLIF(SUM(CASE WHEN subject_weapon = 'Toy handgun' THEN 1 ELSE 0 END), 0) AS ratio\nFROM incidents\nWHERE subject_statuses = 'Injured';", "label": "wrong", "unseen": true} {"case_id": "bird_q065_r1", "question_id": "bird/shooting/2474", "ds": "bird", "db": "shooting", "question": "From the 'Injured' statuses of the subject, what is the ratio of weapons used are knife against handgun?", "evidence": "the 'Shoot and Miss' status refers to subject_statuses = 'Shoot and Miss'; knife refers to subject_weapon = 'knife'; toy handgun refers to subject_weapon = 'toy handgun'; ratio = divide(count(case_number where subject_weapon = 'knife'), count(case_number where subject_weapon = 'toy handgun')) where subject_statuses = 'Shoot and Miss'", "gold_sql": "SELECT CAST(SUM(T1.subject_weapon = 'Knife') AS REAL) * 100 / SUM(T1.subject_weapon = 'Handgun') FROM incidents AS T1 INNER JOIN subjects AS T2 ON T1.case_number = T2.case_number WHERE T1.subject_statuses = 'Injured'", "pred_sql": "SELECT SUM(CASE WHEN subject_weapon = 'knife' THEN 1 ELSE 0 END) * 1.0 / SUM(CASE WHEN subject_weapon = 'toy handgun' THEN 1 ELSE 0 END) AS ratio\nFROM incidents\nWHERE subject_statuses = 'Shoot and Miss';", "label": "wrong", "unseen": true} {"case_id": "bird_q065_r2", "question_id": "bird/shooting/2474", "ds": "bird", "db": "shooting", "question": "From the 'Injured' statuses of the subject, what is the ratio of weapons used are knife against handgun?", "evidence": "the 'Shoot and Miss' status refers to subject_statuses = 'Shoot and Miss'; knife refers to subject_weapon = 'knife'; toy handgun refers to subject_weapon = 'toy handgun'; ratio = divide(count(case_number where subject_weapon = 'knife'), count(case_number where subject_weapon = 'toy handgun')) where subject_statuses = 'Shoot and Miss'", "gold_sql": "SELECT CAST(SUM(T1.subject_weapon = 'Knife') AS REAL) * 100 / SUM(T1.subject_weapon = 'Handgun') FROM incidents AS T1 INNER JOIN subjects AS T2 ON T1.case_number = T2.case_number WHERE T1.subject_statuses = 'Injured'", "pred_sql": "SELECT CAST(SUM(CASE WHEN i.subject_weapon = 'Knife' THEN 1 ELSE 0 END) AS REAL) * 100.0 / SUM(CASE WHEN i.subject_weapon = 'Handgun' THEN 1 ELSE 0 END) AS ratio\nFROM incidents i\nJOIN subjects s ON i.case_number = s.case_number\nWHERE i.subject_statuses = 'Injured';", "label": "correct", "unseen": true} {"case_id": "bird_q065_r3", "question_id": "bird/shooting/2474", "ds": "bird", "db": "shooting", "question": "From the 'Injured' statuses of the subject, what is the ratio of weapons used are knife against handgun?", "evidence": "the 'Shoot and Miss' status refers to subject_statuses = 'Shoot and Miss'; knife refers to subject_weapon = 'knife'; toy handgun refers to subject_weapon = 'toy handgun'; ratio = divide(count(case_number where subject_weapon = 'knife'), count(case_number where subject_weapon = 'toy handgun')) where subject_statuses = 'Shoot and Miss'", "gold_sql": "SELECT CAST(SUM(T1.subject_weapon = 'Knife') AS REAL) * 100 / SUM(T1.subject_weapon = 'Handgun') FROM incidents AS T1 INNER JOIN subjects AS T2 ON T1.case_number = T2.case_number WHERE T1.subject_statuses = 'Injured'", "pred_sql": "SELECT SUM(CASE WHEN subject_weapon = 'Knife' THEN 1 ELSE 0 END) * 1.0 / SUM(CASE WHEN subject_weapon = 'Handgun' THEN 1 ELSE 0 END) AS ratio\nFROM incidents\nWHERE subject_statuses = 'Injured';", "label": "wrong", "unseen": true} {"case_id": "bird_q066_r0", "question_id": "bird/movielens/2319", "ds": "bird", "db": "movielens", "question": "List the movie that has been rated most by 25 years old users.", "evidence": "", "gold_sql": "SELECT T2.movieid FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid WHERE T1.age = 25 GROUP BY T2.movieid ORDER BY COUNT(T1.userid) DESC LIMIT 1", "pred_sql": "SELECT m.movieid\nFROM movies AS m\nJOIN u2base AS u ON u.movieid = m.movieid\nJOIN users AS u2 ON u.userid = u2.userid\nWHERE u2.age = '25'\nGROUP BY m.movieid\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "bird_q066_r1", "question_id": "bird/movielens/2319", "ds": "bird", "db": "movielens", "question": "List the movie that has been rated most by 25 years old users.", "evidence": "", "gold_sql": "SELECT T2.movieid FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid WHERE T1.age = 25 GROUP BY T2.movieid ORDER BY COUNT(T1.userid) DESC LIMIT 1", "pred_sql": "SELECT m.movieid\nFROM movies m\nJOIN u2base u ON m.movieid = u.movieid\nJOIN users u2 ON u.userid = u2.userid\nWHERE u2.age = '25'\nGROUP BY m.movieid\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "bird_q066_r2", "question_id": "bird/movielens/2319", "ds": "bird", "db": "movielens", "question": "List the movie that has been rated most by 25 years old users.", "evidence": "", "gold_sql": "SELECT T2.movieid FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid WHERE T1.age = 25 GROUP BY T2.movieid ORDER BY COUNT(T1.userid) DESC LIMIT 1", "pred_sql": "SELECT m.movieid, m.runningtime\nFROM movies m\nJOIN u2base u ON m.movieid = u.movieid\nJOIN users us ON u.userid = us.userid\nWHERE us.age = '25'\nGROUP BY u.movieid\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q066_r3", "question_id": "bird/movielens/2319", "ds": "bird", "db": "movielens", "question": "List the movie that has been rated most by 25 years old users.", "evidence": "", "gold_sql": "SELECT T2.movieid FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid WHERE T1.age = 25 GROUP BY T2.movieid ORDER BY COUNT(T1.userid) DESC LIMIT 1", "pred_sql": "SELECT m.movieid\nFROM u2base ub\nJOIN users u ON ub.userid = u.userid\nJOIN movies m ON ub.movieid = m.movieid\nWHERE u.age = '25'\nGROUP BY m.movieid\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "bird_q067_r0", "question_id": "bird/disney/4717", "ds": "bird", "db": "disney", "question": "Calculate the percentage of directors whose films grossed over $100 million.", "evidence": "DIVIDE(COUNT(director where total_gross > 100000000), COUNT(director)) as percentage;", "gold_sql": "SELECT CAST(COUNT(DISTINCT CASE WHEN CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) > 100000000 THEN T3.director ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T3.director) FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title INNER JOIN director AS T3 ON T1.movie_title = T3.name", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN CAST(REPLACE(m.total_gross, ',', '') AS REAL) > 100000000 THEN 1 ELSE 0 END) / COUNT(*) AS percentage\nFROM director d\nJOIN movies_total_gross m ON d.name = m.movie_title;", "label": "wrong", "unseen": true} {"case_id": "bird_q067_r1", "question_id": "bird/disney/4717", "ds": "bird", "db": "disney", "question": "Calculate the percentage of directors whose films grossed over $100 million.", "evidence": "DIVIDE(COUNT(director where total_gross > 100000000), COUNT(director)) as percentage;", "gold_sql": "SELECT CAST(COUNT(DISTINCT CASE WHEN CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) > 100000000 THEN T3.director ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T3.director) FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title INNER JOIN director AS T3 ON T1.movie_title = T3.name", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN CAST(REPLACE(m.total_gross, ',', '') AS REAL) > 100e7 THEN 1 ELSE 0 END) / COUNT(*) AS percentage\nFROM director d\nJOIN movies_total_gross m ON m.movie_title = d.name;", "label": "wrong", "unseen": true} {"case_id": "bird_q067_r2", "question_id": "bird/disney/4717", "ds": "bird", "db": "disney", "question": "Calculate the percentage of directors whose films grossed over $100 million.", "evidence": "DIVIDE(COUNT(director where total_gross > 100000000), COUNT(director)) as percentage;", "gold_sql": "SELECT CAST(COUNT(DISTINCT CASE WHEN CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) > 100000000 THEN T3.director ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T3.director) FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title INNER JOIN director AS T3 ON T1.movie_title = T3.name", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN mg.total_gross > '100000000' THEN 1 ELSE 0 END) / COUNT(*) AS percentage\nFROM director d\nJOIN movies_total_gross mg ON d.name = mg.movie_title;", "label": "wrong", "unseen": true} {"case_id": "bird_q067_r3", "question_id": "bird/disney/4717", "ds": "bird", "db": "disney", "question": "Calculate the percentage of directors whose films grossed over $100 million.", "evidence": "DIVIDE(COUNT(director where total_gross > 100000000), COUNT(director)) as percentage;", "gold_sql": "SELECT CAST(COUNT(DISTINCT CASE WHEN CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) > 100000000 THEN T3.director ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T3.director) FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title INNER JOIN director AS T3 ON T1.movie_title = T3.name", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN mg.total_gross > '100000000' THEN 1 ELSE 0 END) / COUNT(*) AS percentage\nFROM director d\nJOIN movies_total_gross mg ON d.name = mg.movie_title;", "label": "wrong", "unseen": true} {"case_id": "bird_q068_r0", "question_id": "bird/social_media/804", "ds": "bird", "db": "social_media", "question": "How many female Twitter users are there from Wisconsin?", "evidence": "female users refers to Gender = 'Female'; 'Wisconsin' is the State", "gold_sql": "SELECT COUNT(T1.Likes) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID INNER JOIN user AS T3 ON T3.UserID = T1.UserID WHERE T2.State = 'Wisconsin' AND T3.Gender = 'Female'", "pred_sql": "SELECT COUNT(*)\nFROM user u\nJOIN twitter t ON u.UserID = t.UserID\nJOIN location l ON t.LocationID = l.LocationID\nWHERE u.Gender = 'Female'\n AND l.State = 'Wisconsin';", "label": "spurious", "unseen": true} {"case_id": "bird_q068_r1", "question_id": "bird/social_media/804", "ds": "bird", "db": "social_media", "question": "How many female Twitter users are there from Wisconsin?", "evidence": "female users refers to Gender = 'Female'; 'Wisconsin' is the State", "gold_sql": "SELECT COUNT(T1.Likes) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID INNER JOIN user AS T3 ON T3.UserID = T1.UserID WHERE T2.State = 'Wisconsin' AND T3.Gender = 'Female'", "pred_sql": "SELECT COUNT(*)\nFROM user u\nJOIN twitter t ON u.UserID = t.UserID\nJOIN location l ON t.LocationID = l.LocationID\nWHERE u.Gender = 'Female'\n AND l.State = 'Wisconsin';", "label": "spurious", "unseen": true} {"case_id": "bird_q068_r2", "question_id": "bird/social_media/804", "ds": "bird", "db": "social_media", "question": "How many female Twitter users are there from Wisconsin?", "evidence": "female users refers to Gender = 'Female'; 'Wisconsin' is the State", "gold_sql": "SELECT COUNT(T1.Likes) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID INNER JOIN user AS T3 ON T3.UserID = T1.UserID WHERE T2.State = 'Wisconsin' AND T3.Gender = 'Female'", "pred_sql": "SELECT COUNT(*) FROM user u JOIN twitter t ON u.UserID = t.UserID JOIN location l ON t.LocationID = l.LocationID WHERE u.Gender = 'Female' AND l.State = 'Wisconsin';", "label": "spurious", "unseen": true} {"case_id": "bird_q068_r3", "question_id": "bird/social_media/804", "ds": "bird", "db": "social_media", "question": "How many female Twitter users are there from Wisconsin?", "evidence": "female users refers to Gender = 'Female'; 'Wisconsin' is the State", "gold_sql": "SELECT COUNT(T1.Likes) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID INNER JOIN user AS T3 ON T3.UserID = T1.UserID WHERE T2.State = 'Wisconsin' AND T3.Gender = 'Female'", "pred_sql": "SELECT COUNT(*)\nFROM user\nJOIN twitter ON user.UserID = twitter.UserID\nJOIN location ON twitter.LocationID = location.LocationID\nWHERE user.Gender = 'Female'\n AND location.State = 'Wisconsin';", "label": "spurious", "unseen": true} {"case_id": "bird_q069_r0", "question_id": "bird/talkingdata/1120", "ds": "bird", "db": "talkingdata", "question": "Give the number of device models for \"中兴\" phone brand.", "evidence": "", "gold_sql": "SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE device_model = '中兴'", "pred_sql": "SELECT COUNT(*) FROM phone_brand_device_model2 WHERE phone_brand = '中兴';", "label": "wrong", "unseen": true} {"case_id": "bird_q069_r1", "question_id": "bird/talkingdata/1120", "ds": "bird", "db": "talkingdata", "question": "Give the number of device models for \"中兴\" phone brand.", "evidence": "", "gold_sql": "SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE device_model = '中兴'", "pred_sql": "SELECT COUNT(*) FROM phone_brand_device_model2 WHERE phone_brand = '中兴';", "label": "wrong", "unseen": true} {"case_id": "bird_q069_r2", "question_id": "bird/talkingdata/1120", "ds": "bird", "db": "talkingdata", "question": "Give the number of device models for \"中兴\" phone brand.", "evidence": "", "gold_sql": "SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE device_model = '中兴'", "pred_sql": "SELECT COUNT(*) FROM phone_brand_device_model2 WHERE phone_brand = '中兴';", "label": "wrong", "unseen": true} {"case_id": "bird_q069_r3", "question_id": "bird/talkingdata/1120", "ds": "bird", "db": "talkingdata", "question": "Give the number of device models for \"中兴\" phone brand.", "evidence": "", "gold_sql": "SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE device_model = '中兴'", "pred_sql": "SELECT COUNT(*) FROM phone_brand_device_model2 WHERE phone_brand = '中兴';", "label": "wrong", "unseen": true} {"case_id": "bird_q070_r0", "question_id": "bird/synthea/1371", "ds": "bird", "db": "synthea", "question": "According to all the observations of Elly Koss, what was her average weight?", "evidence": "DIVIDE(SUM(VALUE), COUNT(VALUE)) WHERE DESCRIPTION = 'Body Weight';", "gold_sql": "SELECT AVG(T2.VALUE), T2.units FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description = 'Body Weight'", "pred_sql": "SELECT AVG(o.VALUE) AS avg_weight\nFROM observations o\nJOIN patients p ON o.PATIENT = p.patient\nWHERE p.first = 'Elly' AND p.last = 'Koss'\n AND o.DESCRIPTION = 'Body Weight';", "label": "wrong", "unseen": false} {"case_id": "bird_q070_r1", "question_id": "bird/synthea/1371", "ds": "bird", "db": "synthea", "question": "According to all the observations of Elly Koss, what was her average weight?", "evidence": "DIVIDE(SUM(VALUE), COUNT(VALUE)) WHERE DESCRIPTION = 'Body Weight';", "gold_sql": "SELECT AVG(T2.VALUE), T2.units FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description = 'Body Weight'", "pred_sql": "SELECT AVG(o.VALUE) AS average_weight\nFROM observations o\nJOIN patients p ON o.PATIENT = p.patient\nWHERE p.first = 'Elly' AND p.last = 'Koss'\n AND o.DESCRIPTION = 'Body Weight';", "label": "wrong", "unseen": false} {"case_id": "bird_q070_r2", "question_id": "bird/synthea/1371", "ds": "bird", "db": "synthea", "question": "According to all the observations of Elly Koss, what was her average weight?", "evidence": "DIVIDE(SUM(VALUE), COUNT(VALUE)) WHERE DESCRIPTION = 'Body Weight';", "gold_sql": "SELECT AVG(T2.VALUE), T2.units FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description = 'Body Weight'", "pred_sql": "SELECT AVG(o.VALUE) AS average_weight\nFROM observations o\nJOIN patients p ON o.PATIENT = p.patient\nWHERE p.first = 'Elly' AND p.last = 'Koss'\n AND o.DESCRIPTION = 'Body Weight';", "label": "wrong", "unseen": false} {"case_id": "bird_q070_r3", "question_id": "bird/synthea/1371", "ds": "bird", "db": "synthea", "question": "According to all the observations of Elly Koss, what was her average weight?", "evidence": "DIVIDE(SUM(VALUE), COUNT(VALUE)) WHERE DESCRIPTION = 'Body Weight';", "gold_sql": "SELECT AVG(T2.VALUE), T2.units FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description = 'Body Weight'", "pred_sql": "SELECT AVG(o.VALUE) AS avg_weight\nFROM observations o\nJOIN patients p ON o.PATIENT = p.patient\nWHERE p.first = 'Elly' AND p.last = 'Koss'\n AND o.DESCRIPTION = 'Body Weight';", "label": "wrong", "unseen": false} {"case_id": "bird_q071_r0", "question_id": "bird/restaurant/1671", "ds": "bird", "db": "restaurant", "question": "What types of food are served at the 4 top-reviewed restaurants?", "evidence": "top-reviewed refers to review = 4; type of food refers to food_type", "gold_sql": "SELECT food_type FROM generalinfo WHERE review = ( SELECT MAX(review) FROM generalinfo ) LIMIT 4", "pred_sql": "SELECT food_type\nFROM generalinfo\nORDER BY review DESC\nLIMIT 4;", "label": "spurious", "unseen": false} {"case_id": "bird_q071_r1", "question_id": "bird/restaurant/1671", "ds": "bird", "db": "restaurant", "question": "What types of food are served at the 4 top-reviewed restaurants?", "evidence": "top-reviewed refers to review = 4; type of food refers to food_type", "gold_sql": "SELECT food_type FROM generalinfo WHERE review = ( SELECT MAX(review) FROM generalinfo ) LIMIT 4", "pred_sql": "SELECT food_type\nFROM generalinfo\nWHERE review = 4\nORDER BY review DESC\nLIMIT 4;", "label": "wrong", "unseen": true} {"case_id": "bird_q071_r2", "question_id": "bird/restaurant/1671", "ds": "bird", "db": "restaurant", "question": "What types of food are served at the 4 top-reviewed restaurants?", "evidence": "top-reviewed refers to review = 4; type of food refers to food_type", "gold_sql": "SELECT food_type FROM generalinfo WHERE review = ( SELECT MAX(review) FROM generalinfo ) LIMIT 4", "pred_sql": "SELECT DISTINCT food_type\nFROM generalinfo\nWHERE review = 4;", "label": "wrong", "unseen": true} {"case_id": "bird_q071_r3", "question_id": "bird/restaurant/1671", "ds": "bird", "db": "restaurant", "question": "What types of food are served at the 4 top-reviewed restaurants?", "evidence": "top-reviewed refers to review = 4; type of food refers to food_type", "gold_sql": "SELECT food_type FROM generalinfo WHERE review = ( SELECT MAX(review) FROM generalinfo ) LIMIT 4", "pred_sql": "SELECT food_type FROM generalinfo WHERE review = 4 ORDER BY review LIMIT 4;", "label": "wrong", "unseen": true} {"case_id": "bird_q072_r0", "question_id": "bird/mondial_geo/8289", "ds": "bird", "db": "mondial_geo", "question": "For the third largest country, which ethinic group has the most population?", "evidence": "", "gold_sql": "SELECT T2.Name FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T1.Name = ( SELECT Name FROM country ORDER BY Area DESC LIMIT 2, 1 ) GROUP BY T2.Name ORDER BY T2.Percentage * T1.Population DESC LIMIT 1", "pred_sql": "SELECT e.Name\nFROM ethnicGroup e\nJOIN country c ON e.Country = c.Code\nORDER BY c.Population DESC, e.Percentage DESC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "bird_q072_r1", "question_id": "bird/mondial_geo/8289", "ds": "bird", "db": "mondial_geo", "question": "For the third largest country, which ethinic group has the most population?", "evidence": "", "gold_sql": "SELECT T2.Name FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T1.Name = ( SELECT Name FROM country ORDER BY Area DESC LIMIT 2, 1 ) GROUP BY T2.Name ORDER BY T2.Percentage * T1.Population DESC LIMIT 1", "pred_sql": "SELECT eg.Name\nFROM ethnicGroup AS eg\nJOIN country AS c ON c.Code = eg.Country\nORDER BY c.Population DESC\nLIMIT 1 OFFSET 2;", "label": "wrong", "unseen": true} {"case_id": "bird_q072_r2", "question_id": "bird/mondial_geo/8289", "ds": "bird", "db": "mondial_geo", "question": "For the third largest country, which ethinic group has the most population?", "evidence": "", "gold_sql": "SELECT T2.Name FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T1.Name = ( SELECT Name FROM country ORDER BY Area DESC LIMIT 2, 1 ) GROUP BY T2.Name ORDER BY T2.Percentage * T1.Population DESC LIMIT 1", "pred_sql": "SELECT eg.Name\nFROM country c\nJOIN ethnicGroup eg ON eg.Country = c.Code\nORDER BY c.Population DESC\nLIMIT 1, 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q072_r3", "question_id": "bird/mondial_geo/8289", "ds": "bird", "db": "mondial_geo", "question": "For the third largest country, which ethinic group has the most population?", "evidence": "", "gold_sql": "SELECT T2.Name FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T1.Name = ( SELECT Name FROM country ORDER BY Area DESC LIMIT 2, 1 ) GROUP BY T2.Name ORDER BY T2.Percentage * T1.Population DESC LIMIT 1", "pred_sql": "SELECT eg.Name\nFROM ethnicGroup AS eg\nJOIN country AS c ON eg.Country = c.Code\nORDER BY c.Population DESC\nLIMIT 1, 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q073_r0", "question_id": "bird/works_cycles/7156", "ds": "bird", "db": "works_cycles", "question": "For the on going assembly item Component ID No. 494, what's the Unit measure for it?", "evidence": "On going assembly item means the assembly item haven't been finished, therefore EndDate is null", "gold_sql": "SELECT T2.Name FROM BillOfMaterials AS T1 INNER JOIN UnitMeasure AS T2 ON T1.UnitMeasureCode = T2.UnitMeasureCode WHERE T1.ComponentID = 494 AND T1.EndDate IS NULL GROUP BY T2.name", "pred_sql": "SELECT um.Name\nFROM BillOfMaterials bm\nJOIN UnitMeasure um ON bm.UnitMeasureCode = um.UnitMeasureCode\nWHERE bm.ComponentID = 494\n AND bm.EndDate IS NULL;", "label": "wrong", "unseen": false} {"case_id": "bird_q073_r1", "question_id": "bird/works_cycles/7156", "ds": "bird", "db": "works_cycles", "question": "For the on going assembly item Component ID No. 494, what's the Unit measure for it?", "evidence": "On going assembly item means the assembly item haven't been finished, therefore EndDate is null", "gold_sql": "SELECT T2.Name FROM BillOfMaterials AS T1 INNER JOIN UnitMeasure AS T2 ON T1.UnitMeasureCode = T2.UnitMeasureCode WHERE T1.ComponentID = 494 AND T1.EndDate IS NULL GROUP BY T2.name", "pred_sql": "SELECT um.UnitMeasureCode\nFROM BillOfMaterials AS bom\nJOIN UnitMeasure AS um ON bom.UnitMeasureCode = um.UnitMeasureCode\nWHERE bom.ComponentID = 494\n AND bom.EndDate IS NULL;", "label": "wrong", "unseen": false} {"case_id": "bird_q073_r2", "question_id": "bird/works_cycles/7156", "ds": "bird", "db": "works_cycles", "question": "For the on going assembly item Component ID No. 494, what's the Unit measure for it?", "evidence": "On going assembly item means the assembly item haven't been finished, therefore EndDate is null", "gold_sql": "SELECT T2.Name FROM BillOfMaterials AS T1 INNER JOIN UnitMeasure AS T2 ON T1.UnitMeasureCode = T2.UnitMeasureCode WHERE T1.ComponentID = 494 AND T1.EndDate IS NULL GROUP BY T2.name", "pred_sql": "SELECT UnitMeasure.Name\nFROM BillOfMaterials\nJOIN UnitMeasure ON BillOfMaterials.UnitMeasureCode = UnitMeasure.UnitMeasureCode\nWHERE BillOfMaterials.ComponentID = 494\n AND BillOfMaterials.EndDate IS NULL;", "label": "wrong", "unseen": false} {"case_id": "bird_q073_r3", "question_id": "bird/works_cycles/7156", "ds": "bird", "db": "works_cycles", "question": "For the on going assembly item Component ID No. 494, what's the Unit measure for it?", "evidence": "On going assembly item means the assembly item haven't been finished, therefore EndDate is null", "gold_sql": "SELECT T2.Name FROM BillOfMaterials AS T1 INNER JOIN UnitMeasure AS T2 ON T1.UnitMeasureCode = T2.UnitMeasureCode WHERE T1.ComponentID = 494 AND T1.EndDate IS NULL GROUP BY T2.name", "pred_sql": "SELECT UnitMeasure.Name\nFROM BillOfMaterials\nJOIN UnitMeasure ON BillOfMaterials.UnitMeasureCode = UnitMeasure.UnitMeasureCode\nWHERE BillOfMaterials.ComponentID = 494\n AND BillOfMaterials.EndDate IS NULL;", "label": "wrong", "unseen": false} {"case_id": "bird_q074_r0", "question_id": "bird/regional_sales/2719", "ds": "bird", "db": "regional_sales", "question": "How much is the discount applied to the order with the highest unit price?", "evidence": "highest unit price refers to Max(Unit Price)", "gold_sql": "SELECT `Discount Applied` FROM `Sales Orders` WHERE REPLACE(`Unit Price`, ',', '') = ( SELECT REPLACE(`Unit Price`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Price`, ',', '') DESC LIMIT 1 ) ORDER BY REPLACE(`Unit Price`, ',', '') DESC LIMIT 1", "pred_sql": "SELECT `Discount Applied`\nFROM `Sales Orders`\nORDER BY `Unit Price` DESC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "bird_q074_r1", "question_id": "bird/regional_sales/2719", "ds": "bird", "db": "regional_sales", "question": "How much is the discount applied to the order with the highest unit price?", "evidence": "highest unit price refers to Max(Unit Price)", "gold_sql": "SELECT `Discount Applied` FROM `Sales Orders` WHERE REPLACE(`Unit Price`, ',', '') = ( SELECT REPLACE(`Unit Price`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Price`, ',', '') DESC LIMIT 1 ) ORDER BY REPLACE(`Unit Price`, ',', '') DESC LIMIT 1", "pred_sql": "SELECT \"Discount Applied\"\nFROM \"Sales Orders\"\nORDER BY \"Unit Price\" DESC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "bird_q074_r2", "question_id": "bird/regional_sales/2719", "ds": "bird", "db": "regional_sales", "question": "How much is the discount applied to the order with the highest unit price?", "evidence": "highest unit price refers to Max(Unit Price)", "gold_sql": "SELECT `Discount Applied` FROM `Sales Orders` WHERE REPLACE(`Unit Price`, ',', '') = ( SELECT REPLACE(`Unit Price`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Price`, ',', '') DESC LIMIT 1 ) ORDER BY REPLACE(`Unit Price`, ',', '') DESC LIMIT 1", "pred_sql": "SELECT `Discount Applied`\nFROM `Sales Orders`\nWHERE `Unit Price` = (SELECT MAX(`Unit Price`) FROM `Sales Orders`);", "label": "wrong", "unseen": true} {"case_id": "bird_q074_r3", "question_id": "bird/regional_sales/2719", "ds": "bird", "db": "regional_sales", "question": "How much is the discount applied to the order with the highest unit price?", "evidence": "highest unit price refers to Max(Unit Price)", "gold_sql": "SELECT `Discount Applied` FROM `Sales Orders` WHERE REPLACE(`Unit Price`, ',', '') = ( SELECT REPLACE(`Unit Price`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Price`, ',', '') DESC LIMIT 1 ) ORDER BY REPLACE(`Unit Price`, ',', '') DESC LIMIT 1", "pred_sql": "SELECT \"Discount Applied\"\nFROM \"Sales Orders\"\nORDER BY CAST(REPLACE(\"Unit Price\", ',', '') AS FLOAT) DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q075_r0", "question_id": "bird/language_corpus/5811", "ds": "bird", "db": "language_corpus", "question": "Please list the titles of the top 3 Wikipedia pages with the most different words on the Catalan language.", "evidence": "lid = 1 means it's Catalan language; with most different words refers to MAX(words)", "gold_sql": "SELECT title FROM pages WHERE lid = 1 ORDER BY words DESC LIMIT 3", "pred_sql": "SELECT p.title\nFROM pages p\nJOIN words w ON w.wid = p.page\nWHERE p.lid = 1\nGROUP BY p.pid\nORDER BY COUNT(DISTINCT w.wid) DESC\nLIMIT 3;", "label": "wrong", "unseen": true} {"case_id": "bird_q075_r1", "question_id": "bird/language_corpus/5811", "ds": "bird", "db": "language_corpus", "question": "Please list the titles of the top 3 Wikipedia pages with the most different words on the Catalan language.", "evidence": "lid = 1 means it's Catalan language; with most different words refers to MAX(words)", "gold_sql": "SELECT title FROM pages WHERE lid = 1 ORDER BY words DESC LIMIT 3", "pred_sql": "SELECT p.title\nFROM pages p\nWHERE p.lid = 1\nORDER BY p.words DESC\nLIMIT 3;", "label": "correct", "unseen": false} {"case_id": "bird_q075_r2", "question_id": "bird/language_corpus/5811", "ds": "bird", "db": "language_corpus", "question": "Please list the titles of the top 3 Wikipedia pages with the most different words on the Catalan language.", "evidence": "lid = 1 means it's Catalan language; with most different words refers to MAX(words)", "gold_sql": "SELECT title FROM pages WHERE lid = 1 ORDER BY words DESC LIMIT 3", "pred_sql": "SELECT pages.title\nFROM pages\nJOIN pages_words ON pages.pid = pages_words.pid\nWHERE pages.lid = 1\nGROUP BY pages.pid\nORDER BY COUNT(*) DESC\nLIMIT 3;", "label": "wrong", "unseen": true} {"case_id": "bird_q075_r3", "question_id": "bird/language_corpus/5811", "ds": "bird", "db": "language_corpus", "question": "Please list the titles of the top 3 Wikipedia pages with the most different words on the Catalan language.", "evidence": "lid = 1 means it's Catalan language; with most different words refers to MAX(words)", "gold_sql": "SELECT title FROM pages WHERE lid = 1 ORDER BY words DESC LIMIT 3", "pred_sql": "SELECT p.title\nFROM pages p\nWHERE p.lid = 1\nORDER BY p.words DESC\nLIMIT 3;", "label": "correct", "unseen": false} {"case_id": "bird_q076_r0", "question_id": "bird/chicago_crime/8651", "ds": "bird", "db": "chicago_crime", "question": "Calculate the average crime rate per month in the highest populous area.", "evidence": "the highest populous refers to max(population); average crime rate per month = divide(count(report_no where population = max(population)), 12)", "gold_sql": "SELECT CAST(COUNT(T2.report_no) AS REAL) / 12 FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T2.community_area_no = T1.community_area_no GROUP BY T1.community_area_no HAVING COUNT(T1.population) ORDER BY COUNT(T1.population) LIMIT 1", "pred_sql": "SELECT 1.0 * COUNT(*) / 12.0 AS avg_crime_rate\nFROM Crime c\nJOIN Community_Area ca ON c.community_area_no = ca.community_area_no\nORDER BY ca.population DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q076_r1", "question_id": "bird/chicago_crime/8651", "ds": "bird", "db": "chicago_crime", "question": "Calculate the average crime rate per month in the highest populous area.", "evidence": "the highest populous refers to max(population); average crime rate per month = divide(count(report_no where population = max(population)), 12)", "gold_sql": "SELECT CAST(COUNT(T2.report_no) AS REAL) / 12 FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T2.community_area_no = T1.community_area_no GROUP BY T1.community_area_no HAVING COUNT(T1.population) ORDER BY COUNT(T1.population) LIMIT 1", "pred_sql": "SELECT CAST(COUNT(*) AS REAL) / 12.0 AS average_crime_rate_per_month\nFROM Crime c\nJOIN Community_Area ca ON c.community_area_no = ca.community_area_no\nWHERE ca.community_area_no = (\n SELECT community_area_no\n FROM Community_Area\n ORDER BY population DESC\n LIMIT 1\n);", "label": "wrong", "unseen": true} {"case_id": "bird_q076_r2", "question_id": "bird/chicago_crime/8651", "ds": "bird", "db": "chicago_crime", "question": "Calculate the average crime rate per month in the highest populous area.", "evidence": "the highest populous refers to max(population); average crime rate per month = divide(count(report_no where population = max(population)), 12)", "gold_sql": "SELECT CAST(COUNT(T2.report_no) AS REAL) / 12 FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T2.community_area_no = T1.community_area_no GROUP BY T1.community_area_no HAVING COUNT(T1.population) ORDER BY COUNT(T1.population) LIMIT 1", "pred_sql": "SELECT 12.0 * COUNT(*) / (SELECT COUNT(*) FROM Crime) AS avg_monthly\nFROM Crime c\nJOIN Community_Area ca ON c.community_area_no = ca.community_area_no\nWHERE ca.community_area_no = (\n SELECT community_area_no\n FROM Community_Area\n ORDER BY CAST(REPLACE(population, ',', '') AS INTEGER) DESC\n LIMIT 1\n);", "label": "wrong", "unseen": true} {"case_id": "bird_q076_r3", "question_id": "bird/chicago_crime/8651", "ds": "bird", "db": "chicago_crime", "question": "Calculate the average crime rate per month in the highest populous area.", "evidence": "the highest populous refers to max(population); average crime rate per month = divide(count(report_no where population = max(population)), 12)", "gold_sql": "SELECT CAST(COUNT(T2.report_no) AS REAL) / 12 FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T2.community_area_no = T1.community_area_no GROUP BY T1.community_area_no HAVING COUNT(T1.population) ORDER BY COUNT(T1.population) LIMIT 1", "pred_sql": "SELECT CAST(COUNT(*) AS REAL) / 12\nFROM Crime c\nJOIN Community_Area ca ON c.community_area_no = ca.community_area_no\nWHERE ca.population = (SELECT MAX(population) FROM Community_Area);", "label": "wrong", "unseen": false} {"case_id": "bird_q077_r0", "question_id": "bird/human_resources/8955", "ds": "bird", "db": "human_resources", "question": "Who is the highest paid employee in \"Boston\"? Give the full name.", "evidence": "Boston refers to locationcity = 'Boston'; the highest paid employee refers to MAX(salary); full name = firstname, lastname", "gold_sql": "SELECT T1.firstname, T1.lastname FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.locationcity = 'Boston' ORDER BY T1.salary DESC LIMIT 1", "pred_sql": "SELECT e.firstname, e.lastname\nFROM employee e\nJOIN location l ON e.locationID = l.locationID\nWHERE l.locationcity = 'Boston'\nORDER BY e.salary DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "bird_q077_r1", "question_id": "bird/human_resources/8955", "ds": "bird", "db": "human_resources", "question": "Who is the highest paid employee in \"Boston\"? Give the full name.", "evidence": "Boston refers to locationcity = 'Boston'; the highest paid employee refers to MAX(salary); full name = firstname, lastname", "gold_sql": "SELECT T1.firstname, T1.lastname FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.locationcity = 'Boston' ORDER BY T1.salary DESC LIMIT 1", "pred_sql": "SELECT e.firstname, e.lastname\nFROM employee e\nJOIN location l ON e.locationID = l.locationID\nWHERE l.locationcity = 'Boston'\nORDER BY CAST(REPLACE(e.salary, 'US$', '') AS REAL) DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q077_r2", "question_id": "bird/human_resources/8955", "ds": "bird", "db": "human_resources", "question": "Who is the highest paid employee in \"Boston\"? Give the full name.", "evidence": "Boston refers to locationcity = 'Boston'; the highest paid employee refers to MAX(salary); full name = firstname, lastname", "gold_sql": "SELECT T1.firstname, T1.lastname FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.locationcity = 'Boston' ORDER BY T1.salary DESC LIMIT 1", "pred_sql": "SELECT e.firstname, e.lastname\nFROM employee e\nJOIN location l ON e.locationID = l.locationID\nWHERE l.locationcity = 'Boston'\nORDER BY e.salary DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "bird_q077_r3", "question_id": "bird/human_resources/8955", "ds": "bird", "db": "human_resources", "question": "Who is the highest paid employee in \"Boston\"? Give the full name.", "evidence": "Boston refers to locationcity = 'Boston'; the highest paid employee refers to MAX(salary); full name = firstname, lastname", "gold_sql": "SELECT T1.firstname, T1.lastname FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.locationcity = 'Boston' ORDER BY T1.salary DESC LIMIT 1", "pred_sql": "SELECT e.firstname, e.lastname\nFROM employee e\nJOIN location l ON e.locationID = l.locationID\nWHERE l.locationcity = 'Boston'\nORDER BY CAST(REPLACE(REPLACE(e.salary, 'US$', ''), ',', '') AS REAL) DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q078_r0", "question_id": "bird/car_retails/1649", "ds": "bird", "db": "car_retails", "question": "What is the percentage of the payment amount in 2004 was made by Atelier graphique?", "evidence": "DIVIDE(SUM(amount) where customerName = 'Atelier graphique'), (SUM(amount)) as percentage where year(paymentDate) = 2004;", "gold_sql": "SELECT SUM(CASE WHEN t1.customerName = 'Atelier graphique' THEN t2.amount ELSE 0 END) * 100 / SUM(t2.amount) FROM customers AS t1 INNER JOIN payments AS t2 ON t1.customerNumber = t2.customerNumber WHERE STRFTIME('%Y', t2.paymentDate) = '2004'", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN c.customerName = 'Atelier graphique' THEN p.amount ELSE 0 END) / SUM(p.amount) AS percentage\nFROM payments p\nJOIN customers c ON p.customerNumber = c.customerNumber\nWHERE strftime('%Y', p.paymentDate) = '2004';", "label": "correct", "unseen": true} {"case_id": "bird_q078_r1", "question_id": "bird/car_retails/1649", "ds": "bird", "db": "car_retails", "question": "What is the percentage of the payment amount in 2004 was made by Atelier graphique?", "evidence": "DIVIDE(SUM(amount) where customerName = 'Atelier graphique'), (SUM(amount)) as percentage where year(paymentDate) = 2004;", "gold_sql": "SELECT SUM(CASE WHEN t1.customerName = 'Atelier graphique' THEN t2.amount ELSE 0 END) * 100 / SUM(t2.amount) FROM customers AS t1 INNER JOIN payments AS t2 ON t1.customerNumber = t2.customerNumber WHERE STRFTIME('%Y', t2.paymentDate) = '2004'", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN c.customerName = 'Atelier graphique' THEN p.amount ELSE 0 END) / SUM(p.amount) AS percentage\nFROM payments p\nJOIN customers c ON p.customerNumber = c.customerNumber\nWHERE strftime('%Y', p.paymentDate) = '2004';", "label": "correct", "unseen": true} {"case_id": "bird_q078_r2", "question_id": "bird/car_retails/1649", "ds": "bird", "db": "car_retails", "question": "What is the percentage of the payment amount in 2004 was made by Atelier graphique?", "evidence": "DIVIDE(SUM(amount) where customerName = 'Atelier graphique'), (SUM(amount)) as percentage where year(paymentDate) = 2004;", "gold_sql": "SELECT SUM(CASE WHEN t1.customerName = 'Atelier graphique' THEN t2.amount ELSE 0 END) * 100 / SUM(t2.amount) FROM customers AS t1 INNER JOIN payments AS t2 ON t1.customerNumber = t2.customerNumber WHERE STRFTIME('%Y', t2.paymentDate) = '2004'", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN c.customerName = 'Atelier graphique' THEN p.amount ELSE 0 END) / SUM(p.amount) AS percentage\nFROM payments p\nJOIN customers c ON p.customerNumber = c.customerNumber\nWHERE strftime('%Y', p.paymentDate) = '2004';", "label": "correct", "unseen": true} {"case_id": "bird_q078_r3", "question_id": "bird/car_retails/1649", "ds": "bird", "db": "car_retails", "question": "What is the percentage of the payment amount in 2004 was made by Atelier graphique?", "evidence": "DIVIDE(SUM(amount) where customerName = 'Atelier graphique'), (SUM(amount)) as percentage where year(paymentDate) = 2004;", "gold_sql": "SELECT SUM(CASE WHEN t1.customerName = 'Atelier graphique' THEN t2.amount ELSE 0 END) * 100 / SUM(t2.amount) FROM customers AS t1 INNER JOIN payments AS t2 ON t1.customerNumber = t2.customerNumber WHERE STRFTIME('%Y', t2.paymentDate) = '2004'", "pred_sql": "SELECT \n 100.0 * SUM(CASE WHEN c.customerName = 'Atelier graphique' THEN p.amount END) / SUM(p.amount) AS percentage\nFROM payments p\nJOIN customers c ON p.customerNumber = c.customerNumber\nWHERE strftime('%Y', p.paymentDate) = '2004';", "label": "spurious", "unseen": false} {"case_id": "bird_q079_r0", "question_id": "bird/sales_in_weather/8176", "ds": "bird", "db": "sales_in_weather", "question": "For the weather station has store no.9, what was the increased percentage of the average temperature from 2012/2/2 to 2012/2/3?", "evidence": "store no.9 refers to store_nbr = 9; 2012/2/2 refers to date = '2012-02-02'; 2012/2/3 refers to date = '2012-02-03'; average temperature refers to tavg; increase percentage = Divide (Subtract (tavg where date = '2012-02-03', tavg where date = '2012-02-02'), tavg where date = '2012-02-02') * 100", "gold_sql": "SELECT CAST((SUM(CASE WHEN T1.`date` = '2012-02-03' THEN T1.tavg * 1 ELSE 0 END) - SUM(CASE WHEN T1.`date` = '2012-02-02' THEN T1.tavg * 1 ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T1.`date` = '2012-02-02' THEN T1.tavg * 1 ELSE 0 END) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 9", "pred_sql": "SELECT ((NEW.tavg - OLD.tavg) * 100.0 / OLD.tavg) AS percentage_increase\nFROM weather AS NEW\nJOIN relation AS R1 ON NEW.station_nbr = R1.station_nbr\nJOIN weather AS OLD ON OLD.station_nbr = R1.station_nbr\nJOIN relation AS R2 ON OLD.station_nbr = R2.station_nbr\nWHERE R1.store_nbr = 9\n AND NEW.date = '2012-02-03'\n AND OLD.date = '2012-02-02';", "label": "wrong", "unseen": true} {"case_id": "bird_q079_r1", "question_id": "bird/sales_in_weather/8176", "ds": "bird", "db": "sales_in_weather", "question": "For the weather station has store no.9, what was the increased percentage of the average temperature from 2012/2/2 to 2012/2/3?", "evidence": "store no.9 refers to store_nbr = 9; 2012/2/2 refers to date = '2012-02-02'; 2012/2/3 refers to date = '2012-02-03'; average temperature refers to tavg; increase percentage = Divide (Subtract (tavg where date = '2012-02-03', tavg where date = '2012-02-02'), tavg where date = '2012-02-02') * 100", "gold_sql": "SELECT CAST((SUM(CASE WHEN T1.`date` = '2012-02-03' THEN T1.tavg * 1 ELSE 0 END) - SUM(CASE WHEN T1.`date` = '2012-02-02' THEN T1.tavg * 1 ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T1.`date` = '2012-02-02' THEN T1.tavg * 1 ELSE 0 END) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 9", "pred_sql": "SELECT ((w3.tavg - w2.tavg) * 100.0) / w2.tavg AS increased_percentage\nFROM weather w1\nJOIN relation r ON w1.station_nbr = r.station_nbr\nJOIN weather w2 ON w2.station_nbr = r.station_nbr AND w2.date = '2012-02-02'\nJOIN weather w3 ON w3.station_nbr = r.station_nbr AND w3.date = '2012-02-03'\nWHERE r.store_nbr = 9;", "label": "wrong", "unseen": true} {"case_id": "bird_q079_r2", "question_id": "bird/sales_in_weather/8176", "ds": "bird", "db": "sales_in_weather", "question": "For the weather station has store no.9, what was the increased percentage of the average temperature from 2012/2/2 to 2012/2/3?", "evidence": "store no.9 refers to store_nbr = 9; 2012/2/2 refers to date = '2012-02-02'; 2012/2/3 refers to date = '2012-02-03'; average temperature refers to tavg; increase percentage = Divide (Subtract (tavg where date = '2012-02-03', tavg where date = '2012-02-02'), tavg where date = '2012-02-02') * 100", "gold_sql": "SELECT CAST((SUM(CASE WHEN T1.`date` = '2012-02-03' THEN T1.tavg * 1 ELSE 0 END) - SUM(CASE WHEN T1.`date` = '2012-02-02' THEN T1.tavg * 1 ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T1.`date` = '2012-02-02' THEN T1.tavg * 1 ELSE 0 END) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 9", "pred_sql": "SELECT (t2.tavg - t1.tavg) * 100.0 / NULLIF(t1.tavg, 0) AS increase_percentage\nFROM weather AS t1\nJOIN relation AS r ON t1.station_nbr = r.station_nbr\nJOIN weather AS t2 ON t2.station_nbr = t1.station_nbr\nWHERE r.store_nbr = 9\n AND t1.date = '2012-02-02'\n AND t2.date = '2012-02-03';", "label": "spurious", "unseen": false} {"case_id": "bird_q079_r3", "question_id": "bird/sales_in_weather/8176", "ds": "bird", "db": "sales_in_weather", "question": "For the weather station has store no.9, what was the increased percentage of the average temperature from 2012/2/2 to 2012/2/3?", "evidence": "store no.9 refers to store_nbr = 9; 2012/2/2 refers to date = '2012-02-02'; 2012/2/3 refers to date = '2012-02-03'; average temperature refers to tavg; increase percentage = Divide (Subtract (tavg where date = '2012-02-03', tavg where date = '2012-02-02'), tavg where date = '2012-02-02') * 100", "gold_sql": "SELECT CAST((SUM(CASE WHEN T1.`date` = '2012-02-03' THEN T1.tavg * 1 ELSE 0 END) - SUM(CASE WHEN T1.`date` = '2012-02-02' THEN T1.tavg * 1 ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T1.`date` = '2012-02-02' THEN T1.tavg * 1 ELSE 0 END) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 9", "pred_sql": "SELECT\n 100.0 * ((w2.tavg - w1.tavg) / NULLIF(w1.tavg, 0.0))\nFROM weather w1\nJOIN weather w2\n ON w1.station_nbr = w2.station_nbr\nJOIN relation r\n ON r.station_nbr = w1.station_nbr\nWHERE r.store_nbr = 9\n AND w1.date = '2012-02-02'\n AND w2.date = '2012-02-03';", "label": "wrong", "unseen": true} {"case_id": "bird_q080_r0", "question_id": "bird/book_publishing_company/217", "ds": "bird", "db": "book_publishing_company", "question": "Show me the employ id of the highest employee who doesn't have a middle name.", "evidence": "highest employee refers to employee with the highest job level; MAX(job_lvl)", "gold_sql": "SELECT emp_id FROM employee WHERE minit = '' ORDER BY job_lvl DESC LIMIT 1", "pred_sql": "SELECT emp_id\nFROM employee\nWHERE minit IS NULL\nORDER BY job_lvl DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q080_r1", "question_id": "bird/book_publishing_company/217", "ds": "bird", "db": "book_publishing_company", "question": "Show me the employ id of the highest employee who doesn't have a middle name.", "evidence": "highest employee refers to employee with the highest job level; MAX(job_lvl)", "gold_sql": "SELECT emp_id FROM employee WHERE minit = '' ORDER BY job_lvl DESC LIMIT 1", "pred_sql": "SELECT emp_id\nFROM employee\nWHERE minit IS NULL\nORDER BY job_lvl DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q080_r2", "question_id": "bird/book_publishing_company/217", "ds": "bird", "db": "book_publishing_company", "question": "Show me the employ id of the highest employee who doesn't have a middle name.", "evidence": "highest employee refers to employee with the highest job level; MAX(job_lvl)", "gold_sql": "SELECT emp_id FROM employee WHERE minit = '' ORDER BY job_lvl DESC LIMIT 1", "pred_sql": "SELECT emp_id\nFROM employee\nWHERE minit IS NULL\nORDER BY job_lvl DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q080_r3", "question_id": "bird/book_publishing_company/217", "ds": "bird", "db": "book_publishing_company", "question": "Show me the employ id of the highest employee who doesn't have a middle name.", "evidence": "highest employee refers to employee with the highest job level; MAX(job_lvl)", "gold_sql": "SELECT emp_id FROM employee WHERE minit = '' ORDER BY job_lvl DESC LIMIT 1", "pred_sql": "SELECT emp_id\nFROM employee\nWHERE minit IS NULL\nORDER BY job_lvl DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "bird_q081_r0", "question_id": "bird/synthea/1408", "ds": "bird", "db": "synthea", "question": "Count all of the living patients that had a stroke.", "evidence": "if deathdate is null, it means this patient is still alive or living; stroke refers to conditions where DESCRIPTION = 'Stroke';", "gold_sql": "SELECT COUNT(DISTINCT T2.patient) FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.description = 'Stroke' AND T2.deathdate IS NULL", "pred_sql": "SELECT COUNT(*) FROM patients p JOIN conditions c ON p.patient = c.PATIENT WHERE p.deathdate IS NULL AND c.DESCRIPTION = 'Stroke';", "label": "spurious", "unseen": false} {"case_id": "bird_q081_r1", "question_id": "bird/synthea/1408", "ds": "bird", "db": "synthea", "question": "Count all of the living patients that had a stroke.", "evidence": "if deathdate is null, it means this patient is still alive or living; stroke refers to conditions where DESCRIPTION = 'Stroke';", "gold_sql": "SELECT COUNT(DISTINCT T2.patient) FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.description = 'Stroke' AND T2.deathdate IS NULL", "pred_sql": "SELECT COUNT(*) AS num_living_patients_with_stroke\nFROM patients p\nJOIN conditions c ON c.PATIENT = p.patient\nWHERE p.deathdate IS NULL\n AND c.DESCRIPTION = 'Stroke';", "label": "spurious", "unseen": false} {"case_id": "bird_q081_r2", "question_id": "bird/synthea/1408", "ds": "bird", "db": "synthea", "question": "Count all of the living patients that had a stroke.", "evidence": "if deathdate is null, it means this patient is still alive or living; stroke refers to conditions where DESCRIPTION = 'Stroke';", "gold_sql": "SELECT COUNT(DISTINCT T2.patient) FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.description = 'Stroke' AND T2.deathdate IS NULL", "pred_sql": "SELECT COUNT(*) AS living_stroke_count\nFROM patients p\nJOIN conditions c ON c.PATIENT = p.patient\nWHERE p.deathdate IS NULL\n AND c.DESCRIPTION = 'Stroke';", "label": "spurious", "unseen": false} {"case_id": "bird_q081_r3", "question_id": "bird/synthea/1408", "ds": "bird", "db": "synthea", "question": "Count all of the living patients that had a stroke.", "evidence": "if deathdate is null, it means this patient is still alive or living; stroke refers to conditions where DESCRIPTION = 'Stroke';", "gold_sql": "SELECT COUNT(DISTINCT T2.patient) FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.description = 'Stroke' AND T2.deathdate IS NULL", "pred_sql": "SELECT COUNT(*) FROM patients p JOIN conditions c ON p.patient = c.PATIENT WHERE c.DESCRIPTION = 'Stroke' AND p.deathdate IS NULL;", "label": "spurious", "unseen": false} {"case_id": "bird_q082_r0", "question_id": "bird/video_games/3362", "ds": "bird", "db": "video_games", "question": "When was the game titled 3DS Classic Collection released?", "evidence": "when refers to release_year; the game titled 3DS Classic Collection refers to game_name = '3DS Classic Collection'", "gold_sql": "SELECT T1.release_year FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T3.game_name = '3DS Classic Collection'", "pred_sql": "SELECT gp.release_year\nFROM game AS ga\nJOIN game_publisher AS gpub ON ga.id = gpub.game_id\nJOIN game_platform AS gp ON gpub.id = gp.game_publisher_id\nWHERE ga.game_name = '3DS Classic Collection';", "label": "correct", "unseen": false} {"case_id": "bird_q082_r1", "question_id": "bird/video_games/3362", "ds": "bird", "db": "video_games", "question": "When was the game titled 3DS Classic Collection released?", "evidence": "when refers to release_year; the game titled 3DS Classic Collection refers to game_name = '3DS Classic Collection'", "gold_sql": "SELECT T1.release_year FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T3.game_name = '3DS Classic Collection'", "pred_sql": "SELECT gp.release_year\nFROM game g\nJOIN game_publisher gup ON g.id = gup.game_id\nJOIN game_platform gp ON gup.id = gp.game_publisher_id\nWHERE g.game_name = '3DS Classic Collection';", "label": "correct", "unseen": false} {"case_id": "bird_q082_r2", "question_id": "bird/video_games/3362", "ds": "bird", "db": "video_games", "question": "When was the game titled 3DS Classic Collection released?", "evidence": "when refers to release_year; the game titled 3DS Classic Collection refers to game_name = '3DS Classic Collection'", "gold_sql": "SELECT T1.release_year FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T3.game_name = '3DS Classic Collection'", "pred_sql": "SELECT gp.release_year\nFROM game ga\nJOIN game_publisher gpb ON ga.id = gpb.game_id\nJOIN game_platform gp ON gpb.id = gp.game_publisher_id\nWHERE ga.game_name = '3DS Classic Collection';", "label": "correct", "unseen": false} {"case_id": "bird_q082_r3", "question_id": "bird/video_games/3362", "ds": "bird", "db": "video_games", "question": "When was the game titled 3DS Classic Collection released?", "evidence": "when refers to release_year; the game titled 3DS Classic Collection refers to game_name = '3DS Classic Collection'", "gold_sql": "SELECT T1.release_year FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T3.game_name = '3DS Classic Collection'", "pred_sql": "SELECT gp.release_year\nFROM game g\nJOIN game_publisher gpublisher ON gpublisher.game_id = g.id\nJOIN game_platform gp ON gp.game_publisher_id = gpublisher.id\nWHERE g.game_name = '3DS Classic Collection';", "label": "correct", "unseen": false} {"case_id": "bird_q083_r0", "question_id": "bird/image_and_language/7609", "ds": "bird", "db": "image_and_language", "question": "Give the X and Y coordinates of the sample object of image ID 23 that has the 'cast' attribute class.", "evidence": "X and Y refer to coordinates of the bounding box; image ID 23 refers to IMG_ID = 23; 'cast' attribute class refers to ATT_CLASS = 'cast';", "gold_sql": "SELECT T3.OBJ_SAMPLE_ID, T3.X, T3.Y FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.IMG_ID = 23 AND T1.ATT_CLASS = 'cast'", "pred_sql": "SELECT IMG_OBJ.X, IMG_OBJ.Y\nFROM IMG_OBJ\nJOIN IMG_OBJ_ATT ON IMG_OBJ.IMG_ID = IMG_OBJ_ATT.IMG_ID AND IMG_OBJ.OBJ_SAMPLE_ID = IMG_OBJ_ATT.OBJ_SAMPLE_ID\nJOIN ATT_CLASSES ON IMG_OBJ_ATT.ATT_CLASS_ID = ATT_CLASSES.ATT_CLASS_ID\nWHERE IMG_OBJ.IMG_ID = 23\n AND ATT_CLASSES.ATT_CLASS = 'cast';", "label": "wrong", "unseen": false} {"case_id": "bird_q083_r1", "question_id": "bird/image_and_language/7609", "ds": "bird", "db": "image_and_language", "question": "Give the X and Y coordinates of the sample object of image ID 23 that has the 'cast' attribute class.", "evidence": "X and Y refer to coordinates of the bounding box; image ID 23 refers to IMG_ID = 23; 'cast' attribute class refers to ATT_CLASS = 'cast';", "gold_sql": "SELECT T3.OBJ_SAMPLE_ID, T3.X, T3.Y FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.IMG_ID = 23 AND T1.ATT_CLASS = 'cast'", "pred_sql": "SELECT io.X, io.Y\nFROM IMG_OBJ io\nJOIN IMG_OBJ_ATT ioa ON ioa.IMG_ID = io.IMG_ID AND ioa.OBJ_SAMPLE_ID = io.OBJ_SAMPLE_ID\nJOIN ATT_CLASSES ac ON ac.ATT_CLASS_ID = ioa.ATT_CLASS_ID\nWHERE io.IMG_ID = 23\n AND ac.ATT_CLASS = 'cast';", "label": "wrong", "unseen": false} {"case_id": "bird_q083_r2", "question_id": "bird/image_and_language/7609", "ds": "bird", "db": "image_and_language", "question": "Give the X and Y coordinates of the sample object of image ID 23 that has the 'cast' attribute class.", "evidence": "X and Y refer to coordinates of the bounding box; image ID 23 refers to IMG_ID = 23; 'cast' attribute class refers to ATT_CLASS = 'cast';", "gold_sql": "SELECT T3.OBJ_SAMPLE_ID, T3.X, T3.Y FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.IMG_ID = 23 AND T1.ATT_CLASS = 'cast'", "pred_sql": "SELECT io.X, io.Y\nFROM IMG_OBJ AS io\nJOIN IMG_OBJ_ATT AS iao ON io.IMG_ID = iao.IMG_ID AND io.OBJ_SAMPLE_ID = iao.OBJ_SAMPLE_ID\nJOIN ATT_CLASSES AS acc ON iao.ATT_CLASS_ID = acc.ATT_CLASS_ID\nWHERE io.IMG_ID = 23\n AND acc.ATT_CLASS = 'cast';", "label": "wrong", "unseen": false} {"case_id": "bird_q083_r3", "question_id": "bird/image_and_language/7609", "ds": "bird", "db": "image_and_language", "question": "Give the X and Y coordinates of the sample object of image ID 23 that has the 'cast' attribute class.", "evidence": "X and Y refer to coordinates of the bounding box; image ID 23 refers to IMG_ID = 23; 'cast' attribute class refers to ATT_CLASS = 'cast';", "gold_sql": "SELECT T3.OBJ_SAMPLE_ID, T3.X, T3.Y FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.IMG_ID = 23 AND T1.ATT_CLASS = 'cast'", "pred_sql": "SELECT io.X, io.Y\nFROM IMG_OBJ io\nJOIN IMG_OBJ_ATT ioa ON ioa.IMG_ID = io.IMG_ID AND ioa.OBJ_SAMPLE_ID = io.OBJ_SAMPLE_ID\nJOIN ATT_CLASSES ac ON ac.ATT_CLASS_ID = ioa.ATT_CLASS_ID\nWHERE io.IMG_ID = 23\n AND ac.ATT_CLASS = 'cast';", "label": "wrong", "unseen": false} {"case_id": "bird_q084_r0", "question_id": "bird/music_tracker/2062", "ds": "bird", "db": "music_tracker", "question": "What are the average download times for the a release tagged \"1980s\"?", "evidence": "AVG(totalSnatched where tag = '1980s');", "gold_sql": "SELECT CAST(SUM(T1.totalSnatched) AS REAL) / COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s'", "pred_sql": "SELECT AVG(t.totalSnatched)\nFROM torrents t\nJOIN tags tg ON tg.id = t.id\nWHERE tg.tag = '1980s';", "label": "spurious", "unseen": false} {"case_id": "bird_q084_r1", "question_id": "bird/music_tracker/2062", "ds": "bird", "db": "music_tracker", "question": "What are the average download times for the a release tagged \"1980s\"?", "evidence": "AVG(totalSnatched where tag = '1980s');", "gold_sql": "SELECT CAST(SUM(T1.totalSnatched) AS REAL) / COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s'", "pred_sql": "SELECT AVG(t.totalSnatched)\nFROM torrents AS t\nJOIN tags AS tg ON t.groupYear = tg.id\nWHERE tg.tag = '1980s';", "label": "wrong", "unseen": true} {"case_id": "bird_q084_r2", "question_id": "bird/music_tracker/2062", "ds": "bird", "db": "music_tracker", "question": "What are the average download times for the a release tagged \"1980s\"?", "evidence": "AVG(totalSnatched where tag = '1980s');", "gold_sql": "SELECT CAST(SUM(T1.totalSnatched) AS REAL) / COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s'", "pred_sql": "SELECT AVG(t.totalSnatched)\nFROM torrents AS t\nJOIN tags AS tg ON tg.id = t.id\nWHERE tg.tag = '1980s';", "label": "spurious", "unseen": false} {"case_id": "bird_q084_r3", "question_id": "bird/music_tracker/2062", "ds": "bird", "db": "music_tracker", "question": "What are the average download times for the a release tagged \"1980s\"?", "evidence": "AVG(totalSnatched where tag = '1980s');", "gold_sql": "SELECT CAST(SUM(T1.totalSnatched) AS REAL) / COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s'", "pred_sql": "SELECT AVG(t.totalSnatched) AS average_downloads\nFROM torrents AS t\nJOIN tags AS tg ON t.id = tg.id\nWHERE tg.tag = '1980s';", "label": "spurious", "unseen": false} {"case_id": "bird_q085_r0", "question_id": "bird/retail_complains/345", "ds": "bird", "db": "retail_complains", "question": "What is the first name of clients who have the highest priority?", "evidence": "first name refers to first; highest priority refers to priority = 2", "gold_sql": "SELECT T1.first FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.priority = ( SELECT MAX(priority) FROM callcenterlogs )", "pred_sql": "SELECT DISTINCT c.first\nFROM callcenterlogs AS cl\nJOIN client AS c\n ON cl.\"rand client\" = c.client_id\nWHERE cl.priority = 2;", "label": "wrong", "unseen": false} {"case_id": "bird_q085_r1", "question_id": "bird/retail_complains/345", "ds": "bird", "db": "retail_complains", "question": "What is the first name of clients who have the highest priority?", "evidence": "first name refers to first; highest priority refers to priority = 2", "gold_sql": "SELECT T1.first FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.priority = ( SELECT MAX(priority) FROM callcenterlogs )", "pred_sql": "SELECT DISTINCT c.first\nFROM callcenterlogs cl\nJOIN client c ON cl.`rand client` = c.client_id\nWHERE cl.priority = 2;", "label": "wrong", "unseen": false} {"case_id": "bird_q085_r2", "question_id": "bird/retail_complains/345", "ds": "bird", "db": "retail_complains", "question": "What is the first name of clients who have the highest priority?", "evidence": "first name refers to first; highest priority refers to priority = 2", "gold_sql": "SELECT T1.first FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.priority = ( SELECT MAX(priority) FROM callcenterlogs )", "pred_sql": "SELECT DISTINCT c.first\nFROM client AS c\nJOIN callcenterlogs AS cl ON c.client_id = cl.`rand client`\nWHERE cl.priority = 2;", "label": "wrong", "unseen": false} {"case_id": "bird_q085_r3", "question_id": "bird/retail_complains/345", "ds": "bird", "db": "retail_complains", "question": "What is the first name of clients who have the highest priority?", "evidence": "first name refers to first; highest priority refers to priority = 2", "gold_sql": "SELECT T1.first FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.priority = ( SELECT MAX(priority) FROM callcenterlogs )", "pred_sql": "SELECT DISTINCT c.first\nFROM client c\nJOIN callcenterlogs cl ON cl.`rand client` = c.client_id\nWHERE cl.priority = 2;", "label": "wrong", "unseen": false} {"case_id": "bird_q086_r0", "question_id": "bird/disney/4694", "ds": "bird", "db": "disney", "question": "Describe the voice actors and villains in Cinderella.", "evidence": "Cinderella refers to movie_title = ' Cinderella';", "gold_sql": "SELECT T1.`voice-actor`, T2.villian FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title WHERE T2.movie_title = 'Cinderella'", "pred_sql": "SELECT `voice-actors`.`voice-actor`, characters.villian\nFROM `voice-actors`\nJOIN characters ON `voice-actors`.character = characters.hero\nWHERE `voice-actors`.movie = 'Cinderella';", "label": "wrong", "unseen": false} {"case_id": "bird_q086_r1", "question_id": "bird/disney/4694", "ds": "bird", "db": "disney", "question": "Describe the voice actors and villains in Cinderella.", "evidence": "Cinderella refers to movie_title = ' Cinderella';", "gold_sql": "SELECT T1.`voice-actor`, T2.villian FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title WHERE T2.movie_title = 'Cinderella'", "pred_sql": "SELECT `voice-actors`.`voice-actor`, characters.villian\nFROM `voice-actors`\nJOIN characters ON `voice-actors`.movie = characters.movie_title\nWHERE characters.movie_title = 'Cinderella';", "label": "correct", "unseen": false} {"case_id": "bird_q086_r2", "question_id": "bird/disney/4694", "ds": "bird", "db": "disney", "question": "Describe the voice actors and villains in Cinderella.", "evidence": "Cinderella refers to movie_title = ' Cinderella';", "gold_sql": "SELECT T1.`voice-actor`, T2.villian FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title WHERE T2.movie_title = 'Cinderella'", "pred_sql": "SELECT va.`voice-actor`, ch.villian\nFROM `voice-actors` AS va\nJOIN characters AS ch\n ON va.character = ch.hero\n AND va.movie = ch.movie_title\nWHERE ch.movie_title = 'Cinderella';", "label": "wrong", "unseen": false} {"case_id": "bird_q086_r3", "question_id": "bird/disney/4694", "ds": "bird", "db": "disney", "question": "Describe the voice actors and villains in Cinderella.", "evidence": "Cinderella refers to movie_title = ' Cinderella';", "gold_sql": "SELECT T1.`voice-actor`, T2.villian FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title WHERE T2.movie_title = 'Cinderella'", "pred_sql": "SELECT va.\"voice-actor\", chars.villian\nFROM \"voice-actors\" AS va\nJOIN characters AS chars\n ON va.character = chars.hero\nWHERE chars.movie_title = 'Cinderella';", "label": "wrong", "unseen": false} {"case_id": "bird_q087_r0", "question_id": "bird/airline/5847", "ds": "bird", "db": "airline", "question": "Provide the name of the airport which landed the most number of flights on 2018/8/15.", "evidence": "name of the airport refers to Description; airport that landed the most number of flights refers to MAX(COUNT(DEST)); on 2018/8/15 refers to FL_DATE = '2018/8/15';", "gold_sql": "SELECT T1.Description FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST WHERE T2.FL_DATE = '2018/8/15' ORDER BY T2.DEST DESC LIMIT 1", "pred_sql": "SELECT a.Description\nFROM Airlines al\nJOIN Airports a ON al.DEST = a.Code\nWHERE al.FL_DATE = '2018/8/15'\nGROUP BY al.DEST\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q087_r1", "question_id": "bird/airline/5847", "ds": "bird", "db": "airline", "question": "Provide the name of the airport which landed the most number of flights on 2018/8/15.", "evidence": "name of the airport refers to Description; airport that landed the most number of flights refers to MAX(COUNT(DEST)); on 2018/8/15 refers to FL_DATE = '2018/8/15';", "gold_sql": "SELECT T1.Description FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST WHERE T2.FL_DATE = '2018/8/15' ORDER BY T2.DEST DESC LIMIT 1", "pred_sql": "SELECT a.Description\nFROM Airlines al\nJOIN Airports a ON al.DEST = a.Code\nWHERE al.FL_DATE = '2018/8/15'\nGROUP BY al.DEST\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q087_r2", "question_id": "bird/airline/5847", "ds": "bird", "db": "airline", "question": "Provide the name of the airport which landed the most number of flights on 2018/8/15.", "evidence": "name of the airport refers to Description; airport that landed the most number of flights refers to MAX(COUNT(DEST)); on 2018/8/15 refers to FL_DATE = '2018/8/15';", "gold_sql": "SELECT T1.Description FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST WHERE T2.FL_DATE = '2018/8/15' ORDER BY T2.DEST DESC LIMIT 1", "pred_sql": "SELECT a.Description\nFROM Airlines al\nJOIN Airports a ON al.DEST = a.Code\nWHERE al.FL_DATE = '2018/8/15'\nGROUP BY al.DEST\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q087_r3", "question_id": "bird/airline/5847", "ds": "bird", "db": "airline", "question": "Provide the name of the airport which landed the most number of flights on 2018/8/15.", "evidence": "name of the airport refers to Description; airport that landed the most number of flights refers to MAX(COUNT(DEST)); on 2018/8/15 refers to FL_DATE = '2018/8/15';", "gold_sql": "SELECT T1.Description FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST WHERE T2.FL_DATE = '2018/8/15' ORDER BY T2.DEST DESC LIMIT 1", "pred_sql": "SELECT ap.Description\nFROM Airlines a\nJOIN Airports ap ON ap.Code = a.DEST\nWHERE a.FL_DATE = '2018/8/15'\nGROUP BY a.DEST\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "bird_q088_r0", "question_id": "bird/restaurant/1772", "ds": "bird", "db": "restaurant", "question": "How many deli in Belmont have a review rating of 2 or more?", "evidence": "deli ris a food type; Belmont refers to city = 'belmont'; review rating of 2 or more refers to review > 2", "gold_sql": "SELECT COUNT(id_restaurant) FROM generalinfo WHERE city = 'belmont' AND review > 2 AND food_type = 'deli'", "pred_sql": "SELECT COUNT(*) FROM generalinfo AS g\nJOIN geographic AS geo ON g.city = geo.city\nWHERE g.food_type = 'deli' AND g.review > 2 AND geo.city = 'belmont';", "label": "correct", "unseen": false} {"case_id": "bird_q088_r1", "question_id": "bird/restaurant/1772", "ds": "bird", "db": "restaurant", "question": "How many deli in Belmont have a review rating of 2 or more?", "evidence": "deli ris a food type; Belmont refers to city = 'belmont'; review rating of 2 or more refers to review > 2", "gold_sql": "SELECT COUNT(id_restaurant) FROM generalinfo WHERE city = 'belmont' AND review > 2 AND food_type = 'deli'", "pred_sql": "SELECT COUNT(*) FROM generalinfo gi JOIN geographic g ON gi.city = g.city WHERE gi.food_type = 'deli' AND gi.city = 'belmont' AND gi.review > 2;", "label": "correct", "unseen": false} {"case_id": "bird_q088_r2", "question_id": "bird/restaurant/1772", "ds": "bird", "db": "restaurant", "question": "How many deli in Belmont have a review rating of 2 or more?", "evidence": "deli ris a food type; Belmont refers to city = 'belmont'; review rating of 2 or more refers to review > 2", "gold_sql": "SELECT COUNT(id_restaurant) FROM generalinfo WHERE city = 'belmont' AND review > 2 AND food_type = 'deli'", "pred_sql": "SELECT COUNT(*) FROM generalinfo WHERE food_type = 'deli' AND city = 'belmont' AND review > 2", "label": "correct", "unseen": false} {"case_id": "bird_q088_r3", "question_id": "bird/restaurant/1772", "ds": "bird", "db": "restaurant", "question": "How many deli in Belmont have a review rating of 2 or more?", "evidence": "deli ris a food type; Belmont refers to city = 'belmont'; review rating of 2 or more refers to review > 2", "gold_sql": "SELECT COUNT(id_restaurant) FROM generalinfo WHERE city = 'belmont' AND review > 2 AND food_type = 'deli'", "pred_sql": "SELECT COUNT(*) FROM generalinfo\nWHERE food_type = 'deli'\n AND city = 'belmont'\n AND review > 2;", "label": "correct", "unseen": false} {"case_id": "bird_q089_r0", "question_id": "bird/movies_4/461", "ds": "bird", "db": "movies_4", "question": "Give the names of the female cast in Movie No. 1865.", "evidence": "female cast refers to gender = 'Female'; name of cast refers to person_name; Movie No. 1865 refers to movie_id = 1865", "gold_sql": "SELECT T2.person_name FROM movie_cast AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.person_id INNER JOIN gender AS T3 ON T1.gender_id = T3.gender_id WHERE T1.movie_id = 1865 AND T3.gender = 'Female'", "pred_sql": "SELECT p.person_name\nFROM movie_cast AS mc\nJOIN person AS p ON mc.person_id = p.person_id\nJOIN gender AS g ON mc.gender_id = g.gender_id\nWHERE mc.movie_id = 1865\n AND g.gender = 'Female';", "label": "correct", "unseen": false} {"case_id": "bird_q089_r1", "question_id": "bird/movies_4/461", "ds": "bird", "db": "movies_4", "question": "Give the names of the female cast in Movie No. 1865.", "evidence": "female cast refers to gender = 'Female'; name of cast refers to person_name; Movie No. 1865 refers to movie_id = 1865", "gold_sql": "SELECT T2.person_name FROM movie_cast AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.person_id INNER JOIN gender AS T3 ON T1.gender_id = T3.gender_id WHERE T1.movie_id = 1865 AND T3.gender = 'Female'", "pred_sql": "SELECT DISTINCT p.person_name\nFROM movie_cast mc\nJOIN person p ON mc.person_id = p.person_id\nJOIN gender g ON mc.gender_id = g.gender_id\nJOIN movie m ON mc.movie_id = m.movie_id\nWHERE m.movie_id = 1865\n AND g.gender = 'Female';", "label": "spurious", "unseen": false} {"case_id": "bird_q089_r2", "question_id": "bird/movies_4/461", "ds": "bird", "db": "movies_4", "question": "Give the names of the female cast in Movie No. 1865.", "evidence": "female cast refers to gender = 'Female'; name of cast refers to person_name; Movie No. 1865 refers to movie_id = 1865", "gold_sql": "SELECT T2.person_name FROM movie_cast AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.person_id INNER JOIN gender AS T3 ON T1.gender_id = T3.gender_id WHERE T1.movie_id = 1865 AND T3.gender = 'Female'", "pred_sql": "SELECT p.person_name\nFROM person AS p\nJOIN movie_cast AS mc ON mc.person_id = p.person_id\nJOIN gender AS g ON mc.gender_id = g.gender_id\nWHERE mc.movie_id = 1865\n AND g.gender = 'Female';", "label": "correct", "unseen": false} {"case_id": "bird_q089_r3", "question_id": "bird/movies_4/461", "ds": "bird", "db": "movies_4", "question": "Give the names of the female cast in Movie No. 1865.", "evidence": "female cast refers to gender = 'Female'; name of cast refers to person_name; Movie No. 1865 refers to movie_id = 1865", "gold_sql": "SELECT T2.person_name FROM movie_cast AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.person_id INNER JOIN gender AS T3 ON T1.gender_id = T3.gender_id WHERE T1.movie_id = 1865 AND T3.gender = 'Female'", "pred_sql": "SELECT p.person_name\nFROM movie_cast mc\nJOIN person p ON mc.person_id = p.person_id\nJOIN gender g ON mc.gender_id = g.gender_id\nJOIN movie m ON mc.movie_id = m.movie_id\nWHERE mc.movie_id = 1865\n AND g.gender = 'Female';", "label": "correct", "unseen": false} {"case_id": "bird_q090_r0", "question_id": "bird/retail_complains/383", "ds": "bird", "db": "retail_complains", "question": "Which city in West North Central has the highest number of customers over the age of 60?", "evidence": "in North Central refers to Region = 'North Central'; highest number of customers refers to max(count(client_id)); over the age of 60 refers to age > 60", "gold_sql": "SELECT T2.city FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'West North Central' AND T1.age > 60 GROUP BY T2.city ORDER BY COUNT(T2.city) DESC LIMIT 1", "pred_sql": "SELECT d.city\nFROM client c\nJOIN district d ON c.district_id = d.district_id\nWHERE d.division = 'West North Central'\n AND c.age > 60\nGROUP BY d.city\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "bird_q090_r1", "question_id": "bird/retail_complains/383", "ds": "bird", "db": "retail_complains", "question": "Which city in West North Central has the highest number of customers over the age of 60?", "evidence": "in North Central refers to Region = 'North Central'; highest number of customers refers to max(count(client_id)); over the age of 60 refers to age > 60", "gold_sql": "SELECT T2.city FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'West North Central' AND T1.age > 60 GROUP BY T2.city ORDER BY COUNT(T2.city) DESC LIMIT 1", "pred_sql": "SELECT c.city\nFROM client AS c\nJOIN district AS d ON c.district_id = d.district_id\nWHERE d.division = 'West North Central' AND c.age > 60\nGROUP BY c.city\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "bird_q090_r2", "question_id": "bird/retail_complains/383", "ds": "bird", "db": "retail_complains", "question": "Which city in West North Central has the highest number of customers over the age of 60?", "evidence": "in North Central refers to Region = 'North Central'; highest number of customers refers to max(count(client_id)); over the age of 60 refers to age > 60", "gold_sql": "SELECT T2.city FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'West North Central' AND T1.age > 60 GROUP BY T2.city ORDER BY COUNT(T2.city) DESC LIMIT 1", "pred_sql": "SELECT d.city\nFROM client c\nJOIN district d ON c.district_id = d.district_id\nWHERE d.division = 'West North Central'\n AND c.age > 60\nGROUP BY d.city\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "bird_q090_r3", "question_id": "bird/retail_complains/383", "ds": "bird", "db": "retail_complains", "question": "Which city in West North Central has the highest number of customers over the age of 60?", "evidence": "in North Central refers to Region = 'North Central'; highest number of customers refers to max(count(client_id)); over the age of 60 refers to age > 60", "gold_sql": "SELECT T2.city FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'West North Central' AND T1.age > 60 GROUP BY T2.city ORDER BY COUNT(T2.city) DESC LIMIT 1", "pred_sql": "SELECT c.city\nFROM client AS c\nJOIN district AS d ON c.district_id = d.district_id\nWHERE d.division = 'West North Central'\n AND c.age > 60\nGROUP BY c.city\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "bird_q091_r0", "question_id": "bird/soccer_2016/2035", "ds": "bird", "db": "soccer_2016", "question": "What is the percentage of matches that are won by runs?", "evidence": "won by runs refers to win_type = 1; percentage refers to DIVIDE(COUNT(win_type = 1), COUNT(Win_Type)) * 100", "gold_sql": "SELECT CAST(SUM(CASE WHEN T1.win_type = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Win_Type) FROM Match AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN w.Win_Id = 1 THEN 1 ELSE 0 END) / COUNT(*) \nFROM Match m \nJOIN Win_By w ON m.Win_Type = w.Win_Id;", "label": "correct", "unseen": true} {"case_id": "bird_q091_r1", "question_id": "bird/soccer_2016/2035", "ds": "bird", "db": "soccer_2016", "question": "What is the percentage of matches that are won by runs?", "evidence": "won by runs refers to win_type = 1; percentage refers to DIVIDE(COUNT(win_type = 1), COUNT(Win_Type)) * 100", "gold_sql": "SELECT CAST(SUM(CASE WHEN T1.win_type = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Win_Type) FROM Match AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN w.Win_Type = 'runs' THEN 1 ELSE 0 END) / COUNT(*) AS runs_win_pct\nFROM Match m\nJOIN Win_By w ON m.Win_Type = w.Win_Id;", "label": "spurious", "unseen": true} {"case_id": "bird_q091_r2", "question_id": "bird/soccer_2016/2035", "ds": "bird", "db": "soccer_2016", "question": "What is the percentage of matches that are won by runs?", "evidence": "won by runs refers to win_type = 1; percentage refers to DIVIDE(COUNT(win_type = 1), COUNT(Win_Type)) * 100", "gold_sql": "SELECT CAST(SUM(CASE WHEN T1.win_type = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Win_Type) FROM Match AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN wb.Win_Type = 'runs' THEN 1 ELSE 0 END) / COUNT(*) AS percentage\nFROM Match m\nJOIN Win_By wb ON m.Win_Type = wb.Win_Id;", "label": "spurious", "unseen": true} {"case_id": "bird_q091_r3", "question_id": "bird/soccer_2016/2035", "ds": "bird", "db": "soccer_2016", "question": "What is the percentage of matches that are won by runs?", "evidence": "won by runs refers to win_type = 1; percentage refers to DIVIDE(COUNT(win_type = 1), COUNT(Win_Type)) * 100", "gold_sql": "SELECT CAST(SUM(CASE WHEN T1.win_type = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Win_Type) FROM Match AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN m.Win_Type = 1 THEN 1 ELSE 0 END) / COUNT(*) AS percentage_won_by_runs\nFROM Match m;", "label": "spurious", "unseen": false} {"case_id": "bird_q092_r0", "question_id": "bird/food_inspection/8793", "ds": "bird", "db": "food_inspection", "question": "How many kinds of violations did \"Stacks Restaurant\" have on 2016/10/4?", "evidence": "\"Stacks Restaurant\" is the name of the business; date = '2016-10-04';", "gold_sql": "SELECT COUNT(DISTINCT T1.violation_type_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Stacks Restaurant' AND T1.`date` = '2016-10-04'", "pred_sql": "SELECT COUNT(*) FROM violations v JOIN businesses b ON v.business_id = b.business_id WHERE b.name = 'Stacks Restaurant' AND v.date = '2016-10-04';", "label": "spurious", "unseen": false} {"case_id": "bird_q092_r1", "question_id": "bird/food_inspection/8793", "ds": "bird", "db": "food_inspection", "question": "How many kinds of violations did \"Stacks Restaurant\" have on 2016/10/4?", "evidence": "\"Stacks Restaurant\" is the name of the business; date = '2016-10-04';", "gold_sql": "SELECT COUNT(DISTINCT T1.violation_type_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Stacks Restaurant' AND T1.`date` = '2016-10-04'", "pred_sql": "SELECT COUNT(*) AS violation_types\nFROM violations v\nJOIN businesses b ON b.business_id = v.business_id\nWHERE b.name = 'Stacks Restaurant'\n AND v.date = '2016-10-04';", "label": "spurious", "unseen": false} {"case_id": "bird_q092_r2", "question_id": "bird/food_inspection/8793", "ds": "bird", "db": "food_inspection", "question": "How many kinds of violations did \"Stacks Restaurant\" have on 2016/10/4?", "evidence": "\"Stacks Restaurant\" is the name of the business; date = '2016-10-04';", "gold_sql": "SELECT COUNT(DISTINCT T1.violation_type_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Stacks Restaurant' AND T1.`date` = '2016-10-04'", "pred_sql": "SELECT COUNT(*) AS violation_types_cnt\nFROM violations v\nJOIN businesses b ON v.business_id = b.business_id\nWHERE b.name = 'Stacks Restaurant'\n AND v.date = '2016-10-04';", "label": "spurious", "unseen": false} {"case_id": "bird_q092_r3", "question_id": "bird/food_inspection/8793", "ds": "bird", "db": "food_inspection", "question": "How many kinds of violations did \"Stacks Restaurant\" have on 2016/10/4?", "evidence": "\"Stacks Restaurant\" is the name of the business; date = '2016-10-04';", "gold_sql": "SELECT COUNT(DISTINCT T1.violation_type_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Stacks Restaurant' AND T1.`date` = '2016-10-04'", "pred_sql": "SELECT COUNT(*) AS violation_count\nFROM violations v\nJOIN businesses b ON v.business_id = b.business_id\nWHERE b.name = 'Stacks Restaurant'\n AND v.date = '2016-10-04';", "label": "spurious", "unseen": false} {"case_id": "bird_q093_r0", "question_id": "bird/hockey/7669", "ds": "bird", "db": "hockey", "question": "How many players born in Toronto have won the All-Rookie award?", "evidence": "born in Toronto refers to birthCity = 'Toronto'", "gold_sql": "SELECT COUNT(T1.playerID) FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'All-Rookie' AND T1.birthCity = 'Toronto'", "pred_sql": "SELECT COUNT(*) FROM Master m JOIN AwardsPlayers ap ON m.playerID = ap.playerID WHERE m.birthCity = 'Toronto' AND ap.award = 'All-Rookie';", "label": "correct", "unseen": false} {"case_id": "bird_q093_r1", "question_id": "bird/hockey/7669", "ds": "bird", "db": "hockey", "question": "How many players born in Toronto have won the All-Rookie award?", "evidence": "born in Toronto refers to birthCity = 'Toronto'", "gold_sql": "SELECT COUNT(T1.playerID) FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'All-Rookie' AND T1.birthCity = 'Toronto'", "pred_sql": "SELECT COUNT(*) FROM Master m JOIN AwardsPlayers ap ON m.playerID = ap.playerID WHERE m.birthCity = 'Toronto' AND ap.award = 'All-Rookie';", "label": "correct", "unseen": false} {"case_id": "bird_q093_r2", "question_id": "bird/hockey/7669", "ds": "bird", "db": "hockey", "question": "How many players born in Toronto have won the All-Rookie award?", "evidence": "born in Toronto refers to birthCity = 'Toronto'", "gold_sql": "SELECT COUNT(T1.playerID) FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'All-Rookie' AND T1.birthCity = 'Toronto'", "pred_sql": "SELECT COUNT(*) AS player_count\nFROM Master m\nJOIN AwardsPlayers a ON m.playerID = a.playerID\nWHERE m.birthCity = 'Toronto'\n AND a.award = 'All-Rookie';", "label": "correct", "unseen": false} {"case_id": "bird_q093_r3", "question_id": "bird/hockey/7669", "ds": "bird", "db": "hockey", "question": "How many players born in Toronto have won the All-Rookie award?", "evidence": "born in Toronto refers to birthCity = 'Toronto'", "gold_sql": "SELECT COUNT(T1.playerID) FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'All-Rookie' AND T1.birthCity = 'Toronto'", "pred_sql": "SELECT COUNT(*) \nFROM AwardsPlayers ap\nJOIN Master m ON ap.playerID = m.playerID\nWHERE m.birthCity = 'Toronto' \n AND ap.award = 'All-Rookie';", "label": "correct", "unseen": false} {"case_id": "bird_q094_r0", "question_id": "bird/world/7860", "ds": "bird", "db": "world", "question": "How many percent of the population of China used Chinese as their language?", "evidence": "percent refers to Percentage; China is a name of country; use Chinese as their language refers to Language = 'Chinese';", "gold_sql": "SELECT T2.Percentage FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'China' AND T2.Language = 'Chinese'", "pred_sql": "SELECT cl.Percentage\nFROM CountryLanguage AS cl\nJOIN Country AS c ON cl.CountryCode = c.Code\nWHERE c.Name = 'China' AND cl.Language = 'Chinese';", "label": "correct", "unseen": false} {"case_id": "bird_q094_r1", "question_id": "bird/world/7860", "ds": "bird", "db": "world", "question": "How many percent of the population of China used Chinese as their language?", "evidence": "percent refers to Percentage; China is a name of country; use Chinese as their language refers to Language = 'Chinese';", "gold_sql": "SELECT T2.Percentage FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'China' AND T2.Language = 'Chinese'", "pred_sql": "SELECT cl.Percentage\nFROM CountryLanguage AS cl\nJOIN Country AS c ON cl.CountryCode = c.Code\nWHERE c.Name = 'China' AND cl.Language = 'Chinese';", "label": "correct", "unseen": false} {"case_id": "bird_q094_r2", "question_id": "bird/world/7860", "ds": "bird", "db": "world", "question": "How many percent of the population of China used Chinese as their language?", "evidence": "percent refers to Percentage; China is a name of country; use Chinese as their language refers to Language = 'Chinese';", "gold_sql": "SELECT T2.Percentage FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'China' AND T2.Language = 'Chinese'", "pred_sql": "SELECT cl.Percentage\nFROM Country c\nJOIN CountryLanguage cl ON cl.CountryCode = c.Code\nWHERE c.Name = 'China' AND cl.Language = 'Chinese';", "label": "correct", "unseen": false} {"case_id": "bird_q094_r3", "question_id": "bird/world/7860", "ds": "bird", "db": "world", "question": "How many percent of the population of China used Chinese as their language?", "evidence": "percent refers to Percentage; China is a name of country; use Chinese as their language refers to Language = 'Chinese';", "gold_sql": "SELECT T2.Percentage FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'China' AND T2.Language = 'Chinese'", "pred_sql": "SELECT cl.Percentage\nFROM CountryLanguage AS cl\nJOIN Country AS c ON cl.CountryCode = c.Code\nWHERE c.Name = 'China' AND cl.Language = 'Chinese';", "label": "correct", "unseen": false} {"case_id": "bird_q095_r0", "question_id": "bird/movie_platform/37", "ds": "bird", "db": "movie_platform", "question": "How many users rated the movie \"The Magnificent Ambersons\" gave a rating score of no more than 2? List all the URL to the rating on Mubi.", "evidence": "The Magnificent Ambersons refers to movie_title; rating score of no more than 2 refers to rating_score<2; URL to rating refers to rating_url", "gold_sql": "SELECT COUNT(T2.user_id), T2.rating_url FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_title = 'The Magnificent Ambersons' AND T2.rating_score <= 2", "pred_sql": "SELECT COUNT(*) AS user_count, r.rating_url\nFROM ratings r\nJOIN movies m ON m.movie_id = r.movie_id\nWHERE m.movie_title = 'The Magnificent Ambersons'\n AND r.rating_score < 2;", "label": "wrong", "unseen": true} {"case_id": "bird_q095_r1", "question_id": "bird/movie_platform/37", "ds": "bird", "db": "movie_platform", "question": "How many users rated the movie \"The Magnificent Ambersons\" gave a rating score of no more than 2? List all the URL to the rating on Mubi.", "evidence": "The Magnificent Ambersons refers to movie_title; rating score of no more than 2 refers to rating_score<2; URL to rating refers to rating_url", "gold_sql": "SELECT COUNT(T2.user_id), T2.rating_url FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_title = 'The Magnificent Ambersons' AND T2.rating_score <= 2", "pred_sql": "SELECT COUNT(*), GROUP_CONCAT(ratings.rating_url)\nFROM movies\nJOIN ratings ON ratings.movie_id = movies.movie_id\nWHERE movies.movie_title = 'The Magnificent Ambersons'\n AND ratings.rating_score < 2;", "label": "wrong", "unseen": true} {"case_id": "bird_q095_r2", "question_id": "bird/movie_platform/37", "ds": "bird", "db": "movie_platform", "question": "How many users rated the movie \"The Magnificent Ambersons\" gave a rating score of no more than 2? List all the URL to the rating on Mubi.", "evidence": "The Magnificent Ambersons refers to movie_title; rating score of no more than 2 refers to rating_score<2; URL to rating refers to rating_url", "gold_sql": "SELECT COUNT(T2.user_id), T2.rating_url FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_title = 'The Magnificent Ambersons' AND T2.rating_score <= 2", "pred_sql": "SELECT COUNT(*) AS rating_count, ratings.rating_url\nFROM movies\nJOIN ratings ON movies.movie_id = ratings.movie_id\nWHERE movies.movie_title = 'The Magnificent Ambersons'\n AND ratings.rating_score < 2\nGROUP BY ratings.rating_url;", "label": "wrong", "unseen": true} {"case_id": "bird_q095_r3", "question_id": "bird/movie_platform/37", "ds": "bird", "db": "movie_platform", "question": "How many users rated the movie \"The Magnificent Ambersons\" gave a rating score of no more than 2? List all the URL to the rating on Mubi.", "evidence": "The Magnificent Ambersons refers to movie_title; rating score of no more than 2 refers to rating_score<2; URL to rating refers to rating_url", "gold_sql": "SELECT COUNT(T2.user_id), T2.rating_url FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_title = 'The Magnificent Ambersons' AND T2.rating_score <= 2", "pred_sql": "SELECT COUNT(*) AS user_count, r.rating_url\nFROM ratings r\nJOIN movies m ON m.movie_id = r.movie_id\nWHERE m.movie_title = 'The Magnificent Ambersons'\n AND r.rating_score < 2;", "label": "wrong", "unseen": true} {"case_id": "bird_q096_r0", "question_id": "bird/talkingdata/1103", "ds": "bird", "db": "talkingdata", "question": "How many users installed the app but are not active?", "evidence": "installed refers to is_installed = 1; not active refers to is_active = 0;", "gold_sql": "SELECT COUNT(app_id) FROM app_events WHERE is_installed = 1 AND is_active = 0", "pred_sql": "SELECT COUNT(*) FROM app_events WHERE is_installed = 1 AND is_active = 0;", "label": "correct", "unseen": false} {"case_id": "bird_q096_r1", "question_id": "bird/talkingdata/1103", "ds": "bird", "db": "talkingdata", "question": "How many users installed the app but are not active?", "evidence": "installed refers to is_installed = 1; not active refers to is_active = 0;", "gold_sql": "SELECT COUNT(app_id) FROM app_events WHERE is_installed = 1 AND is_active = 0", "pred_sql": "SELECT COUNT(*) FROM app_events WHERE is_installed = 1 AND is_active = 0;", "label": "correct", "unseen": false} {"case_id": "bird_q096_r2", "question_id": "bird/talkingdata/1103", "ds": "bird", "db": "talkingdata", "question": "How many users installed the app but are not active?", "evidence": "installed refers to is_installed = 1; not active refers to is_active = 0;", "gold_sql": "SELECT COUNT(app_id) FROM app_events WHERE is_installed = 1 AND is_active = 0", "pred_sql": "SELECT COUNT(*) FROM app_events WHERE is_installed = 1 AND is_active = 0;", "label": "correct", "unseen": false} {"case_id": "bird_q096_r3", "question_id": "bird/talkingdata/1103", "ds": "bird", "db": "talkingdata", "question": "How many users installed the app but are not active?", "evidence": "installed refers to is_installed = 1; not active refers to is_active = 0;", "gold_sql": "SELECT COUNT(app_id) FROM app_events WHERE is_installed = 1 AND is_active = 0", "pred_sql": "SELECT COUNT(*) FROM app_events WHERE is_installed = 1 AND is_active = 0;", "label": "correct", "unseen": false} {"case_id": "bird_q097_r0", "question_id": "bird/works_cycles/7366", "ds": "bird", "db": "works_cycles", "question": "What percentage of businesses in the Northwest US have forecasted annual sales of above 300,000?", "evidence": "Northwest refers to Name = 'Northwest'; US refers to CountryRegionCode = 'US'; forecasted annual sales of above 300,000 refers to SalesQuota >300000; Percentage = Divide(Count(TerritoryID(SalesQuota >300000)),Count(TerritoryID))*100", "gold_sql": "SELECT CAST(SUM(CASE WHEN T1.SalesQuota > 300000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.BusinessEntityID) FROM SalesPerson AS T1 INNER JOIN SalesTerritory AS T2 ON T1.TerritoryID = T2.TerritoryID WHERE T2.CountryRegionCode = 'US' AND T2.Name = 'Northwest'", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN sp.SalesQuota > 300000 THEN 1 ELSE 0 END) / COUNT(*) AS percentage\nFROM SalesPerson sp\nJOIN SalesTerritory st ON sp.TerritoryID = st.TerritoryID\nJOIN CountryRegion cr ON st.CountryRegionCode = cr.CountryRegionCode\nWHERE st.Name = 'Northwest' AND cr.Name = 'US';", "label": "wrong", "unseen": true} {"case_id": "bird_q097_r1", "question_id": "bird/works_cycles/7366", "ds": "bird", "db": "works_cycles", "question": "What percentage of businesses in the Northwest US have forecasted annual sales of above 300,000?", "evidence": "Northwest refers to Name = 'Northwest'; US refers to CountryRegionCode = 'US'; forecasted annual sales of above 300,000 refers to SalesQuota >300000; Percentage = Divide(Count(TerritoryID(SalesQuota >300000)),Count(TerritoryID))*100", "gold_sql": "SELECT CAST(SUM(CASE WHEN T1.SalesQuota > 300000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.BusinessEntityID) FROM SalesPerson AS T1 INNER JOIN SalesTerritory AS T2 ON T1.TerritoryID = T2.TerritoryID WHERE T2.CountryRegionCode = 'US' AND T2.Name = 'Northwest'", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN sp.SalesQuota > 300000 THEN 1 ELSE 0 END) / COUNT(*) AS percentage\nFROM SalesPerson sp\nJOIN SalesTerritory st ON sp.TerritoryID = st.TerritoryID\nWHERE st.Name = 'Northwest' AND st.CountryRegionCode = 'US';", "label": "correct", "unseen": true} {"case_id": "bird_q097_r2", "question_id": "bird/works_cycles/7366", "ds": "bird", "db": "works_cycles", "question": "What percentage of businesses in the Northwest US have forecasted annual sales of above 300,000?", "evidence": "Northwest refers to Name = 'Northwest'; US refers to CountryRegionCode = 'US'; forecasted annual sales of above 300,000 refers to SalesQuota >300000; Percentage = Divide(Count(TerritoryID(SalesQuota >300000)),Count(TerritoryID))*100", "gold_sql": "SELECT CAST(SUM(CASE WHEN T1.SalesQuota > 300000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.BusinessEntityID) FROM SalesPerson AS T1 INNER JOIN SalesTerritory AS T2 ON T1.TerritoryID = T2.TerritoryID WHERE T2.CountryRegionCode = 'US' AND T2.Name = 'Northwest'", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN sp.SalesQuota > 300000 THEN 1 ELSE 0 END) / COUNT(*) AS percentage\nFROM SalesPerson sp\nJOIN SalesTerritory st ON sp.TerritoryID = st.TerritoryID\nJOIN CountryRegion cr ON st.CountryRegionCode = cr.CountryRegionCode\nWHERE st.Name = 'Northwest' AND cr.Name = 'US';", "label": "wrong", "unseen": true} {"case_id": "bird_q097_r3", "question_id": "bird/works_cycles/7366", "ds": "bird", "db": "works_cycles", "question": "What percentage of businesses in the Northwest US have forecasted annual sales of above 300,000?", "evidence": "Northwest refers to Name = 'Northwest'; US refers to CountryRegionCode = 'US'; forecasted annual sales of above 300,000 refers to SalesQuota >300000; Percentage = Divide(Count(TerritoryID(SalesQuota >300000)),Count(TerritoryID))*100", "gold_sql": "SELECT CAST(SUM(CASE WHEN T1.SalesQuota > 300000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.BusinessEntityID) FROM SalesPerson AS T1 INNER JOIN SalesTerritory AS T2 ON T1.TerritoryID = T2.TerritoryID WHERE T2.CountryRegionCode = 'US' AND T2.Name = 'Northwest'", "pred_sql": "SELECT 100.0 * SUM(CASE WHEN sp.SalesQuota > 300000 THEN 1 ELSE 0 END) / COUNT(*) AS Percentage\nFROM SalesPerson sp\nJOIN SalesTerritory st ON sp.TerritoryID = st.TerritoryID\nWHERE st.Name = 'Northwest' AND st.CountryRegionCode = 'US';", "label": "correct", "unseen": true} {"case_id": "bird_q098_r0", "question_id": "bird/student_loan/4420", "ds": "bird", "db": "student_loan", "question": "What is the average of absence for an employed students?", "evidence": "average refers to DIVIDE(SUM(month), COUNT(name))", "gold_sql": "SELECT AVG(month) FROM longest_absense_from_school WHERE name NOT IN ( SELECT name FROM unemployed )", "pred_sql": "SELECT AVG(month) FROM longest_absense_from_school WHERE name NOT IN (SELECT name FROM unemployed);", "label": "correct", "unseen": false} {"case_id": "bird_q098_r1", "question_id": "bird/student_loan/4420", "ds": "bird", "db": "student_loan", "question": "What is the average of absence for an employed students?", "evidence": "average refers to DIVIDE(SUM(month), COUNT(name))", "gold_sql": "SELECT AVG(month) FROM longest_absense_from_school WHERE name NOT IN ( SELECT name FROM unemployed )", "pred_sql": "SELECT AVG(month) FROM longest_absense_from_school WHERE name NOT IN (SELECT name FROM unemployed);", "label": "correct", "unseen": false} {"case_id": "bird_q098_r2", "question_id": "bird/student_loan/4420", "ds": "bird", "db": "student_loan", "question": "What is the average of absence for an employed students?", "evidence": "average refers to DIVIDE(SUM(month), COUNT(name))", "gold_sql": "SELECT AVG(month) FROM longest_absense_from_school WHERE name NOT IN ( SELECT name FROM unemployed )", "pred_sql": "SELECT AVG(month) FROM longest_absense_from_school WHERE month IS NOT NULL;", "label": "wrong", "unseen": false} {"case_id": "bird_q098_r3", "question_id": "bird/student_loan/4420", "ds": "bird", "db": "student_loan", "question": "What is the average of absence for an employed students?", "evidence": "average refers to DIVIDE(SUM(month), COUNT(name))", "gold_sql": "SELECT AVG(month) FROM longest_absense_from_school WHERE name NOT IN ( SELECT name FROM unemployed )", "pred_sql": "SELECT AVG(l.month) FROM longest_absense_from_school l WHERE l.name NOT IN (SELECT name FROM unemployed);", "label": "correct", "unseen": false} {"case_id": "bird_q099_r0", "question_id": "bird/synthea/1542", "ds": "bird", "db": "synthea", "question": "List down the full name of Irish patients diagnosed with the prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions.", "evidence": "full name = first, last; Irish refers to ethnicity = 'irish'; prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions = OCCURRENCES > (AVG(MULTIPLY(all_prevalences.OCCURRENCES, 0.96)));", "gold_sql": "SELECT DISTINCT T2.first, T2.last FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN all_prevalences AS T3 ON T1.DESCRIPTION = T3.ITEM WHERE T2.ethnicity = 'irish' AND 100 * CAST(T3.OCCURRENCES AS REAL) / ( SELECT AVG(OCCURRENCES) FROM all_prevalences ) > 96", "pred_sql": "SELECT p.first, p.last\nFROM patients p\nJOIN conditions c ON p.patient = c.PATIENT\nJOIN all_prevalences ap ON c.DESCRIPTION = ap.ITEM\nWHERE p.ethnicity = 'irish'\n AND ap.OCCURRENCES > (SELECT AVG(OCCURRENCES) * 0.96 FROM all_prevalences);", "label": "wrong", "unseen": false} {"case_id": "bird_q099_r1", "question_id": "bird/synthea/1542", "ds": "bird", "db": "synthea", "question": "List down the full name of Irish patients diagnosed with the prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions.", "evidence": "full name = first, last; Irish refers to ethnicity = 'irish'; prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions = OCCURRENCES > (AVG(MULTIPLY(all_prevalences.OCCURRENCES, 0.96)));", "gold_sql": "SELECT DISTINCT T2.first, T2.last FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN all_prevalences AS T3 ON T1.DESCRIPTION = T3.ITEM WHERE T2.ethnicity = 'irish' AND 100 * CAST(T3.OCCURRENCES AS REAL) / ( SELECT AVG(OCCURRENCES) FROM all_prevalences ) > 96", "pred_sql": "SELECT p.first, p.last\nFROM patients p\nJOIN conditions c ON p.patient = c.PATIENT\nJOIN all_prevalences ap ON c.DESCRIPTION = ap.ITEM\nWHERE p.ethnicity = 'irish'\n AND ap.OCCURRENCES > (SELECT AVG(OCCURRENCES) * 0.96 FROM all_prevalences);", "label": "wrong", "unseen": false} {"case_id": "bird_q099_r2", "question_id": "bird/synthea/1542", "ds": "bird", "db": "synthea", "question": "List down the full name of Irish patients diagnosed with the prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions.", "evidence": "full name = first, last; Irish refers to ethnicity = 'irish'; prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions = OCCURRENCES > (AVG(MULTIPLY(all_prevalences.OCCURRENCES, 0.96)));", "gold_sql": "SELECT DISTINCT T2.first, T2.last FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN all_prevalences AS T3 ON T1.DESCRIPTION = T3.ITEM WHERE T2.ethnicity = 'irish' AND 100 * CAST(T3.OCCURRENCES AS REAL) / ( SELECT AVG(OCCURRENCES) FROM all_prevalences ) > 96", "pred_sql": "SELECT DISTINCT p.first, p.last\nFROM patients p\nJOIN conditions c ON p.patient = c.PATIENT\nJOIN all_prevalences ap ON c.DESCRIPTION = ap.ITEM\nWHERE p.ethnicity = 'irish'\n AND ap.OCCURRENCES > (SELECT AVG(OCCURRENCES) * 0.96 FROM all_prevalences);", "label": "correct", "unseen": false} {"case_id": "bird_q099_r3", "question_id": "bird/synthea/1542", "ds": "bird", "db": "synthea", "question": "List down the full name of Irish patients diagnosed with the prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions.", "evidence": "full name = first, last; Irish refers to ethnicity = 'irish'; prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions = OCCURRENCES > (AVG(MULTIPLY(all_prevalences.OCCURRENCES, 0.96)));", "gold_sql": "SELECT DISTINCT T2.first, T2.last FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN all_prevalences AS T3 ON T1.DESCRIPTION = T3.ITEM WHERE T2.ethnicity = 'irish' AND 100 * CAST(T3.OCCURRENCES AS REAL) / ( SELECT AVG(OCCURRENCES) FROM all_prevalences ) > 96", "pred_sql": "SELECT DISTINCT p.first, p.last\nFROM patients p\nJOIN conditions c ON c.PATIENT = p.patient\nJOIN all_prevalences ap ON ap.ITEM = c.DESCRIPTION\nWHERE p.ethnicity = 'irish'\n AND ap.OCCURRENCES > (SELECT AVG(OCCURRENCES) * 0.96 FROM all_prevalences);", "label": "spurious", "unseen": false} {"case_id": "spider_q000_r0", "question_id": "spider/store_product/4913", "ds": "spider", "db": "store_product", "question": "What is the total number of residents for the districts with the 3 largest areas?", "evidence": "", "gold_sql": "SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3", "pred_sql": "SELECT SUM(City_Population) FROM district ORDER BY City_Area DESC LIMIT 3", "label": "correct", "unseen": false} {"case_id": "spider_q000_r1", "question_id": "spider/store_product/4913", "ds": "spider", "db": "store_product", "question": "What is the total number of residents for the districts with the 3 largest areas?", "evidence": "", "gold_sql": "SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3", "pred_sql": "SELECT SUM(d.City_Population) FROM district d ORDER BY d.City_Area DESC LIMIT 3;", "label": "correct", "unseen": false} {"case_id": "spider_q000_r2", "question_id": "spider/store_product/4913", "ds": "spider", "db": "store_product", "question": "What is the total number of residents for the districts with the 3 largest areas?", "evidence": "", "gold_sql": "SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3", "pred_sql": "SELECT SUM(City_Population) \nFROM district \nORDER BY City_Area DESC \nLIMIT 3;", "label": "correct", "unseen": false} {"case_id": "spider_q000_r3", "question_id": "spider/store_product/4913", "ds": "spider", "db": "store_product", "question": "What is the total number of residents for the districts with the 3 largest areas?", "evidence": "", "gold_sql": "SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3", "pred_sql": "SELECT SUM(City_Population) FROM district ORDER BY City_Area DESC LIMIT 3;", "label": "correct", "unseen": false} {"case_id": "spider_q001_r0", "question_id": "spider/customer_deliveries/2856", "ds": "spider", "db": "customer_deliveries", "question": "Find the name of route that has the highest number of deliveries.", "evidence": "", "gold_sql": "SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT dr.route_name\nFROM Delivery_Routes dr\nJOIN Order_Deliveries od ON dr.route_id = od.location_code\nGROUP BY dr.route_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q001_r1", "question_id": "spider/customer_deliveries/2856", "ds": "spider", "db": "customer_deliveries", "question": "Find the name of route that has the highest number of deliveries.", "evidence": "", "gold_sql": "SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT drr.route_name\nFROM Delivery_Routes drr\nJOIN Delivery_Route_Locations drl ON drr.route_id = drl.route_id\nJOIN Order_Deliveries odr ON odr.location_code = drl.location_code\nGROUP BY drr.route_name\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q001_r2", "question_id": "spider/customer_deliveries/2856", "ds": "spider", "db": "customer_deliveries", "question": "Find the name of route that has the highest number of deliveries.", "evidence": "", "gold_sql": "SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT dr.route_name\nFROM Delivery_Routes dr\nJOIN Order_Deliveries od ON dr.route_id = od.location_code\nGROUP BY dr.route_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q001_r3", "question_id": "spider/customer_deliveries/2856", "ds": "spider", "db": "customer_deliveries", "question": "Find the name of route that has the highest number of deliveries.", "evidence": "", "gold_sql": "SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT dr.route_name\nFROM Delivery_Routes AS dr\nJOIN Order_Deliveries AS od ON dr.route_id = od.location_code\nGROUP BY dr.route_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q002_r0", "question_id": "spider/cre_Theme_park/5945", "ds": "spider", "db": "cre_Theme_park", "question": "Show the transportation method most people choose to get to tourist attractions.", "evidence": "", "gold_sql": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1", "pred_sql": "SELECT Tourist_Attractions.How_to_Get_There\nFROM Tourist_Attractions\nJOIN Visits ON Tourist_Attractions.Tourist_Attraction_ID = Visits.Tourist_Attraction_ID\nGROUP BY Tourist_Attractions.How_to_Get_There\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "spider_q002_r1", "question_id": "spider/cre_Theme_park/5945", "ds": "spider", "db": "cre_Theme_park", "question": "Show the transportation method most people choose to get to tourist attractions.", "evidence": "", "gold_sql": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1", "pred_sql": "SELECT How_to_Get_There\nFROM Tourist_Attractions\nGROUP BY How_to_Get_There\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q002_r2", "question_id": "spider/cre_Theme_park/5945", "ds": "spider", "db": "cre_Theme_park", "question": "Show the transportation method most people choose to get to tourist attractions.", "evidence": "", "gold_sql": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1", "pred_sql": "SELECT How_to_Get_There\nFROM Tourist_Attractions\nGROUP BY How_to_Get_There\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q002_r3", "question_id": "spider/cre_Theme_park/5945", "ds": "spider", "db": "cre_Theme_park", "question": "Show the transportation method most people choose to get to tourist attractions.", "evidence": "", "gold_sql": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1", "pred_sql": "SELECT How_to_Get_There\nFROM Tourist_Attractions\nGROUP BY How_to_Get_There\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q003_r0", "question_id": "spider/network_2/4412", "ds": "spider", "db": "network_2", "question": "Who is the youngest male?", "evidence": "", "gold_sql": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT min(age) FROM person WHERE gender = 'male' )", "pred_sql": "SELECT name FROM Person WHERE gender = 'male' ORDER BY age ASC LIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "spider_q003_r1", "question_id": "spider/network_2/4412", "ds": "spider", "db": "network_2", "question": "Who is the youngest male?", "evidence": "", "gold_sql": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT min(age) FROM person WHERE gender = 'male' )", "pred_sql": "SELECT name FROM Person WHERE gender = 'male' ORDER BY age ASC LIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "spider_q003_r2", "question_id": "spider/network_2/4412", "ds": "spider", "db": "network_2", "question": "Who is the youngest male?", "evidence": "", "gold_sql": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT min(age) FROM person WHERE gender = 'male' )", "pred_sql": "SELECT name\nFROM Person\nWHERE gender = 'male'\nORDER BY age ASC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "spider_q003_r3", "question_id": "spider/network_2/4412", "ds": "spider", "db": "network_2", "question": "Who is the youngest male?", "evidence": "", "gold_sql": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT min(age) FROM person WHERE gender = 'male' )", "pred_sql": "SELECT name FROM Person WHERE gender = 'male' ORDER BY age ASC LIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "spider_q004_r0", "question_id": "spider/allergy_1/533", "ds": "spider", "db": "allergy_1", "question": "Find the number of students who are older than 18 and do not have allergy to either food or animal.", "evidence": "", "gold_sql": "SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" OR T2.allergytype = \"animal\")", "pred_sql": "SELECT COUNT(*) \nFROM Student s\nWHERE s.Age > 18\n AND NOT EXISTS (\n SELECT 1\n FROM Has_Allergy ha\n JOIN Allergy_Type at ON ha.Allergy = at.Allergy\n WHERE ha.StuID = s.StuID\n AND at.AllergyType IN ('food', 'animal')\n );", "label": "spurious", "unseen": false} {"case_id": "spider_q004_r1", "question_id": "spider/allergy_1/533", "ds": "spider", "db": "allergy_1", "question": "Find the number of students who are older than 18 and do not have allergy to either food or animal.", "evidence": "", "gold_sql": "SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" OR T2.allergytype = \"animal\")", "pred_sql": "SELECT COUNT(*) \nFROM Student \nWHERE Age > 18 \n AND StuID NOT IN (\n SELECT Ha.StuID \n FROM Has_Allergy Ha \n JOIN Allergy_Type At ON Ha.Allergy = At.Allergy \n WHERE At.AllergyType IN ('food', 'animal')\n);", "label": "correct", "unseen": false} {"case_id": "spider_q004_r2", "question_id": "spider/allergy_1/533", "ds": "spider", "db": "allergy_1", "question": "Find the number of students who are older than 18 and do not have allergy to either food or animal.", "evidence": "", "gold_sql": "SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" OR T2.allergytype = \"animal\")", "pred_sql": "SELECT COUNT(*)\nFROM Student\nWHERE Age > 18\n AND StuID NOT IN (\n SELECT Ha.StuID\n FROM Has_Allergy Ha\n JOIN Allergy_Type Allergy ON Ha.Allergy = Allergy.Allergy\n WHERE Allergy.AllergyType IN ('food', 'animal')\n);", "label": "correct", "unseen": false} {"case_id": "spider_q004_r3", "question_id": "spider/allergy_1/533", "ds": "spider", "db": "allergy_1", "question": "Find the number of students who are older than 18 and do not have allergy to either food or animal.", "evidence": "", "gold_sql": "SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" OR T2.allergytype = \"animal\")", "pred_sql": "SELECT COUNT(*) \nFROM Student s\nWHERE s.Age > 18\n AND s.StuID NOT IN (\n SELECT ha.StuID\n FROM Has_Allergy ha\n JOIN Allergy_Type at ON ha.Allergy = at.Allergy\n WHERE at.AllergyType IN ('food', 'animal')\n);", "label": "correct", "unseen": false} {"case_id": "spider_q005_r0", "question_id": "spider/department_store/4709", "ds": "spider", "db": "department_store", "question": "What are the ids of the top three products that were purchased in the largest amount?", "evidence": "", "gold_sql": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3", "pred_sql": "SELECT product_id FROM Product_Suppliers ORDER BY total_amount_purchased DESC LIMIT 3;", "label": "correct", "unseen": false} {"case_id": "spider_q005_r1", "question_id": "spider/department_store/4709", "ds": "spider", "db": "department_store", "question": "What are the ids of the top three products that were purchased in the largest amount?", "evidence": "", "gold_sql": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3", "pred_sql": "SELECT product_id\nFROM Product_Suppliers\nORDER BY total_amount_purchased DESC\nLIMIT 3;", "label": "correct", "unseen": false} {"case_id": "spider_q005_r2", "question_id": "spider/department_store/4709", "ds": "spider", "db": "department_store", "question": "What are the ids of the top three products that were purchased in the largest amount?", "evidence": "", "gold_sql": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3", "pred_sql": "SELECT product_id FROM Product_Suppliers ORDER BY total_amount_purchased DESC LIMIT 3", "label": "correct", "unseen": false} {"case_id": "spider_q005_r3", "question_id": "spider/department_store/4709", "ds": "spider", "db": "department_store", "question": "What are the ids of the top three products that were purchased in the largest amount?", "evidence": "", "gold_sql": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3", "pred_sql": "SELECT product_id FROM Product_Suppliers ORDER BY total_amount_purchased DESC LIMIT 3;", "label": "correct", "unseen": false} {"case_id": "spider_q006_r0", "question_id": "spider/soccer_2/5037", "ds": "spider", "db": "soccer_2", "question": "What is the count of states with college students playing in the mid position but not as goalies?", "evidence": "", "gold_sql": "SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')", "pred_sql": "SELECT COUNT(DISTINCT c.state) \nFROM College c\nJOIN Tryout t ON c.cName = t.cName\nWHERE t.pPos = 'mid' AND t.pPos != 'goalie';", "label": "wrong", "unseen": false} {"case_id": "spider_q006_r1", "question_id": "spider/soccer_2/5037", "ds": "spider", "db": "soccer_2", "question": "What is the count of states with college students playing in the mid position but not as goalies?", "evidence": "", "gold_sql": "SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')", "pred_sql": "SELECT COUNT(*) FROM (\n SELECT c.state\n FROM College c\n JOIN Tryout t ON c.cName = t.cName\n WHERE t.pPos = 'mid'\n EXCEPT\n SELECT c.state\n FROM College c\n JOIN Tryout t ON c.cName = t.cName\n WHERE t.pPos = 'goalie'\n) AS subquery", "label": "correct", "unseen": false} {"case_id": "spider_q006_r2", "question_id": "spider/soccer_2/5037", "ds": "spider", "db": "soccer_2", "question": "What is the count of states with college students playing in the mid position but not as goalies?", "evidence": "", "gold_sql": "SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')", "pred_sql": "SELECT COUNT(DISTINCT c.state) FROM College c JOIN Tryout t ON c.cName = t.cName WHERE t.pPos = 'mid' AND t.pPos != 'goalie';", "label": "wrong", "unseen": false} {"case_id": "spider_q006_r3", "question_id": "spider/soccer_2/5037", "ds": "spider", "db": "soccer_2", "question": "What is the count of states with college students playing in the mid position but not as goalies?", "evidence": "", "gold_sql": "SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')", "pred_sql": "SELECT COUNT(DISTINCT College.state)\nFROM College\nJOIN Tryout ON College.cName = Tryout.cName\nWHERE Tryout.pPos = 'mid'\n AND Tryout.decision IS NOT NULL;", "label": "wrong", "unseen": false} {"case_id": "spider_q007_r0", "question_id": "spider/college_1/3205", "ds": "spider", "db": "college_1", "question": "Find the number of classes in each department.", "evidence": "", "gold_sql": "SELECT count(*) , dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code", "pred_sql": "SELECT COUNT(*), COURSE.DEPT_CODE FROM CLASS JOIN COURSE ON CLASS.CRS_CODE = COURSE.CRS_CODE GROUP BY COURSE.DEPT_CODE", "label": "correct", "unseen": false} {"case_id": "spider_q007_r1", "question_id": "spider/college_1/3205", "ds": "spider", "db": "college_1", "question": "Find the number of classes in each department.", "evidence": "", "gold_sql": "SELECT count(*) , dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code", "pred_sql": "SELECT COUNT(*) AS class_count, d.DEPT_CODE\nFROM CLASS cl\nJOIN COURSE c ON cl.CRS_CODE = c.CRS_CODE\nJOIN DEPARTMENT d ON c.DEPT_CODE = d.DEPT_CODE\nGROUP BY d.DEPT_CODE;", "label": "spurious", "unseen": true} {"case_id": "spider_q007_r2", "question_id": "spider/college_1/3205", "ds": "spider", "db": "college_1", "question": "Find the number of classes in each department.", "evidence": "", "gold_sql": "SELECT count(*) , dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code", "pred_sql": "SELECT COUNT(*), d.DEPT_CODE\nFROM CLASS cls\nJOIN COURSE c ON cls.CRS_CODE = c.CRS_CODE\nJOIN DEPARTMENT d ON c.DEPT_CODE = d.DEPT_CODE\nGROUP BY d.DEPT_CODE;", "label": "spurious", "unseen": true} {"case_id": "spider_q007_r3", "question_id": "spider/college_1/3205", "ds": "spider", "db": "college_1", "question": "Find the number of classes in each department.", "evidence": "", "gold_sql": "SELECT count(*) , dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code", "pred_sql": "SELECT COUNT(*), c.DEPT_CODE\nFROM CLASS cl\nJOIN COURSE c ON cl.CRS_CODE = c.CRS_CODE\nGROUP BY c.DEPT_CODE;", "label": "correct", "unseen": false} {"case_id": "spider_q008_r0", "question_id": "spider/network_2/4480", "ds": "spider", "db": "network_2", "question": "What is the total number of people who has no friend living in the city of Austin.", "evidence": "", "gold_sql": "SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city = 'Austin')", "pred_sql": "SELECT COUNT(*)\nFROM Person p\nWHERE p.name NOT IN (\n SELECT pf.friend\n FROM PersonFriend pf\n JOIN Person pf2 ON pf.friend = pf2.name\n WHERE pf2.city = 'austin'\n);", "label": "spurious", "unseen": true} {"case_id": "spider_q008_r1", "question_id": "spider/network_2/4480", "ds": "spider", "db": "network_2", "question": "What is the total number of people who has no friend living in the city of Austin.", "evidence": "", "gold_sql": "SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city = 'Austin')", "pred_sql": "SELECT COUNT(*) FROM Person p WHERE p.city != 'austin' AND NOT EXISTS (SELECT 1 FROM PersonFriend pf JOIN Person p2 ON pf.friend = p2.name WHERE p2.city = 'austin' AND p2.name = p.name);", "label": "spurious", "unseen": true} {"case_id": "spider_q008_r2", "question_id": "spider/network_2/4480", "ds": "spider", "db": "network_2", "question": "What is the total number of people who has no friend living in the city of Austin.", "evidence": "", "gold_sql": "SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city = 'Austin')", "pred_sql": "SELECT COUNT(*) FROM Person WHERE name NOT IN (SELECT friend FROM PersonFriend WHERE friend IN (SELECT name FROM Person WHERE city = 'austin'));", "label": "spurious", "unseen": false} {"case_id": "spider_q008_r3", "question_id": "spider/network_2/4480", "ds": "spider", "db": "network_2", "question": "What is the total number of people who has no friend living in the city of Austin.", "evidence": "", "gold_sql": "SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city = 'Austin')", "pred_sql": "SELECT COUNT(*) FROM Person p WHERE p.city <> 'austin';", "label": "spurious", "unseen": false} {"case_id": "spider_q009_r0", "question_id": "spider/wine_1/6565", "ds": "spider", "db": "wine_1", "question": "What is the color of the grape whose wine products has the highest average price?", "evidence": "", "gold_sql": "SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1", "pred_sql": "SELECT g.Color\nFROM wine w\nJOIN grapes g ON w.Grape = g.Grape\nGROUP BY w.Grape\nORDER BY AVG(w.Price) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q009_r1", "question_id": "spider/wine_1/6565", "ds": "spider", "db": "wine_1", "question": "What is the color of the grape whose wine products has the highest average price?", "evidence": "", "gold_sql": "SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1", "pred_sql": "SELECT g.Color\nFROM grapes g\nJOIN wine w ON w.Grape = g.Grape\nGROUP BY w.Grape\nORDER BY AVG(w.Price) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q009_r2", "question_id": "spider/wine_1/6565", "ds": "spider", "db": "wine_1", "question": "What is the color of the grape whose wine products has the highest average price?", "evidence": "", "gold_sql": "SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1", "pred_sql": "SELECT g.Color\nFROM grapes g\nJOIN wine w ON w.Grape = g.Grape\nGROUP BY g.Grape\nORDER BY AVG(w.Price) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q009_r3", "question_id": "spider/wine_1/6565", "ds": "spider", "db": "wine_1", "question": "What is the color of the grape whose wine products has the highest average price?", "evidence": "", "gold_sql": "SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1", "pred_sql": "SELECT g.Color\nFROM grapes g\nJOIN wine w ON w.Grape = g.Grape\nGROUP BY g.Grape\nORDER BY AVG(w.Price) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q010_r0", "question_id": "spider/local_govt_in_alabama/2140", "ds": "spider", "db": "local_govt_in_alabama", "question": "How many events have each participants attended? List the participant id, type and the number.", "evidence": "", "gold_sql": "SELECT T1.Participant_ID , T1.Participant_Type_Code , count(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_ID", "pred_sql": "SELECT p.Participant_ID, p.Participant_Type_Code, COUNT(*) AS event_count\nFROM Participants p\nJOIN Participants_in_Events pe ON p.Participant_ID = pe.Participant_ID\nGROUP BY p.Participant_ID, p.Participant_Type_Code;", "label": "correct", "unseen": false} {"case_id": "spider_q010_r1", "question_id": "spider/local_govt_in_alabama/2140", "ds": "spider", "db": "local_govt_in_alabama", "question": "How many events have each participants attended? List the participant id, type and the number.", "evidence": "", "gold_sql": "SELECT T1.Participant_ID , T1.Participant_Type_Code , count(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_ID", "pred_sql": "SELECT p.Participant_ID, p.Participant_Type_Code, COUNT(*) AS Event_Count\nFROM Participants p\nJOIN Participants_in_Events pe ON p.Participant_ID = pe.Participant_ID\nGROUP BY p.Participant_ID, p.Participant_Type_Code;", "label": "correct", "unseen": false} {"case_id": "spider_q010_r2", "question_id": "spider/local_govt_in_alabama/2140", "ds": "spider", "db": "local_govt_in_alabama", "question": "How many events have each participants attended? List the participant id, type and the number.", "evidence": "", "gold_sql": "SELECT T1.Participant_ID , T1.Participant_Type_Code , count(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_ID", "pred_sql": "SELECT pi.Participant_ID, p.Participant_Type_Code, COUNT(*) AS event_count\nFROM Participants_in_Events pi\nJOIN Participants p ON pi.Participant_ID = p.Participant_ID\nGROUP BY pi.Participant_ID, p.Participant_Type_Code;", "label": "correct", "unseen": false} {"case_id": "spider_q010_r3", "question_id": "spider/local_govt_in_alabama/2140", "ds": "spider", "db": "local_govt_in_alabama", "question": "How many events have each participants attended? List the participant id, type and the number.", "evidence": "", "gold_sql": "SELECT T1.Participant_ID , T1.Participant_Type_Code , count(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_ID", "pred_sql": "SELECT p.Participant_ID, p.Participant_Type_Code, COUNT(*) AS event_count\nFROM Participants p\nJOIN Participants_in_Events pie ON p.Participant_ID = pie.Participant_ID\nGROUP BY p.Participant_ID, p.Participant_Type_Code;", "label": "correct", "unseen": false} {"case_id": "spider_q011_r0", "question_id": "spider/customers_and_invoices/1571", "ds": "spider", "db": "customers_and_invoices", "question": "Show first name and id for all customers with at least 2 accounts.", "evidence": "", "gold_sql": "SELECT T2.customer_first_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2", "pred_sql": "SELECT Customers.customer_first_name, Customers.customer_id\nFROM Customers\nJOIN Accounts ON Accounts.customer_id = Customers.customer_id\nGROUP BY Customers.customer_id\nHAVING COUNT(*) >= 2;", "label": "correct", "unseen": false} {"case_id": "spider_q011_r1", "question_id": "spider/customers_and_invoices/1571", "ds": "spider", "db": "customers_and_invoices", "question": "Show first name and id for all customers with at least 2 accounts.", "evidence": "", "gold_sql": "SELECT T2.customer_first_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2", "pred_sql": "SELECT Customers.customer_first_name, Customers.customer_id\nFROM Customers\nJOIN Accounts ON Customers.customer_id = Accounts.customer_id\nGROUP BY Accounts.customer_id\nHAVING COUNT(*) >= 2;", "label": "correct", "unseen": false} {"case_id": "spider_q011_r2", "question_id": "spider/customers_and_invoices/1571", "ds": "spider", "db": "customers_and_invoices", "question": "Show first name and id for all customers with at least 2 accounts.", "evidence": "", "gold_sql": "SELECT T2.customer_first_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2", "pred_sql": "SELECT Customers.customer_first_name, Customers.customer_id\nFROM Customers\nJOIN Accounts ON Customers.customer_id = Accounts.customer_id\nGROUP BY Customers.customer_id\nHAVING COUNT(Accounts.account_id) >= 2;", "label": "correct", "unseen": false} {"case_id": "spider_q011_r3", "question_id": "spider/customers_and_invoices/1571", "ds": "spider", "db": "customers_and_invoices", "question": "Show first name and id for all customers with at least 2 accounts.", "evidence": "", "gold_sql": "SELECT T2.customer_first_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2", "pred_sql": "SELECT c.customer_first_name, c.customer_id\nFROM Customers c\nJOIN Accounts a ON c.customer_id = a.customer_id\nGROUP BY c.customer_id\nHAVING COUNT(a.account_id) >= 2;", "label": "correct", "unseen": false} {"case_id": "spider_q012_r0", "question_id": "spider/company_employee/4107", "ds": "spider", "db": "company_employee", "question": "Show names of companies and that of employees in descending order of number of years working for that employee.", "evidence": "", "gold_sql": "SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working", "pred_sql": "SELECT company.Name, people.Name\nFROM employment\nJOIN company ON employment.Company_ID = company.Company_ID\nJOIN people ON employment.People_ID = people.People_ID\nORDER BY employment.Year_working DESC;", "label": "wrong", "unseen": true} {"case_id": "spider_q012_r1", "question_id": "spider/company_employee/4107", "ds": "spider", "db": "company_employee", "question": "Show names of companies and that of employees in descending order of number of years working for that employee.", "evidence": "", "gold_sql": "SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working", "pred_sql": "SELECT company.Name, people.Name\nFROM employment\nJOIN company ON employment.Company_ID = company.Company_ID\nJOIN people ON employment.People_ID = people.People_ID\nORDER BY employment.Year_working DESC;", "label": "wrong", "unseen": true} {"case_id": "spider_q012_r2", "question_id": "spider/company_employee/4107", "ds": "spider", "db": "company_employee", "question": "Show names of companies and that of employees in descending order of number of years working for that employee.", "evidence": "", "gold_sql": "SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working", "pred_sql": "SELECT company.Name, people.Name\nFROM employment\nJOIN company ON employment.Company_ID = company.Company_ID\nJOIN people ON employment.People_ID = people.People_ID\nORDER BY employment.Year_working DESC;", "label": "wrong", "unseen": true} {"case_id": "spider_q012_r3", "question_id": "spider/company_employee/4107", "ds": "spider", "db": "company_employee", "question": "Show names of companies and that of employees in descending order of number of years working for that employee.", "evidence": "", "gold_sql": "SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working", "pred_sql": "SELECT c.Name, p.Name\nFROM company c\nJOIN employment e ON c.Company_ID = e.Company_ID\nJOIN people p ON e.People_ID = p.People_ID\nORDER BY e.Year_working DESC;", "label": "wrong", "unseen": true} {"case_id": "spider_q013_r0", "question_id": "spider/party_people/2058", "ds": "spider", "db": "party_people", "question": "How many members are in each party?", "evidence": "", "gold_sql": "SELECT T2.party_name , count(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id", "pred_sql": "SELECT COUNT(*) , p.Party_name\nFROM party p\nJOIN member m ON m.Party_ID = p.Party_ID\nGROUP BY p.Party_name;", "label": "wrong", "unseen": false} {"case_id": "spider_q013_r1", "question_id": "spider/party_people/2058", "ds": "spider", "db": "party_people", "question": "How many members are in each party?", "evidence": "", "gold_sql": "SELECT T2.party_name , count(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id", "pred_sql": "SELECT COUNT(*) AS member_count, p.Party_ID\nFROM party p\nJOIN member m ON p.Party_ID = m.Party_ID\nGROUP BY p.Party_ID;", "label": "wrong", "unseen": true} {"case_id": "spider_q013_r2", "question_id": "spider/party_people/2058", "ds": "spider", "db": "party_people", "question": "How many members are in each party?", "evidence": "", "gold_sql": "SELECT T2.party_name , count(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id", "pred_sql": "SELECT COUNT(*) AS member_count, p.Party_name\nFROM member m\nJOIN party p ON m.Party_ID = p.Party_ID\nGROUP BY p.Party_ID;", "label": "wrong", "unseen": false} {"case_id": "spider_q013_r3", "question_id": "spider/party_people/2058", "ds": "spider", "db": "party_people", "question": "How many members are in each party?", "evidence": "", "gold_sql": "SELECT T2.party_name , count(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id", "pred_sql": "SELECT p.Party_name, COUNT(*) AS member_count\nFROM party p\nJOIN member m ON p.Party_ID = m.Party_ID\nGROUP BY p.Party_name;", "label": "spurious", "unseen": false} {"case_id": "spider_q014_r0", "question_id": "spider/music_1/3628", "ds": "spider", "db": "music_1", "question": "What are the names of the different artists from Bangladesh who never received a rating higher than a 7?", "evidence": "", "gold_sql": "SELECT DISTINCT artist_name FROM artist WHERE country = \"Bangladesh\" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7", "pred_sql": "SELECT DISTINCT artist.artist_name\nFROM artist\nJOIN song ON artist.artist_name = song.artist_name\nWHERE artist.country = 'Bangladesh'\n AND song.rating <= 7;", "label": "spurious", "unseen": false} {"case_id": "spider_q014_r1", "question_id": "spider/music_1/3628", "ds": "spider", "db": "music_1", "question": "What are the names of the different artists from Bangladesh who never received a rating higher than a 7?", "evidence": "", "gold_sql": "SELECT DISTINCT artist_name FROM artist WHERE country = \"Bangladesh\" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7", "pred_sql": "SELECT DISTINCT a.artist_name\nFROM artist a\nJOIN song s ON a.artist_name = s.artist_name\nWHERE a.country = 'Bangladesh'\n AND s.rating <= 7\nEXCEPT\nSELECT DISTINCT a.artist_name\nFROM artist a\nJOIN song s ON a.artist_name = s.artist_name\nWHERE a.country = 'Bangladesh'\n AND s.rating > 7;", "label": "spurious", "unseen": true} {"case_id": "spider_q014_r2", "question_id": "spider/music_1/3628", "ds": "spider", "db": "music_1", "question": "What are the names of the different artists from Bangladesh who never received a rating higher than a 7?", "evidence": "", "gold_sql": "SELECT DISTINCT artist_name FROM artist WHERE country = \"Bangladesh\" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7", "pred_sql": "SELECT DISTINCT a.artist_name\nFROM artist a\nJOIN song s ON a.artist_name = s.artist_name\nWHERE a.country = 'Bangladesh' AND s.rating <= 7;", "label": "spurious", "unseen": false} {"case_id": "spider_q014_r3", "question_id": "spider/music_1/3628", "ds": "spider", "db": "music_1", "question": "What are the names of the different artists from Bangladesh who never received a rating higher than a 7?", "evidence": "", "gold_sql": "SELECT DISTINCT artist_name FROM artist WHERE country = \"Bangladesh\" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7", "pred_sql": "SELECT DISTINCT a.artist_name\nFROM artist a\nWHERE a.country = 'Bangladesh'\nEXCEPT\nSELECT s.artist_name\nFROM song s\nWHERE s.rating > 7", "label": "correct", "unseen": false} {"case_id": "spider_q015_r0", "question_id": "spider/perpetrator/2307", "ds": "spider", "db": "perpetrator", "question": "What is the location of the perpetrator with the largest kills.", "evidence": "", "gold_sql": "SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1", "pred_sql": "SELECT Location FROM perpetrator ORDER BY Killed DESC LIMIT 1", "label": "correct", "unseen": false} {"case_id": "spider_q015_r1", "question_id": "spider/perpetrator/2307", "ds": "spider", "db": "perpetrator", "question": "What is the location of the perpetrator with the largest kills.", "evidence": "", "gold_sql": "SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1", "pred_sql": "SELECT Location FROM perpetrator ORDER BY Killed DESC LIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q015_r2", "question_id": "spider/perpetrator/2307", "ds": "spider", "db": "perpetrator", "question": "What is the location of the perpetrator with the largest kills.", "evidence": "", "gold_sql": "SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1", "pred_sql": "SELECT Location FROM perpetrator ORDER BY Killed DESC LIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q015_r3", "question_id": "spider/perpetrator/2307", "ds": "spider", "db": "perpetrator", "question": "What is the location of the perpetrator with the largest kills.", "evidence": "", "gold_sql": "SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1", "pred_sql": "SELECT Location FROM perpetrator ORDER BY Killed DESC LIMIT 1", "label": "correct", "unseen": false} {"case_id": "spider_q016_r0", "question_id": "spider/election/2801", "ds": "spider", "db": "election", "question": "Find the committees that have delegates both from from the democratic party and the liberal party.", "evidence": "", "gold_sql": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Democratic\" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Liberal\"", "pred_sql": "SELECT e.Committee\nFROM election e\nJOIN party p ON e.Party = p.Party_ID\nWHERE p.Party = 'Democratic'\nINTERSECT\nSELECT e.Committee\nFROM election e\nJOIN party p ON e.Party = p.Party_ID\nWHERE p.Party = 'Liberal';", "label": "correct", "unseen": false} {"case_id": "spider_q016_r1", "question_id": "spider/election/2801", "ds": "spider", "db": "election", "question": "Find the committees that have delegates both from from the democratic party and the liberal party.", "evidence": "", "gold_sql": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Democratic\" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Liberal\"", "pred_sql": "SELECT DISTINCT e.Committee\nFROM election AS e\nJOIN party AS p ON e.Party = p.Party_ID\nWHERE p.Party = 'Democratic'\nINTERSECT\nSELECT DISTINCT e.Committee\nFROM election AS e\nJOIN party AS p ON e.Party = p.Party_ID\nWHERE p.Party = 'Liberal';", "label": "correct", "unseen": false} {"case_id": "spider_q016_r2", "question_id": "spider/election/2801", "ds": "spider", "db": "election", "question": "Find the committees that have delegates both from from the democratic party and the liberal party.", "evidence": "", "gold_sql": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Democratic\" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Liberal\"", "pred_sql": "SELECT e.Committee\nFROM election e\nJOIN party p ON e.Party = p.Party_ID\nWHERE p.Party = 'Democratic'\nINTERSECT\nSELECT e.Committee\nFROM election e\nJOIN party p ON e.Party = p.Party_ID\nWHERE p.Party = 'Liberal';", "label": "correct", "unseen": false} {"case_id": "spider_q016_r3", "question_id": "spider/election/2801", "ds": "spider", "db": "election", "question": "Find the committees that have delegates both from from the democratic party and the liberal party.", "evidence": "", "gold_sql": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Democratic\" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Liberal\"", "pred_sql": "SELECT e.Committee\nFROM election e\nJOIN party p ON e.Party = p.Party_ID\nWHERE p.Party = 'Democratic'\nINTERSECT\nSELECT e2.Committee\nFROM election e2\nJOIN party p2 ON e2.Party = p2.Party_ID\nWHERE p2.Party = 'Liberal';", "label": "correct", "unseen": false} {"case_id": "spider_q017_r0", "question_id": "spider/manufactory_1/5306", "ds": "spider", "db": "manufactory_1", "question": "Find the total revenue of companies of each founder.", "evidence": "", "gold_sql": "SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder", "pred_sql": "SELECT SUM(Revenue) AS Total_Revenue, Founder FROM Manufacturers GROUP BY Founder;", "label": "correct", "unseen": false} {"case_id": "spider_q017_r1", "question_id": "spider/manufactory_1/5306", "ds": "spider", "db": "manufactory_1", "question": "Find the total revenue of companies of each founder.", "evidence": "", "gold_sql": "SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder", "pred_sql": "SELECT SUM(Revenue) AS TotalRevenue, Founder FROM Manufacturers GROUP BY Founder", "label": "correct", "unseen": false} {"case_id": "spider_q017_r2", "question_id": "spider/manufactory_1/5306", "ds": "spider", "db": "manufactory_1", "question": "Find the total revenue of companies of each founder.", "evidence": "", "gold_sql": "SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder", "pred_sql": "SELECT SUM(Manufacturers.Revenue) AS total_revenue, Manufacturers.Founder\nFROM Manufacturers\nGROUP BY Manufacturers.Founder;", "label": "correct", "unseen": false} {"case_id": "spider_q017_r3", "question_id": "spider/manufactory_1/5306", "ds": "spider", "db": "manufactory_1", "question": "Find the total revenue of companies of each founder.", "evidence": "", "gold_sql": "SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder", "pred_sql": "SELECT SUM(Revenue) AS Total_Revenue, Founder\nFROM Manufacturers\nGROUP BY Founder;", "label": "correct", "unseen": false} {"case_id": "spider_q018_r0", "question_id": "spider/company_office/4561", "ds": "spider", "db": "company_office", "question": "List the name of a building along with the name of a company whose office is in the building.", "evidence": "", "gold_sql": "SELECT T3.name , T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id", "pred_sql": "SELECT buildings.name, Companies.name\nFROM buildings\nJOIN Office_locations ON buildings.id = Office_locations.building_id\nJOIN Companies ON Office_locations.company_id = Companies.id;", "label": "wrong", "unseen": false} {"case_id": "spider_q018_r1", "question_id": "spider/company_office/4561", "ds": "spider", "db": "company_office", "question": "List the name of a building along with the name of a company whose office is in the building.", "evidence": "", "gold_sql": "SELECT T3.name , T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id", "pred_sql": "SELECT buildings.name, Companies.name\nFROM buildings\nJOIN Office_locations ON buildings.id = Office_locations.building_id\nJOIN Companies ON Office_locations.company_id = Companies.id;", "label": "wrong", "unseen": false} {"case_id": "spider_q018_r2", "question_id": "spider/company_office/4561", "ds": "spider", "db": "company_office", "question": "List the name of a building along with the name of a company whose office is in the building.", "evidence": "", "gold_sql": "SELECT T3.name , T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id", "pred_sql": "SELECT buildings.name, Companies.name\nFROM buildings\nJOIN Office_locations ON buildings.id = Office_locations.building_id\nJOIN Companies ON Office_locations.company_id = Companies.id;", "label": "wrong", "unseen": false} {"case_id": "spider_q018_r3", "question_id": "spider/company_office/4561", "ds": "spider", "db": "company_office", "question": "List the name of a building along with the name of a company whose office is in the building.", "evidence": "", "gold_sql": "SELECT T3.name , T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id", "pred_sql": "SELECT b.name, c.name\nFROM buildings b\nJOIN Office_locations ol ON b.id = ol.building_id\nJOIN Companies c ON ol.company_id = c.id;", "label": "wrong", "unseen": false} {"case_id": "spider_q019_r0", "question_id": "spider/assets_maintenance/3137", "ds": "spider", "db": "assets_maintenance", "question": "How many engineer visits are required at most for a single fault log? List the number and the log entry id.", "evidence": "", "gold_sql": "SELECT count(*) , T1.fault_log_entry_id FROM Fault_Log AS T1 JOIN Engineer_Visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT COUNT(*), fault_log_entry_id\nFROM Engineer_Visits\nGROUP BY fault_log_entry_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q019_r1", "question_id": "spider/assets_maintenance/3137", "ds": "spider", "db": "assets_maintenance", "question": "How many engineer visits are required at most for a single fault log? List the number and the log entry id.", "evidence": "", "gold_sql": "SELECT count(*) , T1.fault_log_entry_id FROM Fault_Log AS T1 JOIN Engineer_Visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT COUNT(*) AS visit_count, fault_log_entry_id\nFROM Engineer_Visits\nGROUP BY fault_log_entry_id\nORDER BY visit_count DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q019_r2", "question_id": "spider/assets_maintenance/3137", "ds": "spider", "db": "assets_maintenance", "question": "How many engineer visits are required at most for a single fault log? List the number and the log entry id.", "evidence": "", "gold_sql": "SELECT count(*) , T1.fault_log_entry_id FROM Fault_Log AS T1 JOIN Engineer_Visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT COUNT(*) AS number, fault_log_entry_id FROM Engineer_Visits GROUP BY fault_log_entry_id ORDER BY COUNT(*) DESC LIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q019_r3", "question_id": "spider/assets_maintenance/3137", "ds": "spider", "db": "assets_maintenance", "question": "How many engineer visits are required at most for a single fault log? List the number and the log entry id.", "evidence": "", "gold_sql": "SELECT count(*) , T1.fault_log_entry_id FROM Fault_Log AS T1 JOIN Engineer_Visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT COUNT(*), fault_log_entry_id\nFROM Engineer_Visits\nGROUP BY fault_log_entry_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q020_r0", "question_id": "spider/cre_Drama_Workshop_Groups/5131", "ds": "spider", "db": "cre_Drama_Workshop_Groups", "question": "Find the description and code of the service type that is performed the most times.", "evidence": "", "gold_sql": "SELECT T1.Service_Type_Description , T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "pred_sql": "SELECT rt.Service_Type_Description, rt.Service_Type_Code\nFROM Ref_Service_Types rt\nJOIN Services s ON rt.Service_Type_Code = s.Service_Type_Code\nGROUP BY rt.Service_Type_Code\nORDER BY COUNT(*) DESC\nLIMIT 1", "label": "correct", "unseen": false} {"case_id": "spider_q020_r1", "question_id": "spider/cre_Drama_Workshop_Groups/5131", "ds": "spider", "db": "cre_Drama_Workshop_Groups", "question": "Find the description and code of the service type that is performed the most times.", "evidence": "", "gold_sql": "SELECT T1.Service_Type_Description , T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "pred_sql": "SELECT rt.Service_Type_Description, rt.Service_Type_Code\nFROM Ref_Service_Types rt\nJOIN Services s ON rt.Service_Type_Code = s.Service_Type_Code\nGROUP BY rt.Service_Type_Code\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q020_r2", "question_id": "spider/cre_Drama_Workshop_Groups/5131", "ds": "spider", "db": "cre_Drama_Workshop_Groups", "question": "Find the description and code of the service type that is performed the most times.", "evidence": "", "gold_sql": "SELECT T1.Service_Type_Description , T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "pred_sql": "SELECT R.Service_Type_Description, R.Service_Type_Code\nFROM Ref_Service_Types R\nJOIN Services S ON R.Service_Type_Code = S.Service_Type_Code\nGROUP BY S.Service_Type_Code\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q020_r3", "question_id": "spider/cre_Drama_Workshop_Groups/5131", "ds": "spider", "db": "cre_Drama_Workshop_Groups", "question": "Find the description and code of the service type that is performed the most times.", "evidence": "", "gold_sql": "SELECT T1.Service_Type_Description , T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "pred_sql": "SELECT r.Service_Type_Description, r.Service_Type_Code\nFROM Ref_Service_Types r\nJOIN Services s ON r.Service_Type_Code = s.Service_Type_Code\nGROUP BY r.Service_Type_Code\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q021_r0", "question_id": "spider/university_basketball/983", "ds": "spider", "db": "university_basketball", "question": "Find the founded year of the newest non public school.", "evidence": "", "gold_sql": "SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1", "pred_sql": "SELECT Founded\nFROM university\nWHERE Affiliation != 'Public'\nORDER BY Founded DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q021_r1", "question_id": "spider/university_basketball/983", "ds": "spider", "db": "university_basketball", "question": "Find the founded year of the newest non public school.", "evidence": "", "gold_sql": "SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1", "pred_sql": "SELECT founded FROM university WHERE Affiliation <> 'Public' ORDER BY founded DESC LIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q021_r2", "question_id": "spider/university_basketball/983", "ds": "spider", "db": "university_basketball", "question": "Find the founded year of the newest non public school.", "evidence": "", "gold_sql": "SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1", "pred_sql": "SELECT founded FROM university WHERE affiliation = 'Non-Public' ORDER BY founded DESC LIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q021_r3", "question_id": "spider/university_basketball/983", "ds": "spider", "db": "university_basketball", "question": "Find the founded year of the newest non public school.", "evidence": "", "gold_sql": "SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1", "pred_sql": "SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q022_r0", "question_id": "spider/music_1/3548", "ds": "spider", "db": "music_1", "question": "How many Bangladeshi artists are listed?", "evidence": "", "gold_sql": "SELECT count(*) FROM artist WHERE country = \"Bangladesh\"", "pred_sql": "SELECT COUNT(*) FROM artist WHERE country = 'Bangladesh';", "label": "correct", "unseen": false} {"case_id": "spider_q022_r1", "question_id": "spider/music_1/3548", "ds": "spider", "db": "music_1", "question": "How many Bangladeshi artists are listed?", "evidence": "", "gold_sql": "SELECT count(*) FROM artist WHERE country = \"Bangladesh\"", "pred_sql": "SELECT COUNT(*) FROM artist WHERE country = 'Bangladesh';", "label": "correct", "unseen": false} {"case_id": "spider_q022_r2", "question_id": "spider/music_1/3548", "ds": "spider", "db": "music_1", "question": "How many Bangladeshi artists are listed?", "evidence": "", "gold_sql": "SELECT count(*) FROM artist WHERE country = \"Bangladesh\"", "pred_sql": "SELECT COUNT(*) FROM artist WHERE country = 'Bangladesh';", "label": "correct", "unseen": false} {"case_id": "spider_q022_r3", "question_id": "spider/music_1/3548", "ds": "spider", "db": "music_1", "question": "How many Bangladeshi artists are listed?", "evidence": "", "gold_sql": "SELECT count(*) FROM artist WHERE country = \"Bangladesh\"", "pred_sql": "SELECT COUNT(*) FROM artist WHERE country = 'Bangladesh';", "label": "correct", "unseen": false} {"case_id": "spider_q023_r0", "question_id": "spider/manufacturer/3395", "ds": "spider", "db": "manufacturer", "question": "Which manufacturer has the most number of shops? List its name and year of opening.", "evidence": "", "gold_sql": "SELECT open_year , name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1", "pred_sql": "SELECT Name, Open_Year\nFROM manufacturer\nORDER BY Num_of_Shops DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "spider_q023_r1", "question_id": "spider/manufacturer/3395", "ds": "spider", "db": "manufacturer", "question": "Which manufacturer has the most number of shops? List its name and year of opening.", "evidence": "", "gold_sql": "SELECT open_year , name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1", "pred_sql": "SELECT Name, Open_Year FROM manufacturer ORDER BY Num_of_Shops DESC LIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "spider_q023_r2", "question_id": "spider/manufacturer/3395", "ds": "spider", "db": "manufacturer", "question": "Which manufacturer has the most number of shops? List its name and year of opening.", "evidence": "", "gold_sql": "SELECT open_year , name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1", "pred_sql": "SELECT Name, Open_Year FROM manufacturer ORDER BY Num_of_Shops DESC LIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "spider_q023_r3", "question_id": "spider/manufacturer/3395", "ds": "spider", "db": "manufacturer", "question": "Which manufacturer has the most number of shops? List its name and year of opening.", "evidence": "", "gold_sql": "SELECT open_year , name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1", "pred_sql": "SELECT Name, Open_Year FROM manufacturer ORDER BY Num_of_Shops DESC LIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "spider_q024_r0", "question_id": "spider/voter_2/5494", "ds": "spider", "db": "voter_2", "question": "Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.", "evidence": "", "gold_sql": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = \"PIT\"", "pred_sql": "SELECT DISTINCT s.Fname\nFROM Student s\nJOIN Voting_record vr ON vr.Vice_President_Vote = s.StuID\nWHERE s.city_code <> 'PIT';", "label": "spurious", "unseen": false} {"case_id": "spider_q024_r1", "question_id": "spider/voter_2/5494", "ds": "spider", "db": "voter_2", "question": "Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.", "evidence": "", "gold_sql": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = \"PIT\"", "pred_sql": "SELECT DISTINCT s.Fname\nFROM Student s\nJOIN Voting_record v ON s.StuID = v.Vice_President_Vote\nWHERE s.city_code <> 'PIT';", "label": "spurious", "unseen": false} {"case_id": "spider_q024_r2", "question_id": "spider/voter_2/5494", "ds": "spider", "db": "voter_2", "question": "Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.", "evidence": "", "gold_sql": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = \"PIT\"", "pred_sql": "SELECT DISTINCT s.Fname\nFROM Student s\nJOIN Voting_record v ON v.Vice_President_Vote = s.StuID\nWHERE s.city_code <> 'PIT';", "label": "spurious", "unseen": false} {"case_id": "spider_q024_r3", "question_id": "spider/voter_2/5494", "ds": "spider", "db": "voter_2", "question": "Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.", "evidence": "", "gold_sql": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = \"PIT\"", "pred_sql": "SELECT DISTINCT s.Fname\nFROM Student s\nJOIN Voting_record v ON v.Vice_President_Vote = s.StuID\nWHERE s.city_code <> 'PIT';", "label": "spurious", "unseen": false} {"case_id": "spider_q025_r0", "question_id": "spider/election/2789", "ds": "spider", "db": "election", "question": "Which party has two or more records?", "evidence": "", "gold_sql": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2", "pred_sql": "SELECT p.Party\nFROM party p\nJOIN election e ON p.Party_ID = e.Party\nGROUP BY e.Party\nHAVING COUNT(*) >= 2;", "label": "wrong", "unseen": false} {"case_id": "spider_q025_r1", "question_id": "spider/election/2789", "ds": "spider", "db": "election", "question": "Which party has two or more records?", "evidence": "", "gold_sql": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2", "pred_sql": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2;", "label": "correct", "unseen": false} {"case_id": "spider_q025_r2", "question_id": "spider/election/2789", "ds": "spider", "db": "election", "question": "Which party has two or more records?", "evidence": "", "gold_sql": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2", "pred_sql": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2;", "label": "correct", "unseen": false} {"case_id": "spider_q025_r3", "question_id": "spider/election/2789", "ds": "spider", "db": "election", "question": "Which party has two or more records?", "evidence": "", "gold_sql": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2", "pred_sql": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2;", "label": "correct", "unseen": false} {"case_id": "spider_q026_r0", "question_id": "spider/baseball_1/3648", "ds": "spider", "db": "baseball_1", "question": "Find the first name, last name and id for the top three players won the most player awards.", "evidence": "", "gold_sql": "SELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 3;", "pred_sql": "SELECT p.name_first, p.name_last, p.player_id\nFROM player p\nJOIN player_award pa ON p.player_id = pa.player_id\nGROUP BY p.player_id\nORDER BY COUNT(*) DESC\nLIMIT 3", "label": "correct", "unseen": false} {"case_id": "spider_q026_r1", "question_id": "spider/baseball_1/3648", "ds": "spider", "db": "baseball_1", "question": "Find the first name, last name and id for the top three players won the most player awards.", "evidence": "", "gold_sql": "SELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 3;", "pred_sql": "SELECT p.name_first, p.name_last, p.player_id\nFROM player p\nJOIN player_award pa ON p.player_id = pa.player_id\nGROUP BY p.player_id\nORDER BY COUNT(*) DESC\nLIMIT 3;", "label": "correct", "unseen": false} {"case_id": "spider_q026_r2", "question_id": "spider/baseball_1/3648", "ds": "spider", "db": "baseball_1", "question": "Find the first name, last name and id for the top three players won the most player awards.", "evidence": "", "gold_sql": "SELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 3;", "pred_sql": "SELECT p.name_first, p.name_last, p.player_id\nFROM player p\nJOIN player_award pa ON p.player_id = pa.player_id\nGROUP BY pa.player_id\nORDER BY COUNT(*) DESC\nLIMIT 3;", "label": "spurious", "unseen": false} {"case_id": "spider_q026_r3", "question_id": "spider/baseball_1/3648", "ds": "spider", "db": "baseball_1", "question": "Find the first name, last name and id for the top three players won the most player awards.", "evidence": "", "gold_sql": "SELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 3;", "pred_sql": "SELECT p.name_first, p.name_last, p.player_id\nFROM player p\nJOIN player_award pa ON p.player_id = pa.player_id\nGROUP BY p.player_id\nORDER BY COUNT(*) DESC\nLIMIT 3;", "label": "correct", "unseen": false} {"case_id": "spider_q027_r0", "question_id": "spider/activity_1/6757", "ds": "spider", "db": "activity_1", "question": "Show all the faculty ranks and the number of students advised by each rank.", "evidence": "", "gold_sql": "SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank", "pred_sql": "SELECT F.Rank, COUNT(*) AS num_students\nFROM Faculty F\nJOIN Student S ON S.Advisor = F.FacID\nGROUP BY F.Rank;", "label": "correct", "unseen": false} {"case_id": "spider_q027_r1", "question_id": "spider/activity_1/6757", "ds": "spider", "db": "activity_1", "question": "Show all the faculty ranks and the number of students advised by each rank.", "evidence": "", "gold_sql": "SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank", "pred_sql": "SELECT f.Rank, COUNT(*) AS num_students\nFROM Faculty f\nJOIN Student s ON f.FacID = s.Advisor\nGROUP BY f.Rank;", "label": "correct", "unseen": false} {"case_id": "spider_q027_r2", "question_id": "spider/activity_1/6757", "ds": "spider", "db": "activity_1", "question": "Show all the faculty ranks and the number of students advised by each rank.", "evidence": "", "gold_sql": "SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank", "pred_sql": "SELECT f.Rank, COUNT(*) AS student_count\nFROM Faculty f\nJOIN Student s ON s.Advisor = f.FacID\nGROUP BY f.Rank;", "label": "correct", "unseen": false} {"case_id": "spider_q027_r3", "question_id": "spider/activity_1/6757", "ds": "spider", "db": "activity_1", "question": "Show all the faculty ranks and the number of students advised by each rank.", "evidence": "", "gold_sql": "SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank", "pred_sql": "SELECT f.Rank, COUNT(*) \nFROM Faculty f \nJOIN Student s ON f.FacID = s.Advisor \nGROUP BY f.Rank;", "label": "correct", "unseen": false} {"case_id": "spider_q028_r0", "question_id": "spider/customer_deliveries/2843", "ds": "spider", "db": "customer_deliveries", "question": "Find the name and price of the product that has been ordered the greatest number of times.", "evidence": "", "gold_sql": "SELECT t1.product_name , t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT p.product_name, p.product_price\nFROM Products p\nJOIN Actual_Order_Products aop ON p.product_id = aop.product_id\nGROUP BY p.product_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q028_r1", "question_id": "spider/customer_deliveries/2843", "ds": "spider", "db": "customer_deliveries", "question": "Find the name and price of the product that has been ordered the greatest number of times.", "evidence": "", "gold_sql": "SELECT t1.product_name , t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT p.product_name, p.product_price\nFROM Products AS p\nJOIN Actual_Order_Products AS aop ON p.product_id = aop.product_id\nGROUP BY aop.product_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q028_r2", "question_id": "spider/customer_deliveries/2843", "ds": "spider", "db": "customer_deliveries", "question": "Find the name and price of the product that has been ordered the greatest number of times.", "evidence": "", "gold_sql": "SELECT t1.product_name , t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT p.product_name, p.product_price\nFROM Products p\nJOIN Actual_Order_Products aop ON p.product_id = aop.product_id\nGROUP BY p.product_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q028_r3", "question_id": "spider/customer_deliveries/2843", "ds": "spider", "db": "customer_deliveries", "question": "Find the name and price of the product that has been ordered the greatest number of times.", "evidence": "", "gold_sql": "SELECT t1.product_name , t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT p.product_name, p.product_price\nFROM Products p\nJOIN Actual_Order_Products aop ON p.product_id = aop.product_id\nGROUP BY p.product_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q029_r0", "question_id": "spider/apartment_rentals/1264", "ds": "spider", "db": "apartment_rentals", "question": "Show each apartment type code, and the maximum and minimum number of rooms for each type.", "evidence": "", "gold_sql": "SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code", "pred_sql": "SELECT apt_type_code, MAX(room_count) AS max_room, MIN(room_count) AS min_room\nFROM Apartments\nGROUP BY apt_type_code;", "label": "correct", "unseen": false} {"case_id": "spider_q029_r1", "question_id": "spider/apartment_rentals/1264", "ds": "spider", "db": "apartment_rentals", "question": "Show each apartment type code, and the maximum and minimum number of rooms for each type.", "evidence": "", "gold_sql": "SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code", "pred_sql": "SELECT apt_type_code, MAX(room_count) AS max_rooms, MIN(room_count) AS min_rooms\nFROM Apartments\nGROUP BY apt_type_code;", "label": "correct", "unseen": false} {"case_id": "spider_q029_r2", "question_id": "spider/apartment_rentals/1264", "ds": "spider", "db": "apartment_rentals", "question": "Show each apartment type code, and the maximum and minimum number of rooms for each type.", "evidence": "", "gold_sql": "SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code", "pred_sql": "SELECT apt_type_code, MAX(room_count) AS max_room_count, MIN(room_count) AS min_room_count\nFROM Apartments\nGROUP BY apt_type_code;", "label": "correct", "unseen": false} {"case_id": "spider_q029_r3", "question_id": "spider/apartment_rentals/1264", "ds": "spider", "db": "apartment_rentals", "question": "Show each apartment type code, and the maximum and minimum number of rooms for each type.", "evidence": "", "gold_sql": "SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code", "pred_sql": "SELECT apt_type_code, MAX(room_count) AS max_room, MIN(room_count) AS min_room FROM Apartments GROUP BY apt_type_code;", "label": "correct", "unseen": false} {"case_id": "spider_q030_r0", "question_id": "spider/soccer_2/5017", "ds": "spider", "db": "soccer_2", "question": "Which colleges does each player with a name that starts with the letter D who tried out go to?", "evidence": "", "gold_sql": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'", "pred_sql": "SELECT Tryout.cName\nFROM Player\nJOIN Tryout ON Player.pID = Tryout.pID\nWHERE Player.pName LIKE 'D%';", "label": "correct", "unseen": false} {"case_id": "spider_q030_r1", "question_id": "spider/soccer_2/5017", "ds": "spider", "db": "soccer_2", "question": "Which colleges does each player with a name that starts with the letter D who tried out go to?", "evidence": "", "gold_sql": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'", "pred_sql": "SELECT T.cName\nFROM Tryout AS T\nJOIN Player AS P ON T.pID = P.pID\nJOIN College AS C ON T.cName = C.cName\nWHERE P.pName LIKE 'D%';", "label": "correct", "unseen": false} {"case_id": "spider_q030_r2", "question_id": "spider/soccer_2/5017", "ds": "spider", "db": "soccer_2", "question": "Which colleges does each player with a name that starts with the letter D who tried out go to?", "evidence": "", "gold_sql": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'", "pred_sql": "SELECT Tryout.cName\nFROM Tryout\nJOIN Player ON Tryout.pID = Player.pID\nWHERE Player.pName LIKE 'D%';", "label": "correct", "unseen": false} {"case_id": "spider_q030_r3", "question_id": "spider/soccer_2/5017", "ds": "spider", "db": "soccer_2", "question": "Which colleges does each player with a name that starts with the letter D who tried out go to?", "evidence": "", "gold_sql": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'", "pred_sql": "SELECT DISTINCT Tryout.cName\nFROM Tryout\nJOIN Player ON Tryout.pID = Player.pID\nWHERE Player.pName LIKE 'D%';", "label": "spurious", "unseen": false} {"case_id": "spider_q031_r0", "question_id": "spider/document_management/4525", "ds": "spider", "db": "document_management", "question": "Find names of the document without any images.", "evidence": "", "gold_sql": "SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id", "pred_sql": "SELECT d.document_name\nFROM Documents d\nLEFT JOIN Document_Sections_Images dsi ON dsi.section_id IN (SELECT section_id FROM Document_Sections WHERE document_code = d.document_code)\nWHERE dsi.image_id IS NULL;", "label": "spurious", "unseen": true} {"case_id": "spider_q031_r1", "question_id": "spider/document_management/4525", "ds": "spider", "db": "document_management", "question": "Find names of the document without any images.", "evidence": "", "gold_sql": "SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id", "pred_sql": "SELECT document_name FROM Documents WHERE document_code NOT IN (SELECT document_code FROM Document_Sections_Images);", "label": "wrong", "unseen": true} {"case_id": "spider_q031_r2", "question_id": "spider/document_management/4525", "ds": "spider", "db": "document_management", "question": "Find names of the document without any images.", "evidence": "", "gold_sql": "SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id", "pred_sql": "SELECT document_name\nFROM Documents\nWHERE document_code NOT IN (\n SELECT document_code\n FROM Document_Sections_Images\n);", "label": "wrong", "unseen": true} {"case_id": "spider_q031_r3", "question_id": "spider/document_management/4525", "ds": "spider", "db": "document_management", "question": "Find names of the document without any images.", "evidence": "", "gold_sql": "SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id", "pred_sql": "SELECT d.document_name\nFROM Documents d\nWHERE d.document_code NOT IN (\n SELECT ds.document_code\n FROM Document_Sections_Images ds\n);", "label": "wrong", "unseen": true} {"case_id": "spider_q032_r0", "question_id": "spider/bike_1/166", "ds": "spider", "db": "bike_1", "question": "How many trips did not end in San Francisco?", "evidence": "", "gold_sql": "SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city != \"San Francisco\"", "pred_sql": "SELECT COUNT(*) \nFROM trip \nWHERE end_station_name != 'San Francisco City Hall';", "label": "wrong", "unseen": true} {"case_id": "spider_q032_r1", "question_id": "spider/bike_1/166", "ds": "spider", "db": "bike_1", "question": "How many trips did not end in San Francisco?", "evidence": "", "gold_sql": "SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city != \"San Francisco\"", "pred_sql": "SELECT COUNT(*) FROM trip WHERE end_station_name != 'San Francisco City Hall';", "label": "wrong", "unseen": true} {"case_id": "spider_q032_r2", "question_id": "spider/bike_1/166", "ds": "spider", "db": "bike_1", "question": "How many trips did not end in San Francisco?", "evidence": "", "gold_sql": "SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city != \"San Francisco\"", "pred_sql": "SELECT COUNT(*) FROM trip AS t WHERE t.end_station_name NOT IN (SELECT name FROM station WHERE city = 'San Francisco');", "label": "wrong", "unseen": true} {"case_id": "spider_q032_r3", "question_id": "spider/bike_1/166", "ds": "spider", "db": "bike_1", "question": "How many trips did not end in San Francisco?", "evidence": "", "gold_sql": "SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city != \"San Francisco\"", "pred_sql": "SELECT COUNT(*) FROM trip WHERE end_station_name <> 'San Francisco';", "label": "wrong", "unseen": true} {"case_id": "spider_q033_r0", "question_id": "spider/college_2/1436", "ds": "spider", "db": "college_2", "question": "What is the course title of the prerequisite of course Mobile Computing?", "evidence": "", "gold_sql": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing')", "pred_sql": "SELECT course.title\nFROM course\nJOIN prereq ON course.course_id = prereq.course_id\nWHERE course.title = 'Mobile Computing';", "label": "wrong", "unseen": false} {"case_id": "spider_q033_r1", "question_id": "spider/college_2/1436", "ds": "spider", "db": "college_2", "question": "What is the course title of the prerequisite of course Mobile Computing?", "evidence": "", "gold_sql": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing')", "pred_sql": "SELECT p.title\nFROM course AS c\nJOIN prereq AS pr ON c.course_id = pr.course_id\nJOIN course AS p ON p.course_id = pr.prereq_id\nWHERE c.title = 'Mobile Computing';", "label": "spurious", "unseen": false} {"case_id": "spider_q033_r2", "question_id": "spider/college_2/1436", "ds": "spider", "db": "college_2", "question": "What is the course title of the prerequisite of course Mobile Computing?", "evidence": "", "gold_sql": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing')", "pred_sql": "SELECT pc.title\nFROM course AS c\nJOIN prereq AS p ON c.course_id = p.course_id\nJOIN course AS pc ON p.prereq_id = pc.course_id\nWHERE c.title = 'Mobile Computing';", "label": "spurious", "unseen": false} {"case_id": "spider_q033_r3", "question_id": "spider/college_2/1436", "ds": "spider", "db": "college_2", "question": "What is the course title of the prerequisite of course Mobile Computing?", "evidence": "", "gold_sql": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing')", "pred_sql": "SELECT c.title\nFROM course AS c\nJOIN prereq AS pr ON c.course_id = pr.course_id\nWHERE c.title = 'Mobile Computing';", "label": "wrong", "unseen": false} {"case_id": "spider_q034_r0", "question_id": "spider/apartment_rentals/1259", "ds": "spider", "db": "apartment_rentals", "question": "Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms.", "evidence": "", "gold_sql": "SELECT apt_type_code , bathroom_count , bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1", "pred_sql": "SELECT apt_type_code, bathroom_count, bedroom_count\nFROM Apartments\nGROUP BY apt_type_code\nORDER BY SUM(room_count) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q034_r1", "question_id": "spider/apartment_rentals/1259", "ds": "spider", "db": "apartment_rentals", "question": "Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms.", "evidence": "", "gold_sql": "SELECT apt_type_code , bathroom_count , bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1", "pred_sql": "SELECT apt_type_code, bathroom_count, bedroom_count\nFROM Apartments\nORDER BY room_count DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q034_r2", "question_id": "spider/apartment_rentals/1259", "ds": "spider", "db": "apartment_rentals", "question": "Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms.", "evidence": "", "gold_sql": "SELECT apt_type_code , bathroom_count , bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1", "pred_sql": "SELECT apt_type_code, bathroom_count, bedroom_count\nFROM Apartments\nGROUP BY apt_type_code\nORDER BY SUM(CAST(room_count AS INTEGER)) DESC\nLIMIT 1;", "label": "spurious", "unseen": true} {"case_id": "spider_q034_r3", "question_id": "spider/apartment_rentals/1259", "ds": "spider", "db": "apartment_rentals", "question": "Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms.", "evidence": "", "gold_sql": "SELECT apt_type_code , bathroom_count , bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1", "pred_sql": "SELECT apt_type_code, bathroom_count, bedroom_count\nFROM Apartments\nGROUP BY apt_type_code\nORDER BY SUM(room_count) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q035_r0", "question_id": "spider/customers_and_invoices/1579", "ds": "spider", "db": "customers_and_invoices", "question": "How many transaction does each account have? Show the number and account id.", "evidence": "", "gold_sql": "SELECT count(*) , account_id FROM Financial_transactions", "pred_sql": "SELECT COUNT(*) AS transaction_count, account_id\nFROM Financial_transactions\nGROUP BY account_id;", "label": "wrong", "unseen": false} {"case_id": "spider_q035_r1", "question_id": "spider/customers_and_invoices/1579", "ds": "spider", "db": "customers_and_invoices", "question": "How many transaction does each account have? Show the number and account id.", "evidence": "", "gold_sql": "SELECT count(*) , account_id FROM Financial_transactions", "pred_sql": "SELECT account_id, COUNT(*) AS transaction_count\nFROM Financial_Transactions\nGROUP BY account_id;", "label": "wrong", "unseen": false} {"case_id": "spider_q035_r2", "question_id": "spider/customers_and_invoices/1579", "ds": "spider", "db": "customers_and_invoices", "question": "How many transaction does each account have? Show the number and account id.", "evidence": "", "gold_sql": "SELECT count(*) , account_id FROM Financial_transactions", "pred_sql": "SELECT COUNT(*) AS transaction_count, account_id\nFROM Financial_Transactions\nGROUP BY account_id;", "label": "wrong", "unseen": false} {"case_id": "spider_q035_r3", "question_id": "spider/customers_and_invoices/1579", "ds": "spider", "db": "customers_and_invoices", "question": "How many transaction does each account have? Show the number and account id.", "evidence": "", "gold_sql": "SELECT count(*) , account_id FROM Financial_transactions", "pred_sql": "SELECT account_id, COUNT(*) AS transaction_count\nFROM Financial_Transactions\nGROUP BY account_id;", "label": "wrong", "unseen": false} {"case_id": "spider_q036_r0", "question_id": "spider/allergy_1/452", "ds": "spider", "db": "allergy_1", "question": "How many animal type allergies exist?", "evidence": "", "gold_sql": "SELECT count(*) FROM Allergy_type WHERE allergytype = \"animal\"", "pred_sql": "SELECT COUNT(*) FROM Allergy_Type WHERE AllergyType = 'animal';", "label": "correct", "unseen": false} {"case_id": "spider_q036_r1", "question_id": "spider/allergy_1/452", "ds": "spider", "db": "allergy_1", "question": "How many animal type allergies exist?", "evidence": "", "gold_sql": "SELECT count(*) FROM Allergy_type WHERE allergytype = \"animal\"", "pred_sql": "SELECT COUNT(*) FROM Allergy_Type WHERE AllergyType = 'animal';", "label": "correct", "unseen": false} {"case_id": "spider_q036_r2", "question_id": "spider/allergy_1/452", "ds": "spider", "db": "allergy_1", "question": "How many animal type allergies exist?", "evidence": "", "gold_sql": "SELECT count(*) FROM Allergy_type WHERE allergytype = \"animal\"", "pred_sql": "SELECT COUNT(*) FROM Allergy_Type WHERE AllergyType = 'animal';", "label": "correct", "unseen": false} {"case_id": "spider_q036_r3", "question_id": "spider/allergy_1/452", "ds": "spider", "db": "allergy_1", "question": "How many animal type allergies exist?", "evidence": "", "gold_sql": "SELECT count(*) FROM Allergy_type WHERE allergytype = \"animal\"", "pred_sql": "SELECT COUNT(*) FROM Allergy_Type WHERE AllergyType = 'animal';", "label": "correct", "unseen": false} {"case_id": "spider_q037_r0", "question_id": "spider/epinions_1/1706", "ds": "spider", "db": "epinions_1", "question": "Find the name of the user who gives the most reviews.", "evidence": "", "gold_sql": "SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT ua.name\nFROM useracct AS ua\nJOIN review AS r ON ua.u_id = r.u_id\nGROUP BY ua.u_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q037_r1", "question_id": "spider/epinions_1/1706", "ds": "spider", "db": "epinions_1", "question": "Find the name of the user who gives the most reviews.", "evidence": "", "gold_sql": "SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT ua.name\nFROM useracct AS ua\nJOIN review AS r ON ua.u_id = r.u_id\nGROUP BY ua.u_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q037_r2", "question_id": "spider/epinions_1/1706", "ds": "spider", "db": "epinions_1", "question": "Find the name of the user who gives the most reviews.", "evidence": "", "gold_sql": "SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT ua.name\nFROM useracct ua\nJOIN review r ON ua.u_id = r.u_id\nGROUP BY ua.u_id\nORDER BY COUNT(r.i_id) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q037_r3", "question_id": "spider/epinions_1/1706", "ds": "spider", "db": "epinions_1", "question": "Find the name of the user who gives the most reviews.", "evidence": "", "gold_sql": "SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT ua.name\nFROM useracct ua\nJOIN review rv ON ua.u_id = rv.u_id\nGROUP BY rv.u_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q038_r0", "question_id": "spider/tracking_software_problems/5378", "ds": "spider", "db": "tracking_software_problems", "question": "For each product that has problems, find the number of problems reported after 1986-11-13 and the product id?", "evidence": "", "gold_sql": "SELECT count(*) , T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > \"1986-11-13\" GROUP BY T2.product_id", "pred_sql": "SELECT product_id, COUNT(*) FROM Problems WHERE date_problem_reported > '1986-11-13' GROUP BY product_id", "label": "wrong", "unseen": false} {"case_id": "spider_q038_r1", "question_id": "spider/tracking_software_problems/5378", "ds": "spider", "db": "tracking_software_problems", "question": "For each product that has problems, find the number of problems reported after 1986-11-13 and the product id?", "evidence": "", "gold_sql": "SELECT count(*) , T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > \"1986-11-13\" GROUP BY T2.product_id", "pred_sql": "SELECT COUNT(*) AS problem_count, p.product_id\nFROM Problems p\nJOIN Product product ON p.product_id = product.product_id\nWHERE p.date_problem_reported > '1986-11-13'\nGROUP BY p.product_id;", "label": "correct", "unseen": false} {"case_id": "spider_q038_r2", "question_id": "spider/tracking_software_problems/5378", "ds": "spider", "db": "tracking_software_problems", "question": "For each product that has problems, find the number of problems reported after 1986-11-13 and the product id?", "evidence": "", "gold_sql": "SELECT count(*) , T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > \"1986-11-13\" GROUP BY T2.product_id", "pred_sql": "SELECT p.product_id, COUNT(*) AS problem_count\nFROM Problems p\nWHERE p.date_problem_reported > '1986-11-13'\nGROUP BY p.product_id;", "label": "wrong", "unseen": false} {"case_id": "spider_q038_r3", "question_id": "spider/tracking_software_problems/5378", "ds": "spider", "db": "tracking_software_problems", "question": "For each product that has problems, find the number of problems reported after 1986-11-13 and the product id?", "evidence": "", "gold_sql": "SELECT count(*) , T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > \"1986-11-13\" GROUP BY T2.product_id", "pred_sql": "SELECT COUNT(*), p.product_id\nFROM Problems p\nJOIN Product pr ON p.product_id = pr.product_id\nWHERE p.date_problem_reported > '1986-11-13'\nGROUP BY pr.product_id;", "label": "correct", "unseen": false} {"case_id": "spider_q039_r0", "question_id": "spider/hr_1/3438", "ds": "spider", "db": "hr_1", "question": "What is all the information about employees with D or S in their first name, ordered by salary descending?", "evidence": "", "gold_sql": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC", "pred_sql": "SELECT * FROM employees WHERE FIRST_NAME LIKE 'D%' OR FIRST_NAME LIKE 'S%' ORDER BY SALARY DESC;", "label": "spurious", "unseen": true} {"case_id": "spider_q039_r1", "question_id": "spider/hr_1/3438", "ds": "spider", "db": "hr_1", "question": "What is all the information about employees with D or S in their first name, ordered by salary descending?", "evidence": "", "gold_sql": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC", "pred_sql": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC;", "label": "correct", "unseen": false} {"case_id": "spider_q039_r2", "question_id": "spider/hr_1/3438", "ds": "spider", "db": "hr_1", "question": "What is all the information about employees with D or S in their first name, ordered by salary descending?", "evidence": "", "gold_sql": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC", "pred_sql": "SELECT * FROM employees WHERE first_name LIKE 'D%' OR first_name LIKE 'S%' ORDER BY salary DESC;", "label": "spurious", "unseen": true} {"case_id": "spider_q039_r3", "question_id": "spider/hr_1/3438", "ds": "spider", "db": "hr_1", "question": "What is all the information about employees with D or S in their first name, ordered by salary descending?", "evidence": "", "gold_sql": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC", "pred_sql": "SELECT * FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SALARY DESC;", "label": "correct", "unseen": false} {"case_id": "spider_q040_r0", "question_id": "spider/baseball_1/3683", "ds": "spider", "db": "baseball_1", "question": "What were all the salary values of players in 2010 and 2001?", "evidence": "", "gold_sql": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001", "pred_sql": "SELECT salary.salary\nFROM salary\nWHERE salary.year IN (2010, 2001);", "label": "wrong", "unseen": false} {"case_id": "spider_q040_r1", "question_id": "spider/baseball_1/3683", "ds": "spider", "db": "baseball_1", "question": "What were all the salary values of players in 2010 and 2001?", "evidence": "", "gold_sql": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001", "pred_sql": "SELECT salary FROM salary WHERE year IN (2010, 2001);", "label": "wrong", "unseen": false} {"case_id": "spider_q040_r2", "question_id": "spider/baseball_1/3683", "ds": "spider", "db": "baseball_1", "question": "What were all the salary values of players in 2010 and 2001?", "evidence": "", "gold_sql": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001", "pred_sql": "SELECT salary FROM salary WHERE year IN (2010, 2001);", "label": "wrong", "unseen": false} {"case_id": "spider_q040_r3", "question_id": "spider/baseball_1/3683", "ds": "spider", "db": "baseball_1", "question": "What were all the salary values of players in 2010 and 2001?", "evidence": "", "gold_sql": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001", "pred_sql": "SELECT salary\nFROM salary\nWHERE year IN (2010, 2001);", "label": "wrong", "unseen": false} {"case_id": "spider_q041_r0", "question_id": "spider/baseball_1/3702", "ds": "spider", "db": "baseball_1", "question": "Find the team that attended the least number of home games in 1980.", "evidence": "", "gold_sql": "SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;", "pred_sql": "SELECT t.name\nFROM team t\nJOIN home_game h ON t.team_id = h.team_id\nWHERE h.year = 1980\nORDER BY h.games ASC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q041_r1", "question_id": "spider/baseball_1/3702", "ds": "spider", "db": "baseball_1", "question": "Find the team that attended the least number of home games in 1980.", "evidence": "", "gold_sql": "SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;", "pred_sql": "SELECT t.name\nFROM team t\nJOIN home_game hg ON t.team_id = hg.team_id\nWHERE hg.year = 1980\nGROUP BY t.team_id\nORDER BY SUM(hg.games) ASC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q041_r2", "question_id": "spider/baseball_1/3702", "ds": "spider", "db": "baseball_1", "question": "Find the team that attended the least number of home games in 1980.", "evidence": "", "gold_sql": "SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;", "pred_sql": "SELECT t.team_id FROM team t JOIN home_game h ON t.team_id = h.team_id WHERE h.year = 1980 ORDER BY h.games ASC LIMIT 1", "label": "wrong", "unseen": true} {"case_id": "spider_q041_r3", "question_id": "spider/baseball_1/3702", "ds": "spider", "db": "baseball_1", "question": "Find the team that attended the least number of home games in 1980.", "evidence": "", "gold_sql": "SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;", "pred_sql": "SELECT t.name\nFROM team t\nJOIN home_game h ON t.team_id = h.team_id\nWHERE h.year = 1980\nORDER BY h.games ASC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q042_r0", "question_id": "spider/insurance_fnol/929", "ds": "spider", "db": "insurance_fnol", "question": "List all the customers in increasing order of IDs.", "evidence": "", "gold_sql": "SELECT customer_id , customer_name FROM customers ORDER BY customer_id ASC", "pred_sql": "SELECT Customer_name\nFROM Customers\nORDER BY Customer_ID ASC;", "label": "wrong", "unseen": false} {"case_id": "spider_q042_r1", "question_id": "spider/insurance_fnol/929", "ds": "spider", "db": "insurance_fnol", "question": "List all the customers in increasing order of IDs.", "evidence": "", "gold_sql": "SELECT customer_id , customer_name FROM customers ORDER BY customer_id ASC", "pred_sql": "SELECT Customer_name FROM Customers ORDER BY Customer_ID ASC;", "label": "wrong", "unseen": false} {"case_id": "spider_q042_r2", "question_id": "spider/insurance_fnol/929", "ds": "spider", "db": "insurance_fnol", "question": "List all the customers in increasing order of IDs.", "evidence": "", "gold_sql": "SELECT customer_id , customer_name FROM customers ORDER BY customer_id ASC", "pred_sql": "SELECT Customer_name FROM Customers ORDER BY Customer_ID ASC;", "label": "wrong", "unseen": false} {"case_id": "spider_q042_r3", "question_id": "spider/insurance_fnol/929", "ds": "spider", "db": "insurance_fnol", "question": "List all the customers in increasing order of IDs.", "evidence": "", "gold_sql": "SELECT customer_id , customer_name FROM customers ORDER BY customer_id ASC", "pred_sql": "SELECT Customer_name FROM Customers ORDER BY Customer_ID ASC;", "label": "wrong", "unseen": false} {"case_id": "spider_q043_r0", "question_id": "spider/college_2/1401", "ds": "spider", "db": "college_2", "question": "What is the lowest salary in departments with average salary greater than the overall average.", "evidence": "", "gold_sql": "SELECT min(salary) , dept_name FROM instructor GROUP BY dept_name HAVING avg(salary) > (SELECT avg(salary) FROM instructor)", "pred_sql": "SELECT MIN(i.salary)\nFROM instructor i\nWHERE i.salary > (\n SELECT AVG(salary)\n FROM instructor\n);", "label": "wrong", "unseen": true} {"case_id": "spider_q043_r1", "question_id": "spider/college_2/1401", "ds": "spider", "db": "college_2", "question": "What is the lowest salary in departments with average salary greater than the overall average.", "evidence": "", "gold_sql": "SELECT min(salary) , dept_name FROM instructor GROUP BY dept_name HAVING avg(salary) > (SELECT avg(salary) FROM instructor)", "pred_sql": "SELECT MIN(i.salary)\nFROM instructor i\nWHERE i.dept_name IN (\n SELECT i2.dept_name\n FROM instructor i2\n GROUP BY i2.dept_name\n HAVING AVG(i2.salary) > (SELECT AVG(salary) FROM instructor)\n);", "label": "wrong", "unseen": true} {"case_id": "spider_q043_r2", "question_id": "spider/college_2/1401", "ds": "spider", "db": "college_2", "question": "What is the lowest salary in departments with average salary greater than the overall average.", "evidence": "", "gold_sql": "SELECT min(salary) , dept_name FROM instructor GROUP BY dept_name HAVING avg(salary) > (SELECT avg(salary) FROM instructor)", "pred_sql": "SELECT MIN(i.salary) FROM instructor i WHERE i.dept_name IN (\n SELECT dept_name\n FROM instructor\n GROUP BY dept_name\n HAVING AVG(salary) > (\n SELECT AVG(salary) FROM instructor\n )\n);", "label": "wrong", "unseen": true} {"case_id": "spider_q043_r3", "question_id": "spider/college_2/1401", "ds": "spider", "db": "college_2", "question": "What is the lowest salary in departments with average salary greater than the overall average.", "evidence": "", "gold_sql": "SELECT min(salary) , dept_name FROM instructor GROUP BY dept_name HAVING avg(salary) > (SELECT avg(salary) FROM instructor)", "pred_sql": "SELECT MIN(i.salary)\nFROM instructor i\nWHERE i.dept_name IN (\n SELECT d.dept_name\n FROM instructor i\n JOIN department d ON i.dept_name = d.dept_name\n GROUP BY d.dept_name\n HAVING AVG(i.salary) > (\n SELECT AVG(salary)\n FROM instructor\n )\n);", "label": "wrong", "unseen": true} {"case_id": "spider_q044_r0", "question_id": "spider/machine_repair/2243", "ds": "spider", "db": "machine_repair", "question": "What is the starting year of the oldest technicians?", "evidence": "", "gold_sql": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1", "pred_sql": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q044_r1", "question_id": "spider/machine_repair/2243", "ds": "spider", "db": "machine_repair", "question": "What is the starting year of the oldest technicians?", "evidence": "", "gold_sql": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1", "pred_sql": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q044_r2", "question_id": "spider/machine_repair/2243", "ds": "spider", "db": "machine_repair", "question": "What is the starting year of the oldest technicians?", "evidence": "", "gold_sql": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1", "pred_sql": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q044_r3", "question_id": "spider/machine_repair/2243", "ds": "spider", "db": "machine_repair", "question": "What is the starting year of the oldest technicians?", "evidence": "", "gold_sql": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1", "pred_sql": "SELECT Starting_Year FROM technician WHERE Age = (SELECT MAX(Age) FROM technician);", "label": "spurious", "unseen": false} {"case_id": "spider_q045_r0", "question_id": "spider/college_1/3178", "ds": "spider", "db": "college_1", "question": "What are the first and last name of all biology professors?", "evidence": "", "gold_sql": "SELECT T3.EMP_FNAME , T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = \"Biology\"", "pred_sql": "SELECT e.emp_fname, e.emp_lname\nFROM PROFESSOR p\nJOIN EMPLOYEE e ON p.EMP_NUM = e.EMP_NUM\nJOIN DEPARTMENT d ON p.DEPT_CODE = d.DEPT_CODE\nWHERE d.DEPT_NAME = 'Biology';", "label": "correct", "unseen": false} {"case_id": "spider_q045_r1", "question_id": "spider/college_1/3178", "ds": "spider", "db": "college_1", "question": "What are the first and last name of all biology professors?", "evidence": "", "gold_sql": "SELECT T3.EMP_FNAME , T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = \"Biology\"", "pred_sql": "SELECT e.EMP_FNAME, e.EMP_LNAME\nFROM PROFESSOR p\nJOIN EMPLOYEE e ON p.EMP_NUM = e.EMP_NUM\nJOIN DEPARTMENT d ON p.DEPT_CODE = d.DEPT_CODE\nWHERE d.DEPT_NAME = 'Biology';", "label": "correct", "unseen": false} {"case_id": "spider_q045_r2", "question_id": "spider/college_1/3178", "ds": "spider", "db": "college_1", "question": "What are the first and last name of all biology professors?", "evidence": "", "gold_sql": "SELECT T3.EMP_FNAME , T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = \"Biology\"", "pred_sql": "SELECT e.EMP_FNAME, e.EMP_LNAME\nFROM EMPLOYEE e\nJOIN PROFESSOR p ON e.EMP_NUM = p.EMP_NUM\nJOIN DEPARTMENT d ON p.DEPT_CODE = d.DEPT_CODE\nWHERE d.DEPT_NAME = 'Biology';", "label": "correct", "unseen": false} {"case_id": "spider_q045_r3", "question_id": "spider/college_1/3178", "ds": "spider", "db": "college_1", "question": "What are the first and last name of all biology professors?", "evidence": "", "gold_sql": "SELECT T3.EMP_FNAME , T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = \"Biology\"", "pred_sql": "SELECT e.EMP_FNAME, e.EMP_LNAME\nFROM EMPLOYEE e\nJOIN PROFESSOR p ON e.EMP_NUM = p.EMP_NUM\nJOIN DEPARTMENT d ON p.DEPT_CODE = d.DEPT_CODE\nWHERE d.DEPT_NAME = 'Biology';", "label": "correct", "unseen": false} {"case_id": "spider_q046_r0", "question_id": "spider/county_public_safety/2566", "ds": "spider", "db": "county_public_safety", "question": "Show the police force shared by counties with location on the east and west.", "evidence": "", "gold_sql": "SELECT Police_force FROM county_public_safety WHERE LOCATION = \"East\" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = \"West\"", "pred_sql": "SELECT police_force FROM county_public_safety WHERE location = 'East' INTERSECT SELECT police_force FROM county_public_safety WHERE location = 'West';", "label": "correct", "unseen": false} {"case_id": "spider_q046_r1", "question_id": "spider/county_public_safety/2566", "ds": "spider", "db": "county_public_safety", "question": "Show the police force shared by counties with location on the east and west.", "evidence": "", "gold_sql": "SELECT Police_force FROM county_public_safety WHERE LOCATION = \"East\" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = \"West\"", "pred_sql": "SELECT Police_force FROM county_public_safety WHERE LOCATION = 'East' INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = 'West';", "label": "correct", "unseen": false} {"case_id": "spider_q046_r2", "question_id": "spider/county_public_safety/2566", "ds": "spider", "db": "county_public_safety", "question": "Show the police force shared by counties with location on the east and west.", "evidence": "", "gold_sql": "SELECT Police_force FROM county_public_safety WHERE LOCATION = \"East\" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = \"West\"", "pred_sql": "SELECT Police_force FROM county_public_safety WHERE Location = 'East' INTERSECT SELECT Police_force FROM county_public_safety WHERE Location = 'West';", "label": "correct", "unseen": false} {"case_id": "spider_q046_r3", "question_id": "spider/county_public_safety/2566", "ds": "spider", "db": "county_public_safety", "question": "Show the police force shared by counties with location on the east and west.", "evidence": "", "gold_sql": "SELECT Police_force FROM county_public_safety WHERE LOCATION = \"East\" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = \"West\"", "pred_sql": "SELECT Police_force\nFROM county_public_safety\nWHERE Location IN ('East', 'West');", "label": "wrong", "unseen": false} {"case_id": "spider_q047_r0", "question_id": "spider/behavior_monitoring/3109", "ds": "spider", "db": "behavior_monitoring", "question": "Find the id and city of the student address with the highest average monthly rental.", "evidence": "", "gold_sql": "SELECT T2.address_id , T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1", "pred_sql": "SELECT a.address_id, a.city\nFROM Student_Addresses sa\nJOIN Addresses a ON sa.address_id = a.address_id\nGROUP BY sa.address_id\nORDER BY AVG(sa.monthly_rental) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q047_r1", "question_id": "spider/behavior_monitoring/3109", "ds": "spider", "db": "behavior_monitoring", "question": "Find the id and city of the student address with the highest average monthly rental.", "evidence": "", "gold_sql": "SELECT T2.address_id , T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1", "pred_sql": "SELECT a.address_id, a.city\nFROM Student_Addresses sa\nJOIN Addresses a ON sa.address_id = a.address_id\nGROUP BY sa.address_id\nORDER BY AVG(sa.monthly_rental) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q047_r2", "question_id": "spider/behavior_monitoring/3109", "ds": "spider", "db": "behavior_monitoring", "question": "Find the id and city of the student address with the highest average monthly rental.", "evidence": "", "gold_sql": "SELECT T2.address_id , T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1", "pred_sql": "SELECT sa.address_id, a.city\nFROM Student_Addresses sa\nJOIN Addresses a ON sa.address_id = a.address_id\nGROUP BY sa.address_id\nORDER BY AVG(sa.monthly_rental) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q047_r3", "question_id": "spider/behavior_monitoring/3109", "ds": "spider", "db": "behavior_monitoring", "question": "Find the id and city of the student address with the highest average monthly rental.", "evidence": "", "gold_sql": "SELECT T2.address_id , T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1", "pred_sql": "SELECT sa.address_id, a.city\nFROM Student_Addresses sa\nJOIN Addresses a ON sa.address_id = a.address_id\nGROUP BY sa.address_id\nORDER BY AVG(sa.monthly_rental) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q048_r0", "question_id": "spider/csu_1/2360", "ds": "spider", "db": "csu_1", "question": "Find the names of the campus which has more faculties in 2002 than every campus in Orange county.", "evidence": "", "gold_sql": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = \"Orange\")", "pred_sql": "SELECT c.Campus\nFROM faculty f\nJOIN campuses c ON f.Campus = c.Id\nWHERE f.Year = 2002\n AND c.County = 'Orange'\nORDER BY f.Faculty DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "spider_q048_r1", "question_id": "spider/csu_1/2360", "ds": "spider", "db": "csu_1", "question": "Find the names of the campus which has more faculties in 2002 than every campus in Orange county.", "evidence": "", "gold_sql": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = \"Orange\")", "pred_sql": "SELECT c.Campus\nFROM Campuses c\nJOIN faculty f ON f.Campus = c.Id\nWHERE f.Year = 2002\nGROUP BY f.Campus\nHAVING COUNT(*) >\n (SELECT COUNT(*)\n FROM faculty\n WHERE Campus IN (\n SELECT Id\n FROM Campuses\n WHERE County = 'Orange'\n ));", "label": "wrong", "unseen": true} {"case_id": "spider_q048_r2", "question_id": "spider/csu_1/2360", "ds": "spider", "db": "csu_1", "question": "Find the names of the campus which has more faculties in 2002 than every campus in Orange county.", "evidence": "", "gold_sql": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = \"Orange\")", "pred_sql": "SELECT c.Campus\nFROM Campuses c\nJOIN faculty f ON c.Id = f.Campus\nWHERE f.Year = 2002\n AND c.County = 'Orange'\nGROUP BY c.Campus\nORDER BY SUM(f.Faculty) DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "spider_q048_r3", "question_id": "spider/csu_1/2360", "ds": "spider", "db": "csu_1", "question": "Find the names of the campus which has more faculties in 2002 than every campus in Orange county.", "evidence": "", "gold_sql": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = \"Orange\")", "pred_sql": "SELECT c.Campus\nFROM Campuses c\nJOIN faculty f ON f.Campus = c.Id\nWHERE f.Year = 2002\n AND f.Faculty > (\n SELECT MAX(f2.Faculty)\n FROM faculty f2\n JOIN Campuses c2 ON f2.Campus = c2.Id\n WHERE c2.County = 'Orange' AND f2.Year = 2002\n );", "label": "correct", "unseen": false} {"case_id": "spider_q049_r0", "question_id": "spider/farm/37", "ds": "spider", "db": "farm", "question": "What are the official names of cities that have hosted more than one competition?", "evidence": "", "gold_sql": "SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1", "pred_sql": "SELECT city.Official_Name\nFROM city\nJOIN farm_competition ON city.City_ID = farm_competition.Host_city_ID\nGROUP BY city.City_ID\nHAVING COUNT(*) > 1;", "label": "correct", "unseen": false} {"case_id": "spider_q049_r1", "question_id": "spider/farm/37", "ds": "spider", "db": "farm", "question": "What are the official names of cities that have hosted more than one competition?", "evidence": "", "gold_sql": "SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1", "pred_sql": "SELECT city.Official_Name\nFROM city\nJOIN farm_competition ON city.City_ID = farm_competition.Host_city_ID\nGROUP BY city.City_ID\nHAVING COUNT(*) > 1;", "label": "correct", "unseen": false} {"case_id": "spider_q049_r2", "question_id": "spider/farm/37", "ds": "spider", "db": "farm", "question": "What are the official names of cities that have hosted more than one competition?", "evidence": "", "gold_sql": "SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1", "pred_sql": "SELECT c.Official_Name FROM city c JOIN farm_competition fc ON c.City_ID = fc.Host_city_ID GROUP BY c.City_ID HAVING COUNT(*) > 1", "label": "correct", "unseen": false} {"case_id": "spider_q049_r3", "question_id": "spider/farm/37", "ds": "spider", "db": "farm", "question": "What are the official names of cities that have hosted more than one competition?", "evidence": "", "gold_sql": "SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1", "pred_sql": "SELECT c.Official_Name\nFROM city c\nJOIN farm_competition fc ON c.City_ID = fc.Host_city_ID\nGROUP BY c.City_ID\nHAVING COUNT(*) > 1;", "label": "correct", "unseen": false} {"case_id": "spider_q050_r0", "question_id": "spider/university_basketball/985", "ds": "spider", "db": "university_basketball", "question": "How many schools are in the basketball match?", "evidence": "", "gold_sql": "SELECT count(DISTINCT school_id) FROM basketball_match", "pred_sql": "SELECT COUNT(DISTINCT School_ID) FROM basketball_match;", "label": "correct", "unseen": false} {"case_id": "spider_q050_r1", "question_id": "spider/university_basketball/985", "ds": "spider", "db": "university_basketball", "question": "How many schools are in the basketball match?", "evidence": "", "gold_sql": "SELECT count(DISTINCT school_id) FROM basketball_match", "pred_sql": "SELECT COUNT(DISTINCT School_ID) FROM basketball_match;", "label": "correct", "unseen": false} {"case_id": "spider_q050_r2", "question_id": "spider/university_basketball/985", "ds": "spider", "db": "university_basketball", "question": "How many schools are in the basketball match?", "evidence": "", "gold_sql": "SELECT count(DISTINCT school_id) FROM basketball_match", "pred_sql": "SELECT COUNT(*) FROM basketball_match;", "label": "spurious", "unseen": false} {"case_id": "spider_q050_r3", "question_id": "spider/university_basketball/985", "ds": "spider", "db": "university_basketball", "question": "How many schools are in the basketball match?", "evidence": "", "gold_sql": "SELECT count(DISTINCT school_id) FROM basketball_match", "pred_sql": "SELECT COUNT(DISTINCT School_ID) FROM basketball_match;", "label": "correct", "unseen": false} {"case_id": "spider_q051_r0", "question_id": "spider/imdb/8514", "ds": "spider", "db": "imdb", "question": "How many movies about Persians were released after 1990 ?", "evidence": "", "gold_sql": "SELECT COUNT ( DISTINCT t3.title ) FROM tags AS t2 JOIN keyword AS t1 ON t2.kid = t1.id JOIN movie AS t3 ON t2.msid = t3.mid WHERE t1.keyword = \"Persians\" AND t3.release_year > 1990;", "pred_sql": "SELECT COUNT(*) FROM movie m JOIN classification c ON m.mid = c.msid JOIN genre g ON c.gid = g.gid WHERE m.release_year > 1990 AND g.genre = 'Persians';", "label": "spurious", "unseen": true} {"case_id": "spider_q051_r1", "question_id": "spider/imdb/8514", "ds": "spider", "db": "imdb", "question": "How many movies about Persians were released after 1990 ?", "evidence": "", "gold_sql": "SELECT COUNT ( DISTINCT t3.title ) FROM tags AS t2 JOIN keyword AS t1 ON t2.kid = t1.id JOIN movie AS t3 ON t2.msid = t3.mid WHERE t1.keyword = \"Persians\" AND t3.release_year > 1990;", "pred_sql": "SELECT COUNT(*) FROM movie AS m JOIN classification AS c ON m.mid = c.msid JOIN genre AS g ON c.gid = g.gid WHERE g.genre = 'Persians' AND m.release_year > 1990;", "label": "spurious", "unseen": true} {"case_id": "spider_q051_r2", "question_id": "spider/imdb/8514", "ds": "spider", "db": "imdb", "question": "How many movies about Persians were released after 1990 ?", "evidence": "", "gold_sql": "SELECT COUNT ( DISTINCT t3.title ) FROM tags AS t2 JOIN keyword AS t1 ON t2.kid = t1.id JOIN movie AS t3 ON t2.msid = t3.mid WHERE t1.keyword = \"Persians\" AND t3.release_year > 1990;", "pred_sql": "SELECT COUNT(*)\nFROM movie AS m\nJOIN classification AS c ON m.mid = c.msid\nJOIN tags AS tg ON c.msid = tg.msid\nJOIN keyword AS k ON tg.kid = k.id\nWHERE k.keyword = 'Persians'\n AND m.release_year > 1990;", "label": "spurious", "unseen": false} {"case_id": "spider_q051_r3", "question_id": "spider/imdb/8514", "ds": "spider", "db": "imdb", "question": "How many movies about Persians were released after 1990 ?", "evidence": "", "gold_sql": "SELECT COUNT ( DISTINCT t3.title ) FROM tags AS t2 JOIN keyword AS t1 ON t2.kid = t1.id JOIN movie AS t3 ON t2.msid = t3.mid WHERE t1.keyword = \"Persians\" AND t3.release_year > 1990;", "pred_sql": "SELECT COUNT(*) FROM movie JOIN classification ON movie.mid = classification.msid JOIN genre ON classification.gid = genre.gid WHERE genre.genre = 'Persian' AND movie.release_year > 1990;", "label": "spurious", "unseen": true} {"case_id": "spider_q052_r0", "question_id": "spider/cre_Theme_park/5928", "ds": "spider", "db": "cre_Theme_park", "question": "Find the details of all the markets that are accessible by walk or bus.", "evidence": "", "gold_sql": "SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = \"walk\" OR T2.How_to_Get_There = \"bus\"", "pred_sql": "SELECT Market_Details FROM Street_Markets;", "label": "spurious", "unseen": false} {"case_id": "spider_q052_r1", "question_id": "spider/cre_Theme_park/5928", "ds": "spider", "db": "cre_Theme_park", "question": "Find the details of all the markets that are accessible by walk or bus.", "evidence": "", "gold_sql": "SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = \"walk\" OR T2.How_to_Get_There = \"bus\"", "pred_sql": "SELECT sm.Market_Details\nFROM Street_Markets sm\nJOIN Tourist_Attractions ta ON sm.Market_ID = ta.Tourist_Attraction_ID\nWHERE ta.How_to_Get_There = 'walk' OR ta.How_to_Get_There = 'bus';", "label": "correct", "unseen": false} {"case_id": "spider_q052_r2", "question_id": "spider/cre_Theme_park/5928", "ds": "spider", "db": "cre_Theme_park", "question": "Find the details of all the markets that are accessible by walk or bus.", "evidence": "", "gold_sql": "SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = \"walk\" OR T2.How_to_Get_There = \"bus\"", "pred_sql": "SELECT sm.Market_Details\nFROM Street_Markets sm\nJOIN Tourist_Attractions ta ON sm.Market_ID = ta.Tourist_Attraction_ID\nWHERE ta.How_to_Get_There IN ('walk', 'bus');", "label": "correct", "unseen": false} {"case_id": "spider_q052_r3", "question_id": "spider/cre_Theme_park/5928", "ds": "spider", "db": "cre_Theme_park", "question": "Find the details of all the markets that are accessible by walk or bus.", "evidence": "", "gold_sql": "SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = \"walk\" OR T2.How_to_Get_There = \"bus\"", "pred_sql": "SELECT sm.Market_Details\nFROM Street_Markets sm\nJOIN Tourist_Attractions ta ON sm.Market_ID = ta.Tourist_Attraction_ID\nWHERE ta.How_to_Get_There IN ('walk', 'bus');", "label": "correct", "unseen": false} {"case_id": "spider_q053_r0", "question_id": "spider/swimming/5629", "ds": "spider", "db": "swimming", "question": "Find the names of stadiums that the most swimmers have been to.", "evidence": "", "gold_sql": "SELECT t3.name FROM record AS t1 JOIN event AS t2 ON t1.event_id = t2.id JOIN stadium AS t3 ON t3.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT s.name\nFROM stadium s\nJOIN event e ON s.ID = e.Stadium_ID\nJOIN record r ON e.ID = r.Event_ID\nGROUP BY s.ID\nORDER BY COUNT(r.Swimmer_ID) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q053_r1", "question_id": "spider/swimming/5629", "ds": "spider", "db": "swimming", "question": "Find the names of stadiums that the most swimmers have been to.", "evidence": "", "gold_sql": "SELECT t3.name FROM record AS t1 JOIN event AS t2 ON t1.event_id = t2.id JOIN stadium AS t3 ON t3.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT s.name\nFROM stadium s\nJOIN event e ON s.ID = e.Stadium_ID\nGROUP BY s.ID\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "spider_q053_r2", "question_id": "spider/swimming/5629", "ds": "spider", "db": "swimming", "question": "Find the names of stadiums that the most swimmers have been to.", "evidence": "", "gold_sql": "SELECT t3.name FROM record AS t1 JOIN event AS t2 ON t1.event_id = t2.id JOIN stadium AS t3 ON t3.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT s.name\nFROM stadium s\nJOIN event e ON s.ID = e.Stadium_ID\nJOIN record r ON e.ID = r.Event_ID\nGROUP BY s.name\nORDER BY COUNT(DISTINCT r.Swimmer_ID) DESC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "spider_q053_r3", "question_id": "spider/swimming/5629", "ds": "spider", "db": "swimming", "question": "Find the names of stadiums that the most swimmers have been to.", "evidence": "", "gold_sql": "SELECT t3.name FROM record AS t1 JOIN event AS t2 ON t1.event_id = t2.id JOIN stadium AS t3 ON t3.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT s.name\nFROM stadium s\nJOIN event e ON s.ID = e.Stadium_ID\nJOIN record r ON e.ID = r.Event_ID\nGROUP BY s.name\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "spider_q054_r0", "question_id": "spider/scholar/7845", "ds": "spider", "db": "scholar", "question": "How many papers were accepted at nature communications 2015 ?", "evidence": "", "gold_sql": "SELECT DISTINCT COUNT ( t1.paperid ) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = \"nature communications\";", "pred_sql": "SELECT COUNT(*) FROM paper JOIN venue ON paper.venueId = venue.venueId WHERE venue.venueName = 'nature communications' AND paper.year = 2015;", "label": "correct", "unseen": false} {"case_id": "spider_q054_r1", "question_id": "spider/scholar/7845", "ds": "spider", "db": "scholar", "question": "How many papers were accepted at nature communications 2015 ?", "evidence": "", "gold_sql": "SELECT DISTINCT COUNT ( t1.paperid ) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = \"nature communications\";", "pred_sql": "SELECT COUNT(*) \nFROM paper p\nJOIN venue v ON p.venueId = v.venueId\nWHERE v.venueName = 'nature communications' AND p.year = 2015;", "label": "correct", "unseen": false} {"case_id": "spider_q054_r2", "question_id": "spider/scholar/7845", "ds": "spider", "db": "scholar", "question": "How many papers were accepted at nature communications 2015 ?", "evidence": "", "gold_sql": "SELECT DISTINCT COUNT ( t1.paperid ) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = \"nature communications\";", "pred_sql": "SELECT COUNT(*) FROM paper p JOIN venue v ON p.venueId = v.venueId WHERE v.venueName = 'nature communications' AND p.year = 2015;", "label": "correct", "unseen": false} {"case_id": "spider_q054_r3", "question_id": "spider/scholar/7845", "ds": "spider", "db": "scholar", "question": "How many papers were accepted at nature communications 2015 ?", "evidence": "", "gold_sql": "SELECT DISTINCT COUNT ( t1.paperid ) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = \"nature communications\";", "pred_sql": "SELECT COUNT(*)\nFROM paper p\nJOIN venue v ON p.venueId = v.venueId\nWHERE v.venueName = 'nature communications' AND p.year = 2015;", "label": "correct", "unseen": false} {"case_id": "spider_q055_r0", "question_id": "spider/tracking_grants_for_research/4349", "ds": "spider", "db": "tracking_grants_for_research", "question": "What are the details for the project whose research has been published?", "evidence": "", "gold_sql": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'", "pred_sql": "SELECT p.project_details\nFROM Projects AS p\nJOIN Project_Outcomes AS po ON p.project_id = po.project_id\nJOIN Research_Outcomes AS ro ON po.outcome_code = ro.outcome_code\nWHERE ro.outcome_description = 'Published Research Paper';", "label": "spurious", "unseen": false} {"case_id": "spider_q055_r1", "question_id": "spider/tracking_grants_for_research/4349", "ds": "spider", "db": "tracking_grants_for_research", "question": "What are the details for the project whose research has been published?", "evidence": "", "gold_sql": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'", "pred_sql": "SELECT p.project_details\nFROM Projects p\nJOIN Project_Outcomes po ON p.project_id = po.project_id\nJOIN Research_Outcomes ro ON po.outcome_code = ro.outcome_code\nWHERE ro.outcome_description = 'Published Research Paper';", "label": "spurious", "unseen": false} {"case_id": "spider_q055_r2", "question_id": "spider/tracking_grants_for_research/4349", "ds": "spider", "db": "tracking_grants_for_research", "question": "What are the details for the project whose research has been published?", "evidence": "", "gold_sql": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'", "pred_sql": "SELECT p.project_details\nFROM Projects p\nJOIN Project_Outcomes po ON p.project_id = po.project_id\nJOIN Research_Outcomes ro ON po.outcome_code = ro.outcome_code\nWHERE ro.outcome_description = 'Published Research Paper';", "label": "spurious", "unseen": false} {"case_id": "spider_q055_r3", "question_id": "spider/tracking_grants_for_research/4349", "ds": "spider", "db": "tracking_grants_for_research", "question": "What are the details for the project whose research has been published?", "evidence": "", "gold_sql": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'", "pred_sql": "SELECT Projects.project_details\nFROM Projects\nJOIN Project_Outcomes ON Projects.project_id = Project_Outcomes.project_id\nJOIN Research_Outcomes ON Project_Outcomes.outcome_code = Research_Outcomes.outcome_code\nWHERE Research_Outcomes.outcome_description = 'Published Research Paper';", "label": "spurious", "unseen": false} {"case_id": "spider_q056_r0", "question_id": "spider/manufactory_1/5307", "ds": "spider", "db": "manufactory_1", "question": "What is the total revenue of companies started by founder?", "evidence": "", "gold_sql": "SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder", "pred_sql": "SELECT SUM(Revenue) AS Total_Revenue FROM Manufacturers;", "label": "wrong", "unseen": false} {"case_id": "spider_q056_r1", "question_id": "spider/manufactory_1/5307", "ds": "spider", "db": "manufactory_1", "question": "What is the total revenue of companies started by founder?", "evidence": "", "gold_sql": "SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder", "pred_sql": "SELECT SUM(Revenue) FROM Manufacturers;", "label": "wrong", "unseen": false} {"case_id": "spider_q056_r2", "question_id": "spider/manufactory_1/5307", "ds": "spider", "db": "manufactory_1", "question": "What is the total revenue of companies started by founder?", "evidence": "", "gold_sql": "SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder", "pred_sql": "SELECT SUM(Revenue) FROM Manufacturers;", "label": "wrong", "unseen": false} {"case_id": "spider_q056_r3", "question_id": "spider/manufactory_1/5307", "ds": "spider", "db": "manufactory_1", "question": "What is the total revenue of companies started by founder?", "evidence": "", "gold_sql": "SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder", "pred_sql": "SELECT SUM(Revenue) FROM Manufacturers;", "label": "wrong", "unseen": false} {"case_id": "spider_q057_r0", "question_id": "spider/allergy_1/511", "ds": "spider", "db": "allergy_1", "question": "How many students have a food allergy?", "evidence": "", "gold_sql": "SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = \"food\"", "pred_sql": "SELECT COUNT(*) FROM Has_Allergy h JOIN Allergy_Type a ON h.Allergy = a.Allergy WHERE a.AllergyType = 'food';", "label": "correct", "unseen": false} {"case_id": "spider_q057_r1", "question_id": "spider/allergy_1/511", "ds": "spider", "db": "allergy_1", "question": "How many students have a food allergy?", "evidence": "", "gold_sql": "SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = \"food\"", "pred_sql": "SELECT COUNT(*) \nFROM Has_Allergy ha\nJOIN Allergy_Type at ON ha.Allergy = at.Allergy\nWHERE at.AllergyType = 'food';", "label": "correct", "unseen": false} {"case_id": "spider_q057_r2", "question_id": "spider/allergy_1/511", "ds": "spider", "db": "allergy_1", "question": "How many students have a food allergy?", "evidence": "", "gold_sql": "SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = \"food\"", "pred_sql": "SELECT COUNT(*) FROM Has_Allergy ha JOIN Allergy_Type a ON ha.Allergy = a.Allergy WHERE a.AllergyType = 'food';", "label": "correct", "unseen": false} {"case_id": "spider_q057_r3", "question_id": "spider/allergy_1/511", "ds": "spider", "db": "allergy_1", "question": "How many students have a food allergy?", "evidence": "", "gold_sql": "SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = \"food\"", "pred_sql": "SELECT COUNT(*) FROM Has_Allergy AS ha JOIN Allergy_Type AS alt ON ha.Allergy = alt.Allergy WHERE alt.AllergyType = 'food';", "label": "correct", "unseen": false} {"case_id": "spider_q058_r0", "question_id": "spider/party_people/2044", "ds": "spider", "db": "party_people", "question": "Count the number of different parties.", "evidence": "", "gold_sql": "SELECT count(DISTINCT party_name) FROM party", "pred_sql": "SELECT COUNT(*) FROM party;", "label": "spurious", "unseen": false} {"case_id": "spider_q058_r1", "question_id": "spider/party_people/2044", "ds": "spider", "db": "party_people", "question": "Count the number of different parties.", "evidence": "", "gold_sql": "SELECT count(DISTINCT party_name) FROM party", "pred_sql": "SELECT COUNT(*) FROM party;", "label": "spurious", "unseen": false} {"case_id": "spider_q058_r2", "question_id": "spider/party_people/2044", "ds": "spider", "db": "party_people", "question": "Count the number of different parties.", "evidence": "", "gold_sql": "SELECT count(DISTINCT party_name) FROM party", "pred_sql": "SELECT COUNT(DISTINCT Party_ID) FROM party;", "label": "spurious", "unseen": false} {"case_id": "spider_q058_r3", "question_id": "spider/party_people/2044", "ds": "spider", "db": "party_people", "question": "Count the number of different parties.", "evidence": "", "gold_sql": "SELECT count(DISTINCT party_name) FROM party", "pred_sql": "SELECT COUNT(*) FROM party;", "label": "spurious", "unseen": false} {"case_id": "spider_q059_r0", "question_id": "spider/tracking_grants_for_research/4322", "ds": "spider", "db": "tracking_grants_for_research", "question": "List the project details of the project both producing patent and paper as outcomes.", "evidence": "", "gold_sql": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'", "pred_sql": "SELECT DISTINCT p.project_details\nFROM Projects p\nJOIN Project_Outcomes po ON p.project_id = po.project_id\nWHERE po.outcome_code = 'Patent'\nINTERSECT\nSELECT DISTINCT p2.project_details\nFROM Projects p2\nJOIN Project_Outcomes po2 ON p2.project_id = po2.project_id\nWHERE po2.outcome_code = 'Paper';", "label": "correct", "unseen": false} {"case_id": "spider_q059_r1", "question_id": "spider/tracking_grants_for_research/4322", "ds": "spider", "db": "tracking_grants_for_research", "question": "List the project details of the project both producing patent and paper as outcomes.", "evidence": "", "gold_sql": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'", "pred_sql": "SELECT DISTINCT p.project_details\nFROM Projects p\nJOIN Project_Outcomes po ON p.project_id = po.project_id\nJOIN Research_Outcomes ro ON po.outcome_code = ro.outcome_code\nWHERE ro.outcome_code = 'Paper'\nINTERSECT\nSELECT DISTINCT p.project_details\nFROM Projects p\nJOIN Project_Outcomes po ON p.project_id = po.project_id\nJOIN Research_Outcomes ro ON po.outcome_code = ro.outcome_code\nWHERE ro.outcome_code = 'Patent';", "label": "correct", "unseen": true} {"case_id": "spider_q059_r2", "question_id": "spider/tracking_grants_for_research/4322", "ds": "spider", "db": "tracking_grants_for_research", "question": "List the project details of the project both producing patent and paper as outcomes.", "evidence": "", "gold_sql": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'", "pred_sql": "SELECT p.project_details\nFROM Projects p\nJOIN Project_Outcomes o ON p.project_id = o.project_id\nJOIN Research_Outcomes r ON o.outcome_code = r.outcome_code\nWHERE o.outcome_code = 'Patent'\nINTERSECT\nSELECT p.project_details\nFROM Projects p\nJOIN Project_Outcomes o ON p.project_id = o.project_id\nJOIN Research_Outcomes r ON o.outcome_code = r.outcome_code\nWHERE o.outcome_code = 'Paper';", "label": "correct", "unseen": true} {"case_id": "spider_q059_r3", "question_id": "spider/tracking_grants_for_research/4322", "ds": "spider", "db": "tracking_grants_for_research", "question": "List the project details of the project both producing patent and paper as outcomes.", "evidence": "", "gold_sql": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'", "pred_sql": "SELECT p.project_details\nFROM Projects p\nJOIN Project_Outcomes po ON p.project_id = po.project_id\nWHERE po.outcome_code = 'Patent'\nINTERSECT\nSELECT p.project_details\nFROM Projects p\nJOIN Project_Outcomes po ON p.project_id = po.project_id\nWHERE po.outcome_code = 'Paper';", "label": "correct", "unseen": false} {"case_id": "spider_q060_r0", "question_id": "spider/company_office/4546", "ds": "spider", "db": "company_office", "question": "Sort the company names in descending order of the company's market value.", "evidence": "", "gold_sql": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC", "pred_sql": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC;", "label": "correct", "unseen": false} {"case_id": "spider_q060_r1", "question_id": "spider/company_office/4546", "ds": "spider", "db": "company_office", "question": "Sort the company names in descending order of the company's market value.", "evidence": "", "gold_sql": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC", "pred_sql": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC;", "label": "correct", "unseen": false} {"case_id": "spider_q060_r2", "question_id": "spider/company_office/4546", "ds": "spider", "db": "company_office", "question": "Sort the company names in descending order of the company's market value.", "evidence": "", "gold_sql": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC", "pred_sql": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC;", "label": "correct", "unseen": false} {"case_id": "spider_q060_r3", "question_id": "spider/company_office/4546", "ds": "spider", "db": "company_office", "question": "Sort the company names in descending order of the company's market value.", "evidence": "", "gold_sql": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC", "pred_sql": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC", "label": "correct", "unseen": false} {"case_id": "spider_q061_r0", "question_id": "spider/sakila_1/2944", "ds": "spider", "db": "sakila_1", "question": "Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.", "evidence": "", "gold_sql": "SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'", "pred_sql": "SELECT p.payment_date\nFROM payment p\nJOIN staff s ON p.staff_id = s.staff_id\nWHERE p.amount > 10\n AND s.first_name = 'Elsa';", "label": "wrong", "unseen": true} {"case_id": "spider_q061_r1", "question_id": "spider/sakila_1/2944", "ds": "spider", "db": "sakila_1", "question": "Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.", "evidence": "", "gold_sql": "SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'", "pred_sql": "SELECT p.payment_date\nFROM payment p\nJOIN staff s ON p.staff_id = s.staff_id\nWHERE p.amount > 10\n AND s.first_name = 'Elsa';", "label": "wrong", "unseen": true} {"case_id": "spider_q061_r2", "question_id": "spider/sakila_1/2944", "ds": "spider", "db": "sakila_1", "question": "Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.", "evidence": "", "gold_sql": "SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'", "pred_sql": "SELECT p.payment_date\nFROM payment p\nJOIN staff s ON p.staff_id = s.staff_id\nWHERE p.amount > 10\n AND s.first_name = 'Elsa';", "label": "wrong", "unseen": true} {"case_id": "spider_q061_r3", "question_id": "spider/sakila_1/2944", "ds": "spider", "db": "sakila_1", "question": "Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.", "evidence": "", "gold_sql": "SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'", "pred_sql": "SELECT payment.payment_date\nFROM payment\nJOIN staff ON payment.staff_id = staff.staff_id\nWHERE payment.amount > 10\n AND staff.first_name = 'Elsa';", "label": "wrong", "unseen": true} {"case_id": "spider_q062_r0", "question_id": "spider/yelp/8208", "ds": "spider", "db": "yelp", "question": "How many people reviewed the restaurant \" Texas de Brazil \" in Dallas Texas ?", "evidence": "", "gold_sql": "SELECT COUNT ( DISTINCT t4.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t1.city = \"Dallas\" AND t1.name = \"Texas de Brazil\" AND t1.state = \"Texas\" AND t2.category_name = \"restaurant\";", "pred_sql": "SELECT COUNT(*) FROM review AS r JOIN business AS b ON r.business_id = b.business_id WHERE b.name = 'Texas de Brazil' AND b.state = 'Texas';", "label": "spurious", "unseen": false} {"case_id": "spider_q062_r1", "question_id": "spider/yelp/8208", "ds": "spider", "db": "yelp", "question": "How many people reviewed the restaurant \" Texas de Brazil \" in Dallas Texas ?", "evidence": "", "gold_sql": "SELECT COUNT ( DISTINCT t4.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t1.city = \"Dallas\" AND t1.name = \"Texas de Brazil\" AND t1.state = \"Texas\" AND t2.category_name = \"restaurant\";", "pred_sql": "SELECT COUNT(*) FROM review JOIN business ON review.business_id = business.business_id WHERE business.name = 'Texas de Brazil' AND business.state = 'Dallas';", "label": "spurious", "unseen": false} {"case_id": "spider_q062_r2", "question_id": "spider/yelp/8208", "ds": "spider", "db": "yelp", "question": "How many people reviewed the restaurant \" Texas de Brazil \" in Dallas Texas ?", "evidence": "", "gold_sql": "SELECT COUNT ( DISTINCT t4.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t1.city = \"Dallas\" AND t1.name = \"Texas de Brazil\" AND t1.state = \"Texas\" AND t2.category_name = \"restaurant\";", "pred_sql": "SELECT COUNT(*) FROM review AS r JOIN business AS b ON r.business_id = b.business_id WHERE b.name = 'Texas de Brazil' AND b.state = 'Dallas';", "label": "spurious", "unseen": false} {"case_id": "spider_q062_r3", "question_id": "spider/yelp/8208", "ds": "spider", "db": "yelp", "question": "How many people reviewed the restaurant \" Texas de Brazil \" in Dallas Texas ?", "evidence": "", "gold_sql": "SELECT COUNT ( DISTINCT t4.name ) FROM category AS t2 JOIN business AS t1 ON t2.business_id = t1.business_id JOIN review AS t3 ON t3.business_id = t1.business_id JOIN USER AS t4 ON t4.user_id = t3.user_id WHERE t1.city = \"Dallas\" AND t1.name = \"Texas de Brazil\" AND t1.state = \"Texas\" AND t2.category_name = \"restaurant\";", "pred_sql": "SELECT COUNT(*) FROM review JOIN business ON review.business_id = business.business_id WHERE business.name = 'Texas de Brazil' AND business.city = 'Dallas' AND business.state = 'Texas';", "label": "spurious", "unseen": false} {"case_id": "spider_q063_r0", "question_id": "spider/department_store/4738", "ds": "spider", "db": "department_store", "question": "What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products?", "evidence": "", "gold_sql": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT avg(product_price) FROM products)", "pred_sql": "SELECT p.product_id\nFROM Products p\nJOIN Product_Suppliers ps ON p.product_id = ps.product_id\nWHERE ps.supplier_id = 2\n AND p.product_price > (SELECT AVG(product_price) FROM Products);", "label": "correct", "unseen": false} {"case_id": "spider_q063_r1", "question_id": "spider/department_store/4738", "ds": "spider", "db": "department_store", "question": "What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products?", "evidence": "", "gold_sql": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT avg(product_price) FROM products)", "pred_sql": "SELECT p.product_id\nFROM Products p\nJOIN Product_Suppliers ps ON p.product_id = ps.product_id\nWHERE ps.supplier_id = 2\n AND p.product_price > (SELECT AVG(product_price) FROM Products);", "label": "correct", "unseen": false} {"case_id": "spider_q063_r2", "question_id": "spider/department_store/4738", "ds": "spider", "db": "department_store", "question": "What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products?", "evidence": "", "gold_sql": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT avg(product_price) FROM products)", "pred_sql": "SELECT p.product_id\nFROM Products p\nJOIN Product_Suppliers ps ON p.product_id = ps.product_id\nWHERE ps.supplier_id = 2\n AND p.product_price > (SELECT AVG(product_price) FROM Products);", "label": "correct", "unseen": false} {"case_id": "spider_q063_r3", "question_id": "spider/department_store/4738", "ds": "spider", "db": "department_store", "question": "What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products?", "evidence": "", "gold_sql": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT avg(product_price) FROM products)", "pred_sql": "SELECT product_id FROM Products WHERE product_price > (SELECT AVG(product_price) FROM Products) AND product_id IN (SELECT product_id FROM Product_Suppliers WHERE supplier_id = 2);", "label": "correct", "unseen": false} {"case_id": "spider_q064_r0", "question_id": "spider/scholar/7839", "ds": "spider", "db": "scholar", "question": "how many papers appeared at nature communications last year", "evidence": "", "gold_sql": "SELECT DISTINCT COUNT ( t1.paperid ) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = \"nature communications\";", "pred_sql": "SELECT COUNT(*) FROM paper p JOIN venue v ON p.venueId = v.venueId WHERE v.venueName = 'nature communications' AND p.year = (SELECT MAX(year) FROM paper) - 1;", "label": "spurious", "unseen": false} {"case_id": "spider_q064_r1", "question_id": "spider/scholar/7839", "ds": "spider", "db": "scholar", "question": "how many papers appeared at nature communications last year", "evidence": "", "gold_sql": "SELECT DISTINCT COUNT ( t1.paperid ) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = \"nature communications\";", "pred_sql": "SELECT COUNT(*) FROM paper JOIN venue ON paper.venueId = venue.venueId WHERE venue.venueName = 'nature communications' AND paper.year = strftime('%Y', 'now');", "label": "spurious", "unseen": false} {"case_id": "spider_q064_r2", "question_id": "spider/scholar/7839", "ds": "spider", "db": "scholar", "question": "how many papers appeared at nature communications last year", "evidence": "", "gold_sql": "SELECT DISTINCT COUNT ( t1.paperid ) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = \"nature communications\";", "pred_sql": "SELECT COUNT(*) FROM paper p JOIN venue v ON p.venueId = v.venueId WHERE v.venueName = 'nature communications' AND p.year = (SELECT MAX(year) - 1 FROM paper);", "label": "spurious", "unseen": false} {"case_id": "spider_q064_r3", "question_id": "spider/scholar/7839", "ds": "spider", "db": "scholar", "question": "how many papers appeared at nature communications last year", "evidence": "", "gold_sql": "SELECT DISTINCT COUNT ( t1.paperid ) FROM venue AS t2 JOIN paper AS t1 ON t2.venueid = t1.venueid WHERE t1.year = 2015 AND t2.venuename = \"nature communications\";", "pred_sql": "SELECT COUNT(*) FROM paper JOIN venue ON paper.venueId = venue.venueId WHERE venue.venueName = 'nature communications' AND paper.year = strftime('%Y', 'now', '-1 year');", "label": "spurious", "unseen": true} {"case_id": "spider_q065_r0", "question_id": "spider/sports_competition/3386", "ds": "spider", "db": "sports_competition", "question": "What are the countries that participated in both friendly and tournament type competitions?", "evidence": "", "gold_sql": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament'", "pred_sql": "SELECT DISTINCT c.Country\nFROM competition c\nWHERE c.Competition_type = 'Friendly'\nINTERSECT\nSELECT DISTINCT c2.Country\nFROM competition c2\nWHERE c2.Competition_type = 'Tournament';", "label": "correct", "unseen": false} {"case_id": "spider_q065_r1", "question_id": "spider/sports_competition/3386", "ds": "spider", "db": "sports_competition", "question": "What are the countries that participated in both friendly and tournament type competitions?", "evidence": "", "gold_sql": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament'", "pred_sql": "SELECT country\nFROM competition\nWHERE competition_type = 'Friendly'\nINTERSECT\nSELECT country\nFROM competition\nWHERE competition_type = 'Tournament';", "label": "correct", "unseen": false} {"case_id": "spider_q065_r2", "question_id": "spider/sports_competition/3386", "ds": "spider", "db": "sports_competition", "question": "What are the countries that participated in both friendly and tournament type competitions?", "evidence": "", "gold_sql": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament'", "pred_sql": "SELECT DISTINCT c1.Country\nFROM competition c1\nJOIN competition c2\n ON c1.Country = c2.Country\nWHERE c1.Competition_type = 'Friendly'\n AND c2.Competition_type = 'Tournament';", "label": "spurious", "unseen": true} {"case_id": "spider_q065_r3", "question_id": "spider/sports_competition/3386", "ds": "spider", "db": "sports_competition", "question": "What are the countries that participated in both friendly and tournament type competitions?", "evidence": "", "gold_sql": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament'", "pred_sql": "SELECT DISTINCT Country\nFROM competition\nWHERE Competition_type = 'Friendly'\nINTERSECT\nSELECT DISTINCT Country\nFROM competition\nWHERE Competition_type = 'Tournament';", "label": "correct", "unseen": false} {"case_id": "spider_q066_r0", "question_id": "spider/baseball_1/3668", "ds": "spider", "db": "baseball_1", "question": "Count the number of times the team \"Boston Red Stockings\" lost in 2009 postseason.", "evidence": "", "gold_sql": "SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009;", "pred_sql": "SELECT COUNT(*) FROM postseason p JOIN team t ON p.team_id_loser = t.team_id WHERE t.name = 'Boston Red Stockings' AND p.year = 2009;", "label": "wrong", "unseen": true} {"case_id": "spider_q066_r1", "question_id": "spider/baseball_1/3668", "ds": "spider", "db": "baseball_1", "question": "Count the number of times the team \"Boston Red Stockings\" lost in 2009 postseason.", "evidence": "", "gold_sql": "SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009;", "pred_sql": "SELECT COUNT(*) FROM postseason p JOIN team t ON p.team_id_loser = t.team_id WHERE t.name = 'Boston Red Stockings' AND p.year = 2009;", "label": "wrong", "unseen": true} {"case_id": "spider_q066_r2", "question_id": "spider/baseball_1/3668", "ds": "spider", "db": "baseball_1", "question": "Count the number of times the team \"Boston Red Stockings\" lost in 2009 postseason.", "evidence": "", "gold_sql": "SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009;", "pred_sql": "SELECT COUNT(*) FROM postseason p JOIN team t ON p.team_id_loser = t.team_id WHERE t.name = 'Boston Red Stockings' AND p.year = 2009;", "label": "wrong", "unseen": true} {"case_id": "spider_q066_r3", "question_id": "spider/baseball_1/3668", "ds": "spider", "db": "baseball_1", "question": "Count the number of times the team \"Boston Red Stockings\" lost in 2009 postseason.", "evidence": "", "gold_sql": "SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009;", "pred_sql": "SELECT COUNT(*) FROM postseason p JOIN team t ON p.team_id_winner = t.team_id WHERE t.name = 'Boston Red Stockings' AND p.year = 2009;", "label": "wrong", "unseen": false} {"case_id": "spider_q067_r0", "question_id": "spider/manufactory_1/5339", "ds": "spider", "db": "manufactory_1", "question": "What is all the product data, as well as each product's manufacturer?", "evidence": "", "gold_sql": "SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code", "pred_sql": "SELECT p.Name, p.Code, p.Price, m.Name AS Manufacturer\nFROM Products p\nJOIN Manufacturers m ON p.Manufacturer = m.Code;", "label": "wrong", "unseen": false} {"case_id": "spider_q067_r1", "question_id": "spider/manufactory_1/5339", "ds": "spider", "db": "manufactory_1", "question": "What is all the product data, as well as each product's manufacturer?", "evidence": "", "gold_sql": "SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code", "pred_sql": "SELECT p.*, m.Name\nFROM Products p\nJOIN Manufacturers m ON p.Manufacturer = m.Code;", "label": "wrong", "unseen": false} {"case_id": "spider_q067_r2", "question_id": "spider/manufactory_1/5339", "ds": "spider", "db": "manufactory_1", "question": "What is all the product data, as well as each product's manufacturer?", "evidence": "", "gold_sql": "SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code", "pred_sql": "SELECT p.*, m.*\nFROM Products p\nJOIN Manufacturers m ON p.Manufacturer = m.Code;", "label": "correct", "unseen": false} {"case_id": "spider_q067_r3", "question_id": "spider/manufactory_1/5339", "ds": "spider", "db": "manufactory_1", "question": "What is all the product data, as well as each product's manufacturer?", "evidence": "", "gold_sql": "SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code", "pred_sql": "SELECT p.*, m.Name\nFROM Products p\nJOIN Manufacturers m ON p.Manufacturer = m.Code;", "label": "wrong", "unseen": false} {"case_id": "spider_q068_r0", "question_id": "spider/bike_1/126", "ds": "spider", "db": "bike_1", "question": "How many different bike ids are there?", "evidence": "", "gold_sql": "SELECT count(DISTINCT bike_id) FROM trip", "pred_sql": "SELECT COUNT(DISTINCT bike_id) FROM trip;", "label": "correct", "unseen": false} {"case_id": "spider_q068_r1", "question_id": "spider/bike_1/126", "ds": "spider", "db": "bike_1", "question": "How many different bike ids are there?", "evidence": "", "gold_sql": "SELECT count(DISTINCT bike_id) FROM trip", "pred_sql": "SELECT COUNT(DISTINCT bike_id) FROM trip;", "label": "correct", "unseen": false} {"case_id": "spider_q068_r2", "question_id": "spider/bike_1/126", "ds": "spider", "db": "bike_1", "question": "How many different bike ids are there?", "evidence": "", "gold_sql": "SELECT count(DISTINCT bike_id) FROM trip", "pred_sql": "SELECT COUNT(DISTINCT bike_id) FROM trip;", "label": "correct", "unseen": false} {"case_id": "spider_q068_r3", "question_id": "spider/bike_1/126", "ds": "spider", "db": "bike_1", "question": "How many different bike ids are there?", "evidence": "", "gold_sql": "SELECT count(DISTINCT bike_id) FROM trip", "pred_sql": "SELECT COUNT(DISTINCT bike_id) FROM trip;", "label": "correct", "unseen": false} {"case_id": "spider_q069_r0", "question_id": "spider/election/2762", "ds": "spider", "db": "election", "question": "How many distinct delegates are from counties with population larger than 50000?", "evidence": "", "gold_sql": "SELECT count(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000", "pred_sql": "SELECT COUNT(DISTINCT e.Delegate) FROM election e JOIN county c ON e.District = c.County_Id WHERE c.Population > 50000;", "label": "correct", "unseen": false} {"case_id": "spider_q069_r1", "question_id": "spider/election/2762", "ds": "spider", "db": "election", "question": "How many distinct delegates are from counties with population larger than 50000?", "evidence": "", "gold_sql": "SELECT count(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000", "pred_sql": "SELECT COUNT(DISTINCT e.Delegate)\nFROM election e\nJOIN county c ON e.District = c.County_Id\nWHERE c.Population > 50000;", "label": "correct", "unseen": false} {"case_id": "spider_q069_r2", "question_id": "spider/election/2762", "ds": "spider", "db": "election", "question": "How many distinct delegates are from counties with population larger than 50000?", "evidence": "", "gold_sql": "SELECT count(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000", "pred_sql": "SELECT COUNT(DISTINCT e.Delegate)\nFROM election e\nJOIN county c ON e.District = c.County_Id\nWHERE c.Population > 50000;", "label": "correct", "unseen": false} {"case_id": "spider_q069_r3", "question_id": "spider/election/2762", "ds": "spider", "db": "election", "question": "How many distinct delegates are from counties with population larger than 50000?", "evidence": "", "gold_sql": "SELECT count(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000", "pred_sql": "SELECT COUNT(DISTINCT e.Delegate)\nFROM election e\nJOIN county c ON e.District = c.County_Id\nWHERE c.Population > 50000;", "label": "correct", "unseen": false} {"case_id": "spider_q070_r0", "question_id": "spider/aircraft/4818", "ds": "spider", "db": "aircraft", "question": "What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?", "evidence": "", "gold_sql": "SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000", "pred_sql": "SELECT DISTINCT a.Description\nFROM aircraft AS a\nJOIN airport_aircraft AS aa ON a.Aircraft_ID = aa.Aircraft_ID\nJOIN airport AS ap ON aa.Airport_ID = ap.Airport_ID\nWHERE ap.Total_Passengers > 10000000;", "label": "wrong", "unseen": false} {"case_id": "spider_q070_r1", "question_id": "spider/aircraft/4818", "ds": "spider", "db": "aircraft", "question": "What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?", "evidence": "", "gold_sql": "SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000", "pred_sql": "SELECT a.Description\nFROM aircraft a\nJOIN airport_aircraft aa ON a.Aircraft_ID = aa.Aircraft_ID\nJOIN airport ap ON aa.Airport_ID = ap.Airport_ID\nWHERE ap.Total_Passengers > 10000000;", "label": "wrong", "unseen": false} {"case_id": "spider_q070_r2", "question_id": "spider/aircraft/4818", "ds": "spider", "db": "aircraft", "question": "What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?", "evidence": "", "gold_sql": "SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000", "pred_sql": "SELECT DISTINCT a.Aircraft, a.Description\nFROM airport ap\nJOIN airport_aircraft aa ON ap.Airport_ID = aa.Airport_ID\nJOIN aircraft a ON aa.Aircraft_ID = a.Aircraft_ID\nWHERE ap.Total_Passengers > 10000000;", "label": "spurious", "unseen": false} {"case_id": "spider_q070_r3", "question_id": "spider/aircraft/4818", "ds": "spider", "db": "aircraft", "question": "What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?", "evidence": "", "gold_sql": "SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000", "pred_sql": "SELECT a.Description, a.Aircraft\nFROM airport_aircraft aa\nJOIN aircraft a ON aa.Aircraft_ID = a.Aircraft_ID\nJOIN airport ap ON aa.Airport_ID = ap.Airport_ID\nWHERE ap.Total_Passengers > 10000000;", "label": "wrong", "unseen": false} {"case_id": "spider_q071_r0", "question_id": "spider/store_1/605", "ds": "spider", "db": "store_1", "question": "Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.", "evidence": "", "gold_sql": "SELECT T2.first_name , T2.last_name , count(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count(T1.reports_to) DESC LIMIT 1;", "pred_sql": "SELECT e.first_name, e.last_name, COUNT(*) AS employee_count\nFROM employees e\nJOIN employees r ON e.id = r.reports_to\nGROUP BY e.id\nORDER BY employee_count DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q071_r1", "question_id": "spider/store_1/605", "ds": "spider", "db": "store_1", "question": "Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.", "evidence": "", "gold_sql": "SELECT T2.first_name , T2.last_name , count(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count(T1.reports_to) DESC LIMIT 1;", "pred_sql": "SELECT e.first_name, e.last_name, COUNT(*) AS num_people\nFROM employees e\nWHERE e.reports_to IS NOT NULL\nGROUP BY e.reports_to\nORDER BY num_people DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "spider_q071_r2", "question_id": "spider/store_1/605", "ds": "spider", "db": "store_1", "question": "Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.", "evidence": "", "gold_sql": "SELECT T2.first_name , T2.last_name , count(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count(T1.reports_to) DESC LIMIT 1;", "pred_sql": "SELECT e.first_name, e.last_name, COUNT(*) AS num_people_reported\nFROM employees e\nWHERE e.reports_to IS NOT NULL\nGROUP BY e.reports_to\nORDER BY num_people_reported DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "spider_q071_r3", "question_id": "spider/store_1/605", "ds": "spider", "db": "store_1", "question": "Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.", "evidence": "", "gold_sql": "SELECT T2.first_name , T2.last_name , count(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count(T1.reports_to) DESC LIMIT 1;", "pred_sql": "SELECT e.first_name, e.last_name, COUNT(*) AS num_reports\nFROM employees e\nWHERE e.reports_to IS NOT NULL\nGROUP BY e.reports_to\nORDER BY num_reports DESC;", "label": "wrong", "unseen": false} {"case_id": "spider_q072_r0", "question_id": "spider/allergy_1/489", "ds": "spider", "db": "allergy_1", "question": "Show all majors and corresponding number of students.", "evidence": "", "gold_sql": "SELECT major , count(*) FROM Student GROUP BY major", "pred_sql": "SELECT Major, COUNT(*) AS num_students\nFROM Student\nGROUP BY Major;", "label": "correct", "unseen": false} {"case_id": "spider_q072_r1", "question_id": "spider/allergy_1/489", "ds": "spider", "db": "allergy_1", "question": "Show all majors and corresponding number of students.", "evidence": "", "gold_sql": "SELECT major , count(*) FROM Student GROUP BY major", "pred_sql": "SELECT Major, COUNT(*) FROM Student GROUP BY Major;", "label": "correct", "unseen": false} {"case_id": "spider_q072_r2", "question_id": "spider/allergy_1/489", "ds": "spider", "db": "allergy_1", "question": "Show all majors and corresponding number of students.", "evidence": "", "gold_sql": "SELECT major , count(*) FROM Student GROUP BY major", "pred_sql": "SELECT Major, COUNT(*) FROM Student GROUP BY Major", "label": "correct", "unseen": false} {"case_id": "spider_q072_r3", "question_id": "spider/allergy_1/489", "ds": "spider", "db": "allergy_1", "question": "Show all majors and corresponding number of students.", "evidence": "", "gold_sql": "SELECT major , count(*) FROM Student GROUP BY major", "pred_sql": "SELECT Major, COUNT(*) FROM Student GROUP BY Major;", "label": "correct", "unseen": false} {"case_id": "spider_q073_r0", "question_id": "spider/soccer_2/4981", "ds": "spider", "db": "soccer_2", "question": "What are the name of the players who received a card in descending order of the hours of training?", "evidence": "", "gold_sql": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC", "pred_sql": "SELECT pName FROM Player ORDER BY HS DESC;", "label": "wrong", "unseen": false} {"case_id": "spider_q073_r1", "question_id": "spider/soccer_2/4981", "ds": "spider", "db": "soccer_2", "question": "What are the name of the players who received a card in descending order of the hours of training?", "evidence": "", "gold_sql": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC", "pred_sql": "SELECT pName FROM Player WHERE yCard != 'no' ORDER BY HS DESC;", "label": "spurious", "unseen": false} {"case_id": "spider_q073_r2", "question_id": "spider/soccer_2/4981", "ds": "spider", "db": "soccer_2", "question": "What are the name of the players who received a card in descending order of the hours of training?", "evidence": "", "gold_sql": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC", "pred_sql": "SELECT pName\nFROM Player\nWHERE yCard <> 'no'\nORDER BY HS DESC;", "label": "spurious", "unseen": false} {"case_id": "spider_q073_r3", "question_id": "spider/soccer_2/4981", "ds": "spider", "db": "soccer_2", "question": "What are the name of the players who received a card in descending order of the hours of training?", "evidence": "", "gold_sql": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC", "pred_sql": "SELECT pName FROM Player WHERE yCard <> 'no' ORDER BY HS DESC;", "label": "spurious", "unseen": false} {"case_id": "spider_q074_r0", "question_id": "spider/customer_complaints/5776", "ds": "spider", "db": "customer_complaints", "question": "Find the emails of customers who has filed a complaints of the product with the most complaints.", "evidence": "", "gold_sql": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1", "pred_sql": "SELECT DISTINCT c.email_address\nFROM Customers c\nJOIN Complaints co ON c.customer_id = co.customer_id\nWHERE co.product_id = (\n SELECT co2.product_id\n FROM Complaints co2\n GROUP BY co2.product_id\n ORDER BY COUNT(*) DESC\n LIMIT 1\n);", "label": "wrong", "unseen": true} {"case_id": "spider_q074_r1", "question_id": "spider/customer_complaints/5776", "ds": "spider", "db": "customer_complaints", "question": "Find the emails of customers who has filed a complaints of the product with the most complaints.", "evidence": "", "gold_sql": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1", "pred_sql": "SELECT DISTINCT c.email_address\nFROM Customers c\nJOIN Complaints cl ON c.customer_id = cl.customer_id\nWHERE cl.product_id = (\n SELECT product_id\n FROM Complaints\n GROUP BY product_id\n ORDER BY COUNT(*)\n DESC\n LIMIT 1\n);", "label": "wrong", "unseen": true} {"case_id": "spider_q074_r2", "question_id": "spider/customer_complaints/5776", "ds": "spider", "db": "customer_complaints", "question": "Find the emails of customers who has filed a complaints of the product with the most complaints.", "evidence": "", "gold_sql": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1", "pred_sql": "SELECT DISTINCT c.email_address\nFROM Customers c\nJOIN Complaints co ON c.customer_id = co.customer_id\nGROUP BY co.product_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q074_r3", "question_id": "spider/customer_complaints/5776", "ds": "spider", "db": "customer_complaints", "question": "Find the emails of customers who has filed a complaints of the product with the most complaints.", "evidence": "", "gold_sql": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1", "pred_sql": "SELECT DISTINCT c.email_address\nFROM Customers c\nJOIN Complaints co ON c.customer_id = co.customer_id\nGROUP BY co.product_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q075_r0", "question_id": "spider/customers_and_addresses/6117", "ds": "spider", "db": "customers_and_addresses", "question": "How many customers have at least one order with status \"Cancelled\"?", "evidence": "", "gold_sql": "SELECT count(DISTINCT customer_id) FROM customer_orders WHERE order_status = \"Cancelled\"", "pred_sql": "SELECT COUNT(DISTINCT customer_id) FROM Customer_Orders WHERE order_status = 'Cancelled';", "label": "correct", "unseen": false} {"case_id": "spider_q075_r1", "question_id": "spider/customers_and_addresses/6117", "ds": "spider", "db": "customers_and_addresses", "question": "How many customers have at least one order with status \"Cancelled\"?", "evidence": "", "gold_sql": "SELECT count(DISTINCT customer_id) FROM customer_orders WHERE order_status = \"Cancelled\"", "pred_sql": "SELECT COUNT(DISTINCT customer_id) FROM Customer_Orders WHERE order_status = 'Cancelled';", "label": "correct", "unseen": false} {"case_id": "spider_q075_r2", "question_id": "spider/customers_and_addresses/6117", "ds": "spider", "db": "customers_and_addresses", "question": "How many customers have at least one order with status \"Cancelled\"?", "evidence": "", "gold_sql": "SELECT count(DISTINCT customer_id) FROM customer_orders WHERE order_status = \"Cancelled\"", "pred_sql": "SELECT COUNT(DISTINCT customer_id) FROM Customer_Orders WHERE order_status = 'Cancelled';", "label": "correct", "unseen": false} {"case_id": "spider_q075_r3", "question_id": "spider/customers_and_addresses/6117", "ds": "spider", "db": "customers_and_addresses", "question": "How many customers have at least one order with status \"Cancelled\"?", "evidence": "", "gold_sql": "SELECT count(DISTINCT customer_id) FROM customer_orders WHERE order_status = \"Cancelled\"", "pred_sql": "SELECT COUNT(DISTINCT customer_id) FROM Customer_Orders WHERE order_status = 'Cancelled';", "label": "correct", "unseen": false} {"case_id": "spider_q076_r0", "question_id": "spider/bike_1/170", "ds": "spider", "db": "bike_1", "question": "What are the ids of all stations that have a latitude above 37.4 and have never had less than 7 bikes available?", "evidence": "", "gold_sql": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available) < 7", "pred_sql": "SELECT st.id\nFROM station AS st\nWHERE st.lat > 37.4\n AND NOT EXISTS (\n SELECT 1\n FROM status AS s\n WHERE s.station_id = st.id\n AND s.bikes_available < 7\n);", "label": "correct", "unseen": false} {"case_id": "spider_q076_r1", "question_id": "spider/bike_1/170", "ds": "spider", "db": "bike_1", "question": "What are the ids of all stations that have a latitude above 37.4 and have never had less than 7 bikes available?", "evidence": "", "gold_sql": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available) < 7", "pred_sql": "SELECT DISTINCT s.id\nFROM station s\nJOIN status st ON s.id = st.station_id\nWHERE s.lat > 37.4\n AND NOT EXISTS (\n SELECT 1\n FROM status st2\n WHERE st2.station_id = s.id\n AND st2.bikes_available < 7\n);", "label": "spurious", "unseen": false} {"case_id": "spider_q076_r2", "question_id": "spider/bike_1/170", "ds": "spider", "db": "bike_1", "question": "What are the ids of all stations that have a latitude above 37.4 and have never had less than 7 bikes available?", "evidence": "", "gold_sql": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available) < 7", "pred_sql": "SELECT s.id\nFROM station s\nWHERE s.lat > 37.4\n AND NOT EXISTS (\n SELECT 1\n FROM status st\n WHERE st.station_id = s.id\n AND st.bikes_available < 7\n );", "label": "correct", "unseen": false} {"case_id": "spider_q076_r3", "question_id": "spider/bike_1/170", "ds": "spider", "db": "bike_1", "question": "What are the ids of all stations that have a latitude above 37.4 and have never had less than 7 bikes available?", "evidence": "", "gold_sql": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available) < 7", "pred_sql": "SELECT DISTINCT station.id\nFROM station\nJOIN status ON station.id = status.station_id\nWHERE station.lat > 37.4\n AND status.bikes_available >= 7;", "label": "wrong", "unseen": true} {"case_id": "spider_q077_r0", "question_id": "spider/allergy_1/532", "ds": "spider", "db": "allergy_1", "question": "What are the distinct first names and cities of the students who have allergy either to milk or to cat?", "evidence": "", "gold_sql": "SELECT DISTINCT T1.fname , T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = \"Milk\" OR T2.Allergy = \"Cat\"", "pred_sql": "SELECT DISTINCT s.Fname, s.city_code\nFROM Student s\nJOIN Has_Allergy ha ON s.StuID = ha.StuID\nJOIN Allergy_Type at ON ha.Allergy = at.Allergy\nWHERE at.Allergy = 'Milk' OR at.Allergy = 'Cat';", "label": "correct", "unseen": false} {"case_id": "spider_q077_r1", "question_id": "spider/allergy_1/532", "ds": "spider", "db": "allergy_1", "question": "What are the distinct first names and cities of the students who have allergy either to milk or to cat?", "evidence": "", "gold_sql": "SELECT DISTINCT T1.fname , T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = \"Milk\" OR T2.Allergy = \"Cat\"", "pred_sql": "SELECT DISTINCT s.Fname, s.city_code\nFROM Student s\nJOIN Has_Allergy ha ON s.StuID = ha.StuID\nJOIN Allergy_Type at ON ha.Allergy = at.Allergy\nWHERE at.Allergy IN ('Milk', 'Cat');", "label": "correct", "unseen": false} {"case_id": "spider_q077_r2", "question_id": "spider/allergy_1/532", "ds": "spider", "db": "allergy_1", "question": "What are the distinct first names and cities of the students who have allergy either to milk or to cat?", "evidence": "", "gold_sql": "SELECT DISTINCT T1.fname , T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = \"Milk\" OR T2.Allergy = \"Cat\"", "pred_sql": "SELECT DISTINCT s.Fname, s.city_code\nFROM Student s\nJOIN Has_Allergy ha ON s.StuID = ha.StuID\nWHERE ha.Allergy = 'Milk' OR ha.Allergy = 'Cat';", "label": "correct", "unseen": false} {"case_id": "spider_q077_r3", "question_id": "spider/allergy_1/532", "ds": "spider", "db": "allergy_1", "question": "What are the distinct first names and cities of the students who have allergy either to milk or to cat?", "evidence": "", "gold_sql": "SELECT DISTINCT T1.fname , T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = \"Milk\" OR T2.Allergy = \"Cat\"", "pred_sql": "SELECT DISTINCT Student.Fname, Student.city_code\nFROM Student\nJOIN Has_allergy ON Student.StuID = Has_allergy.StuID\nJOIN Allergy_Type ON Has_allergy.Allergy = Allergy_Type.Allergy\nWHERE Has_allergy.Allergy = 'Milk' OR Has_allergy.Allergy = 'Cat';", "label": "correct", "unseen": false} {"case_id": "spider_q078_r0", "question_id": "spider/movie_1/2459", "ds": "spider", "db": "movie_1", "question": "What are the titles of all movies that have not been rated?", "evidence": "", "gold_sql": "SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating)", "pred_sql": "SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating);", "label": "correct", "unseen": false} {"case_id": "spider_q078_r1", "question_id": "spider/movie_1/2459", "ds": "spider", "db": "movie_1", "question": "What are the titles of all movies that have not been rated?", "evidence": "", "gold_sql": "SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating)", "pred_sql": "SELECT Movie.title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating);", "label": "correct", "unseen": false} {"case_id": "spider_q078_r2", "question_id": "spider/movie_1/2459", "ds": "spider", "db": "movie_1", "question": "What are the titles of all movies that have not been rated?", "evidence": "", "gold_sql": "SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating)", "pred_sql": "SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating);", "label": "correct", "unseen": false} {"case_id": "spider_q078_r3", "question_id": "spider/movie_1/2459", "ds": "spider", "db": "movie_1", "question": "What are the titles of all movies that have not been rated?", "evidence": "", "gold_sql": "SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating)", "pred_sql": "SELECT title\nFROM Movie\nWHERE mID NOT IN (SELECT mID FROM Rating);", "label": "correct", "unseen": false} {"case_id": "spider_q079_r0", "question_id": "spider/movie_1/2494", "ds": "spider", "db": "movie_1", "question": "How many movie reviews does each director get?", "evidence": "", "gold_sql": "SELECT count(*) , T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director", "pred_sql": "SELECT COUNT(*), Movie.director\nFROM Rating\nJOIN Movie ON Rating.mID = Movie.mID\nGROUP BY Movie.director;", "label": "correct", "unseen": false} {"case_id": "spider_q079_r1", "question_id": "spider/movie_1/2494", "ds": "spider", "db": "movie_1", "question": "How many movie reviews does each director get?", "evidence": "", "gold_sql": "SELECT count(*) , T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director", "pred_sql": "SELECT COUNT(*) AS review_count, Movie.director\nFROM Movie\nJOIN Rating ON Movie.mID = Rating.mID\nGROUP BY Movie.director;", "label": "correct", "unseen": false} {"case_id": "spider_q079_r2", "question_id": "spider/movie_1/2494", "ds": "spider", "db": "movie_1", "question": "How many movie reviews does each director get?", "evidence": "", "gold_sql": "SELECT count(*) , T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director", "pred_sql": "SELECT COUNT(*), Movie.director FROM Rating JOIN Movie ON Rating.mID = Movie.mID GROUP BY Movie.director", "label": "correct", "unseen": false} {"case_id": "spider_q079_r3", "question_id": "spider/movie_1/2494", "ds": "spider", "db": "movie_1", "question": "How many movie reviews does each director get?", "evidence": "", "gold_sql": "SELECT count(*) , T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director", "pred_sql": "SELECT Movie.director, COUNT(*) AS review_count\nFROM Rating\nJOIN Movie ON Rating.mID = Movie.mID\nGROUP BY Movie.director;", "label": "wrong", "unseen": false} {"case_id": "spider_q080_r0", "question_id": "spider/inn_1/2633", "ds": "spider", "db": "inn_1", "question": "What are the name and id of the three highest priced rooms?", "evidence": "", "gold_sql": "SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3;", "pred_sql": "SELECT roomName, RoomId FROM Rooms ORDER BY basePrice DESC LIMIT 3;", "label": "wrong", "unseen": false} {"case_id": "spider_q080_r1", "question_id": "spider/inn_1/2633", "ds": "spider", "db": "inn_1", "question": "What are the name and id of the three highest priced rooms?", "evidence": "", "gold_sql": "SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3;", "pred_sql": "SELECT roomName, RoomId FROM Rooms ORDER BY basePrice DESC LIMIT 3;", "label": "wrong", "unseen": false} {"case_id": "spider_q080_r2", "question_id": "spider/inn_1/2633", "ds": "spider", "db": "inn_1", "question": "What are the name and id of the three highest priced rooms?", "evidence": "", "gold_sql": "SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3;", "pred_sql": "SELECT roomName, RoomId FROM Rooms ORDER BY basePrice DESC LIMIT 3", "label": "wrong", "unseen": false} {"case_id": "spider_q080_r3", "question_id": "spider/inn_1/2633", "ds": "spider", "db": "inn_1", "question": "What are the name and id of the three highest priced rooms?", "evidence": "", "gold_sql": "SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3;", "pred_sql": "SELECT roomName, RoomId FROM Rooms ORDER BY basePrice DESC LIMIT 3", "label": "wrong", "unseen": false} {"case_id": "spider_q081_r0", "question_id": "spider/csu_1/2386", "ds": "spider", "db": "csu_1", "question": "What is the number of graduates in \"San Francisco State University\" in year 2004?", "evidence": "", "gold_sql": "SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = \"San Francisco State University\"", "pred_sql": "SELECT d.Graduate\nFROM discipline_enrollments d\nJOIN Campuses c ON d.Campus = c.Id\nWHERE c.Campus = 'San Francisco State University' AND d.Year = 2004;", "label": "wrong", "unseen": true} {"case_id": "spider_q081_r1", "question_id": "spider/csu_1/2386", "ds": "spider", "db": "csu_1", "question": "What is the number of graduates in \"San Francisco State University\" in year 2004?", "evidence": "", "gold_sql": "SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = \"San Francisco State University\"", "pred_sql": "SELECT de.Graduate\nFROM discipline_enrollments AS de\nJOIN Campuses AS c ON de.Campus = c.Id\nWHERE c.Campus = 'San Francisco State University' AND de.Year = 2004;", "label": "wrong", "unseen": true} {"case_id": "spider_q081_r2", "question_id": "spider/csu_1/2386", "ds": "spider", "db": "csu_1", "question": "What is the number of graduates in \"San Francisco State University\" in year 2004?", "evidence": "", "gold_sql": "SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = \"San Francisco State University\"", "pred_sql": "SELECT de.Graduate\nFROM discipline_enrollments AS de\nJOIN Campuses AS c ON de.Campus = c.Id\nWHERE c.Campus = 'San Francisco State University'\n AND de.Year = 2004;", "label": "wrong", "unseen": true} {"case_id": "spider_q081_r3", "question_id": "spider/csu_1/2386", "ds": "spider", "db": "csu_1", "question": "What is the number of graduates in \"San Francisco State University\" in year 2004?", "evidence": "", "gold_sql": "SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = \"San Francisco State University\"", "pred_sql": "SELECT de.Graduate\nFROM discipline_enrollments AS de\nJOIN Campuses AS c ON de.Campus = c.Id\nWHERE c.Campus = 'San Francisco State University' AND de.Year = 2004;", "label": "wrong", "unseen": true} {"case_id": "spider_q082_r0", "question_id": "spider/tracking_software_problems/5366", "ds": "spider", "db": "tracking_software_problems", "question": "How many problems does the product with the most problems have? List the number of the problems and product name.", "evidence": "", "gold_sql": "SELECT count(*) , T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT COUNT(*) AS problem_count, pr.product_name\nFROM Problems p\nJOIN Product pr ON p.product_id = pr.product_id\nGROUP BY p.product_id\nORDER BY problem_count DESC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "spider_q082_r1", "question_id": "spider/tracking_software_problems/5366", "ds": "spider", "db": "tracking_software_problems", "question": "How many problems does the product with the most problems have? List the number of the problems and product name.", "evidence": "", "gold_sql": "SELECT count(*) , T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT COUNT(*), p.product_name\nFROM Problems pr\nJOIN Product p ON pr.product_id = p.product_id\nGROUP BY pr.product_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "spider_q082_r2", "question_id": "spider/tracking_software_problems/5366", "ds": "spider", "db": "tracking_software_problems", "question": "How many problems does the product with the most problems have? List the number of the problems and product name.", "evidence": "", "gold_sql": "SELECT count(*) , T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT p.product_name, COUNT(*) AS problem_count\nFROM Problems pr\nJOIN Product p ON pr.product_id = p.product_id\nGROUP BY pr.product_id\nORDER BY problem_count DESC\nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "spider_q082_r3", "question_id": "spider/tracking_software_problems/5366", "ds": "spider", "db": "tracking_software_problems", "question": "How many problems does the product with the most problems have? List the number of the problems and product name.", "evidence": "", "gold_sql": "SELECT count(*) , T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT COUNT(*) AS problem_count, p.product_name\nFROM Problems pr\nJOIN Product p ON pr.product_id = p.product_id\nGROUP BY pr.product_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "spider_q083_r0", "question_id": "spider/music_4/6167", "ds": "spider", "db": "music_4", "question": "Please show the songs that have result \"nominated\" at music festivals.", "evidence": "", "gold_sql": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = \"Nominated\"", "pred_sql": "SELECT v.Song\nFROM music_festival mf\nJOIN volume v ON mf.Volume = v.Volume_ID\nWHERE mf.Result = 'Nominated';", "label": "correct", "unseen": false} {"case_id": "spider_q083_r1", "question_id": "spider/music_4/6167", "ds": "spider", "db": "music_4", "question": "Please show the songs that have result \"nominated\" at music festivals.", "evidence": "", "gold_sql": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = \"Nominated\"", "pred_sql": "SELECT v.Song\nFROM volume v\nJOIN music_festival mf ON v.Volume_ID = mf.Volume\nWHERE mf.Result = 'Nominated';", "label": "correct", "unseen": false} {"case_id": "spider_q083_r2", "question_id": "spider/music_4/6167", "ds": "spider", "db": "music_4", "question": "Please show the songs that have result \"nominated\" at music festivals.", "evidence": "", "gold_sql": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = \"Nominated\"", "pred_sql": "SELECT v.Song\nFROM music_festival mf\nJOIN volume v ON mf.Volume = v.Volume_ID\nWHERE mf.Result = 'Nominated';", "label": "correct", "unseen": false} {"case_id": "spider_q083_r3", "question_id": "spider/music_4/6167", "ds": "spider", "db": "music_4", "question": "Please show the songs that have result \"nominated\" at music festivals.", "evidence": "", "gold_sql": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = \"Nominated\"", "pred_sql": "SELECT DISTINCT v.Song\nFROM music_festival AS mf\nJOIN volume AS v ON mf.Volume = v.Volume_ID\nWHERE mf.Result = 'Nominated';", "label": "spurious", "unseen": false} {"case_id": "spider_q084_r0", "question_id": "spider/baseball_1/3644", "ds": "spider", "db": "baseball_1", "question": "Which manager won the most manager award? Give me the manager's first name, last name and id.", "evidence": "", "gold_sql": "SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1;", "pred_sql": "SELECT p.name_first, p.name_last, m.player_id\nFROM manager m\nJOIN player p ON m.player_id = p.player_id\nJOIN manager_award ma ON m.player_id = ma.player_id\nGROUP BY m.player_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "spider_q084_r1", "question_id": "spider/baseball_1/3644", "ds": "spider", "db": "baseball_1", "question": "Which manager won the most manager award? Give me the manager's first name, last name and id.", "evidence": "", "gold_sql": "SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1;", "pred_sql": "SELECT p.name_first, p.name_last, m.player_id\nFROM manager m\nJOIN player p ON m.player_id = p.player_id\nJOIN manager_award ma ON ma.player_id = m.player_id\nGROUP BY m.player_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "spider_q084_r2", "question_id": "spider/baseball_1/3644", "ds": "spider", "db": "baseball_1", "question": "Which manager won the most manager award? Give me the manager's first name, last name and id.", "evidence": "", "gold_sql": "SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1;", "pred_sql": "SELECT p.name_first, p.name_last, m.player_id\nFROM manager m\nJOIN player p ON m.player_id = p.player_id\nJOIN manager_award mawa ON m.player_id = mawa.player_id\nGROUP BY m.player_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "spider_q084_r3", "question_id": "spider/baseball_1/3644", "ds": "spider", "db": "baseball_1", "question": "Which manager won the most manager award? Give me the manager's first name, last name and id.", "evidence": "", "gold_sql": "SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1;", "pred_sql": "SELECT p.name_first, p.name_last, m.player_id\nFROM manager m\nJOIN player p ON m.player_id = p.player_id\nJOIN manager_award ma ON m.player_id = ma.player_id\nGROUP BY m.player_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "spurious", "unseen": false} {"case_id": "spider_q085_r0", "question_id": "spider/college_2/1448", "ds": "spider", "db": "college_2", "question": "Find the number and averaged salary of all instructors who are in the department with the highest budget.", "evidence": "", "gold_sql": "SELECT avg(T1.salary) , count(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1", "pred_sql": "SELECT COUNT(*), AVG(instructor.salary) FROM instructor JOIN department ON instructor.dept_name = department.dept_name WHERE department.dept_name = (SELECT dept_name FROM department ORDER BY budget DESC LIMIT 1);", "label": "wrong", "unseen": true} {"case_id": "spider_q085_r1", "question_id": "spider/college_2/1448", "ds": "spider", "db": "college_2", "question": "Find the number and averaged salary of all instructors who are in the department with the highest budget.", "evidence": "", "gold_sql": "SELECT avg(T1.salary) , count(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1", "pred_sql": "SELECT COUNT(*), AVG(salary)\nFROM instructor\nWHERE dept_name = (SELECT dept_name FROM department ORDER BY budget DESC LIMIT 1);", "label": "wrong", "unseen": true} {"case_id": "spider_q085_r2", "question_id": "spider/college_2/1448", "ds": "spider", "db": "college_2", "question": "Find the number and averaged salary of all instructors who are in the department with the highest budget.", "evidence": "", "gold_sql": "SELECT avg(T1.salary) , count(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1", "pred_sql": "SELECT COUNT(*), AVG(salary) FROM instructor WHERE dept_name = (SELECT dept_name FROM department ORDER BY budget DESC LIMIT 1);", "label": "wrong", "unseen": true} {"case_id": "spider_q085_r3", "question_id": "spider/college_2/1448", "ds": "spider", "db": "college_2", "question": "Find the number and averaged salary of all instructors who are in the department with the highest budget.", "evidence": "", "gold_sql": "SELECT avg(T1.salary) , count(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1", "pred_sql": "SELECT COUNT(*), AVG(salary) \nFROM instructor \nJOIN department ON instructor.dept_name = department.dept_name \nORDER BY department.budget DESC \nLIMIT 1;", "label": "wrong", "unseen": false} {"case_id": "spider_q086_r0", "question_id": "spider/aircraft/4838", "ds": "spider", "db": "aircraft", "question": "What is the name and age of the pilot younger than 30 who has won the most number of times?", "evidence": "", "gold_sql": "SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT p.Name, p.Age\nFROM pilot p\nJOIN match m ON m.Winning_Pilot = p.Pilot_Id\nWHERE p.Age < 30\nGROUP BY p.Pilot_Id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q086_r1", "question_id": "spider/aircraft/4838", "ds": "spider", "db": "aircraft", "question": "What is the name and age of the pilot younger than 30 who has won the most number of times?", "evidence": "", "gold_sql": "SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT p.Name, p.Age\nFROM pilot p\nJOIN match m ON p.Pilot_Id = m.Winning_Pilot\nWHERE p.Age < 30\nGROUP BY p.Pilot_Id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q086_r2", "question_id": "spider/aircraft/4838", "ds": "spider", "db": "aircraft", "question": "What is the name and age of the pilot younger than 30 who has won the most number of times?", "evidence": "", "gold_sql": "SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT p.Name, p.Age\nFROM pilot p\nJOIN match m ON m.Winning_Pilot = p.Pilot_Id\nWHERE p.Age < 30\nGROUP BY p.Pilot_Id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q086_r3", "question_id": "spider/aircraft/4838", "ds": "spider", "db": "aircraft", "question": "What is the name and age of the pilot younger than 30 who has won the most number of times?", "evidence": "", "gold_sql": "SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT p.Name, p.Age\nFROM pilot p\nJOIN match m ON p.Pilot_Id = m.Winning_Pilot\nWHERE p.Age < 30\nGROUP BY p.Pilot_Id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q087_r0", "question_id": "spider/cre_Doc_Tracking_DB/4211", "ds": "spider", "db": "cre_Doc_Tracking_DB", "question": "What is the role with the smallest number of employees? Find the role codes.", "evidence": "", "gold_sql": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1", "pred_sql": "SELECT Role_Code\nFROM Employees\nGROUP BY Role_Code\nORDER BY COUNT(*) ASC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q087_r1", "question_id": "spider/cre_Doc_Tracking_DB/4211", "ds": "spider", "db": "cre_Doc_Tracking_DB", "question": "What is the role with the smallest number of employees? Find the role codes.", "evidence": "", "gold_sql": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1", "pred_sql": "SELECT Role_Code\nFROM Employees\nGROUP BY Role_Code\nORDER BY COUNT(*) ASC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q087_r2", "question_id": "spider/cre_Doc_Tracking_DB/4211", "ds": "spider", "db": "cre_Doc_Tracking_DB", "question": "What is the role with the smallest number of employees? Find the role codes.", "evidence": "", "gold_sql": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1", "pred_sql": "SELECT Role_Code\nFROM Employees\nGROUP BY Role_Code\nORDER BY COUNT(*) ASC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q087_r3", "question_id": "spider/cre_Doc_Tracking_DB/4211", "ds": "spider", "db": "cre_Doc_Tracking_DB", "question": "What is the role with the smallest number of employees? Find the role codes.", "evidence": "", "gold_sql": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1", "pred_sql": "SELECT Role_Code\nFROM Employees\nGROUP BY Role_Code\nORDER BY COUNT(*) ASC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q088_r0", "question_id": "spider/hr_1/3487", "ds": "spider", "db": "hr_1", "question": "What are the unique ids of those departments where any manager is managing 4 or more employees.", "evidence": "", "gold_sql": "SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 4", "pred_sql": "SELECT DISTINCT e.department_id\nFROM employees e\nGROUP BY e.department_id\nHAVING COUNT(*) >= 4;", "label": "spurious", "unseen": false} {"case_id": "spider_q088_r1", "question_id": "spider/hr_1/3487", "ds": "spider", "db": "hr_1", "question": "What are the unique ids of those departments where any manager is managing 4 or more employees.", "evidence": "", "gold_sql": "SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 4", "pred_sql": "SELECT DISTINCT e.DEPARTMENT_ID\nFROM employees e\nGROUP BY e.DEPARTMENT_ID\nHAVING COUNT(*) >= 4;", "label": "spurious", "unseen": false} {"case_id": "spider_q088_r2", "question_id": "spider/hr_1/3487", "ds": "spider", "db": "hr_1", "question": "What are the unique ids of those departments where any manager is managing 4 or more employees.", "evidence": "", "gold_sql": "SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 4", "pred_sql": "SELECT department_id\nFROM employees\nGROUP BY department_id\nHAVING COUNT(*) >= 4;", "label": "spurious", "unseen": false} {"case_id": "spider_q088_r3", "question_id": "spider/hr_1/3487", "ds": "spider", "db": "hr_1", "question": "What are the unique ids of those departments where any manager is managing 4 or more employees.", "evidence": "", "gold_sql": "SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 4", "pred_sql": "SELECT DISTINCT d.department_id\nFROM departments d\nJOIN employees e ON d.department_id = e.department_id\nGROUP BY d.department_id\nHAVING COUNT(*) >= 4;", "label": "spurious", "unseen": false} {"case_id": "spider_q089_r0", "question_id": "spider/manufactory_1/5276", "ds": "spider", "db": "manufactory_1", "question": "Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.", "evidence": "", "gold_sql": "SELECT name , headquarter FROM manufacturers ORDER BY revenue DESC", "pred_sql": "SELECT Name, Headquarter\nFROM Manufacturers\nORDER BY Revenue DESC;", "label": "correct", "unseen": false} {"case_id": "spider_q089_r1", "question_id": "spider/manufactory_1/5276", "ds": "spider", "db": "manufactory_1", "question": "Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.", "evidence": "", "gold_sql": "SELECT name , headquarter FROM manufacturers ORDER BY revenue DESC", "pred_sql": "SELECT Name, Headquarter\nFROM Manufacturers\nORDER BY Revenue DESC;", "label": "correct", "unseen": false} {"case_id": "spider_q089_r2", "question_id": "spider/manufactory_1/5276", "ds": "spider", "db": "manufactory_1", "question": "Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.", "evidence": "", "gold_sql": "SELECT name , headquarter FROM manufacturers ORDER BY revenue DESC", "pred_sql": "SELECT Manufacturers.Name, Manufacturers.Headquarter\nFROM Manufacturers\nORDER BY Manufacturers.Revenue DESC;", "label": "correct", "unseen": false} {"case_id": "spider_q089_r3", "question_id": "spider/manufactory_1/5276", "ds": "spider", "db": "manufactory_1", "question": "Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.", "evidence": "", "gold_sql": "SELECT name , headquarter FROM manufacturers ORDER BY revenue DESC", "pred_sql": "SELECT \"Manufacturers\".Name, \"Manufacturers\".Headquarter\nFROM \"Manufacturers\"\nORDER BY \"Manufacturers\".Revenue DESC;", "label": "correct", "unseen": false} {"case_id": "spider_q090_r0", "question_id": "spider/gymnast/1768", "ds": "spider", "db": "gymnast", "question": "List the distinct hometowns that are not associated with any gymnast.", "evidence": "", "gold_sql": "SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "pred_sql": "SELECT DISTINCT Hometown\nFROM people\nEXCEPT\nSELECT p.Hometown\nFROM people p\nJOIN gymnast g ON p.People_ID = g.Gymnast_ID;", "label": "correct", "unseen": false} {"case_id": "spider_q090_r1", "question_id": "spider/gymnast/1768", "ds": "spider", "db": "gymnast", "question": "List the distinct hometowns that are not associated with any gymnast.", "evidence": "", "gold_sql": "SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "pred_sql": "SELECT DISTINCT Hometown\nFROM people\nWHERE People_ID NOT IN (\n SELECT Gymnast_ID\n FROM gymnast\n);", "label": "wrong", "unseen": true} {"case_id": "spider_q090_r2", "question_id": "spider/gymnast/1768", "ds": "spider", "db": "gymnast", "question": "List the distinct hometowns that are not associated with any gymnast.", "evidence": "", "gold_sql": "SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "pred_sql": "SELECT DISTINCT p.Hometown\nFROM people p\nWHERE p.People_ID NOT IN (SELECT g.Gymnast_ID FROM gymnast g);", "label": "wrong", "unseen": true} {"case_id": "spider_q090_r3", "question_id": "spider/gymnast/1768", "ds": "spider", "db": "gymnast", "question": "List the distinct hometowns that are not associated with any gymnast.", "evidence": "", "gold_sql": "SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "pred_sql": "SELECT DISTINCT p.Hometown\nFROM people p\nWHERE p.People_ID NOT IN (\n SELECT g.Gymnast_ID\n FROM gymnast g\n);", "label": "wrong", "unseen": true} {"case_id": "spider_q091_r0", "question_id": "spider/chinook_1/840", "ds": "spider", "db": "chinook_1", "question": "What are the titles and ids for albums containing tracks with unit price greater than 1?", "evidence": "", "gold_sql": "SELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID", "pred_sql": "SELECT Album.Title, Album.AlbumId\nFROM Album\nJOIN Track ON Album.AlbumId = Track.AlbumId\nWHERE Track.UnitPrice > 1;", "label": "wrong", "unseen": false} {"case_id": "spider_q091_r1", "question_id": "spider/chinook_1/840", "ds": "spider", "db": "chinook_1", "question": "What are the titles and ids for albums containing tracks with unit price greater than 1?", "evidence": "", "gold_sql": "SELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID", "pred_sql": "SELECT DISTINCT Album.Title, Album.AlbumId\nFROM Album\nJOIN Track ON Album.AlbumId = Track.AlbumId\nWHERE Track.UnitPrice > 1;", "label": "correct", "unseen": false} {"case_id": "spider_q091_r2", "question_id": "spider/chinook_1/840", "ds": "spider", "db": "chinook_1", "question": "What are the titles and ids for albums containing tracks with unit price greater than 1?", "evidence": "", "gold_sql": "SELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID", "pred_sql": "SELECT Album.Title, Album.AlbumId\nFROM Album\nJOIN Track ON Album.AlbumId = Track.AlbumId\nWHERE Track.UnitPrice > 1;", "label": "wrong", "unseen": false} {"case_id": "spider_q091_r3", "question_id": "spider/chinook_1/840", "ds": "spider", "db": "chinook_1", "question": "What are the titles and ids for albums containing tracks with unit price greater than 1?", "evidence": "", "gold_sql": "SELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID", "pred_sql": "SELECT Album.Title, Album.AlbumId\nFROM Album\nJOIN Track ON Album.AlbumId = Track.AlbumId\nWHERE Track.UnitPrice > 1;", "label": "wrong", "unseen": false} {"case_id": "spider_q092_r0", "question_id": "spider/baseball_1/3709", "ds": "spider", "db": "baseball_1", "question": "Which park had most attendances in 2008?", "evidence": "", "gold_sql": "SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1;", "pred_sql": "SELECT park.park_name\nFROM home_game\nJOIN park ON home_game.park_id = park.park_id\nWHERE home_game.year = 2008\nORDER BY home_game.attendance DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q092_r1", "question_id": "spider/baseball_1/3709", "ds": "spider", "db": "baseball_1", "question": "Which park had most attendances in 2008?", "evidence": "", "gold_sql": "SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1;", "pred_sql": "SELECT park.park_name\nFROM home_game\nJOIN park ON home_game.park_id = park.park_id\nWHERE home_game.year = 2008\nORDER BY home_game.attendance DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q092_r2", "question_id": "spider/baseball_1/3709", "ds": "spider", "db": "baseball_1", "question": "Which park had most attendances in 2008?", "evidence": "", "gold_sql": "SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1;", "pred_sql": "SELECT t.park\nFROM team t\nWHERE t.year = 2008\nORDER BY t.attendance DESC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q092_r3", "question_id": "spider/baseball_1/3709", "ds": "spider", "db": "baseball_1", "question": "Which park had most attendances in 2008?", "evidence": "", "gold_sql": "SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1;", "pred_sql": "SELECT park.park_name\nFROM home_game\nJOIN park ON home_game.park_id = park.park_id\nWHERE home_game.year = 2008\nORDER BY home_game.attendance DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q093_r0", "question_id": "spider/soccer_2/5041", "ds": "spider", "db": "soccer_2", "question": "What are the names of the colleges that are larger than at least one college in Florida?", "evidence": "", "gold_sql": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL')", "pred_sql": "SELECT cName\nFROM College\nWHERE enr > (\n SELECT MIN(enr)\n FROM College\n WHERE state = 'FL'\n);", "label": "correct", "unseen": false} {"case_id": "spider_q093_r1", "question_id": "spider/soccer_2/5041", "ds": "spider", "db": "soccer_2", "question": "What are the names of the colleges that are larger than at least one college in Florida?", "evidence": "", "gold_sql": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL')", "pred_sql": "SELECT cName\nFROM College\nWHERE enr > (SELECT MIN(enr) FROM College WHERE state = 'FL');", "label": "correct", "unseen": false} {"case_id": "spider_q093_r2", "question_id": "spider/soccer_2/5041", "ds": "spider", "db": "soccer_2", "question": "What are the names of the colleges that are larger than at least one college in Florida?", "evidence": "", "gold_sql": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL')", "pred_sql": "SELECT cName FROM College WHERE enr > (SELECT MIN(enr) FROM College WHERE state = 'FL');", "label": "correct", "unseen": false} {"case_id": "spider_q093_r3", "question_id": "spider/soccer_2/5041", "ds": "spider", "db": "soccer_2", "question": "What are the names of the colleges that are larger than at least one college in Florida?", "evidence": "", "gold_sql": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL')", "pred_sql": "SELECT cName FROM College WHERE enr > (SELECT MAX(enr) FROM College WHERE state = 'FL');", "label": "spurious", "unseen": false} {"case_id": "spider_q094_r0", "question_id": "spider/geo/7495", "ds": "spider", "db": "geo", "question": "how many major cities are in states bordering nebraska", "evidence": "", "gold_sql": "SELECT COUNT ( city_name ) FROM city WHERE population > 150000 AND state_name IN ( SELECT border FROM border_info WHERE state_name = \"nebraska\" );", "pred_sql": "SELECT COUNT(*)\nFROM city\nJOIN border_info ON city.state_name = border_info.state_name\nWHERE border_info.state_name = 'NE';", "label": "spurious", "unseen": true} {"case_id": "spider_q094_r1", "question_id": "spider/geo/7495", "ds": "spider", "db": "geo", "question": "how many major cities are in states bordering nebraska", "evidence": "", "gold_sql": "SELECT COUNT ( city_name ) FROM city WHERE population > 150000 AND state_name IN ( SELECT border FROM border_info WHERE state_name = \"nebraska\" );", "pred_sql": "SELECT COUNT(*) FROM city JOIN border_info ON city.state_name = border_info.state_name WHERE border_info.state_name = 'Nebraska';", "label": "spurious", "unseen": false} {"case_id": "spider_q094_r2", "question_id": "spider/geo/7495", "ds": "spider", "db": "geo", "question": "how many major cities are in states bordering nebraska", "evidence": "", "gold_sql": "SELECT COUNT ( city_name ) FROM city WHERE population > 150000 AND state_name IN ( SELECT border FROM border_info WHERE state_name = \"nebraska\" );", "pred_sql": "SELECT COUNT(*) FROM city AS c\nJOIN border_info AS bi ON c.state_name = bi.state_name\nWHERE bi.state_name = 'Nebraska';", "label": "spurious", "unseen": false} {"case_id": "spider_q094_r3", "question_id": "spider/geo/7495", "ds": "spider", "db": "geo", "question": "how many major cities are in states bordering nebraska", "evidence": "", "gold_sql": "SELECT COUNT ( city_name ) FROM city WHERE population > 150000 AND state_name IN ( SELECT border FROM border_info WHERE state_name = \"nebraska\" );", "pred_sql": "SELECT COUNT(*) FROM city JOIN border_info ON city.state_name = border_info.state_name JOIN state ON border_info.state_name = state.state_name WHERE state.state_name = 'NE';", "label": "spurious", "unseen": true} {"case_id": "spider_q095_r0", "question_id": "spider/college_1/3229", "ds": "spider", "db": "college_1", "question": "How many courses are offered?", "evidence": "", "gold_sql": "SELECT count(DISTINCT crs_code) FROM CLASS", "pred_sql": "SELECT COUNT(*) FROM COURSE;", "label": "spurious", "unseen": false} {"case_id": "spider_q095_r1", "question_id": "spider/college_1/3229", "ds": "spider", "db": "college_1", "question": "How many courses are offered?", "evidence": "", "gold_sql": "SELECT count(DISTINCT crs_code) FROM CLASS", "pred_sql": "SELECT COUNT(*) FROM COURSE;", "label": "spurious", "unseen": false} {"case_id": "spider_q095_r2", "question_id": "spider/college_1/3229", "ds": "spider", "db": "college_1", "question": "How many courses are offered?", "evidence": "", "gold_sql": "SELECT count(DISTINCT crs_code) FROM CLASS", "pred_sql": "SELECT COUNT(*) FROM COURSE;", "label": "spurious", "unseen": false} {"case_id": "spider_q095_r3", "question_id": "spider/college_1/3229", "ds": "spider", "db": "college_1", "question": "How many courses are offered?", "evidence": "", "gold_sql": "SELECT count(DISTINCT crs_code) FROM CLASS", "pred_sql": "SELECT COUNT(*) FROM COURSE;", "label": "spurious", "unseen": false} {"case_id": "spider_q096_r0", "question_id": "spider/customers_card_transactions/681", "ds": "spider", "db": "customers_card_transactions", "question": "What is the customer first, last name and id with least number of accounts.", "evidence": "", "gold_sql": "SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1", "pred_sql": "SELECT c.customer_first_name, c.customer_last_name, c.customer_id\nFROM Customers c\nJOIN Accounts a ON c.customer_id = a.customer_id\nGROUP BY c.customer_id\nORDER BY COUNT(a.account_id) ASC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q096_r1", "question_id": "spider/customers_card_transactions/681", "ds": "spider", "db": "customers_card_transactions", "question": "What is the customer first, last name and id with least number of accounts.", "evidence": "", "gold_sql": "SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1", "pred_sql": "SELECT c.customer_first_name, c.customer_last_name, c.customer_id\nFROM Customers c\nORDER BY (SELECT COUNT(*) FROM Accounts a WHERE a.customer_id = c.customer_id) ASC\nLIMIT 1;", "label": "wrong", "unseen": true} {"case_id": "spider_q096_r2", "question_id": "spider/customers_card_transactions/681", "ds": "spider", "db": "customers_card_transactions", "question": "What is the customer first, last name and id with least number of accounts.", "evidence": "", "gold_sql": "SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1", "pred_sql": "SELECT c.customer_first_name, c.customer_last_name, c.customer_id\nFROM Customers c\nJOIN Accounts a ON c.customer_id = a.customer_id\nGROUP BY c.customer_id\nORDER BY COUNT(*) ASC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q096_r3", "question_id": "spider/customers_card_transactions/681", "ds": "spider", "db": "customers_card_transactions", "question": "What is the customer first, last name and id with least number of accounts.", "evidence": "", "gold_sql": "SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1", "pred_sql": "SELECT c.customer_first_name, c.customer_last_name, c.customer_id\nFROM Customers c\nJOIN Accounts a ON c.customer_id = a.customer_id\nGROUP BY c.customer_id\nORDER BY COUNT(a.account_id) ASC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q097_r0", "question_id": "spider/customers_campaigns_ecommerce/4629", "ds": "spider", "db": "customers_campaigns_ecommerce", "question": "Show the names of customers who have the most mailshots.", "evidence": "", "gold_sql": "SELECT T2.customer_name FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT c.customer_name\nFROM Customers c\nJOIN Mailshot_Customers msc ON c.customer_id = msc.customer_id\nGROUP BY c.customer_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q097_r1", "question_id": "spider/customers_campaigns_ecommerce/4629", "ds": "spider", "db": "customers_campaigns_ecommerce", "question": "Show the names of customers who have the most mailshots.", "evidence": "", "gold_sql": "SELECT T2.customer_name FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT c.customer_name\nFROM Customers c\nJOIN Mailshot_Customers msc ON c.customer_id = msc.customer_id\nGROUP BY c.customer_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q097_r2", "question_id": "spider/customers_campaigns_ecommerce/4629", "ds": "spider", "db": "customers_campaigns_ecommerce", "question": "Show the names of customers who have the most mailshots.", "evidence": "", "gold_sql": "SELECT T2.customer_name FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT c.customer_name\nFROM Customers c\nJOIN Mailshot_Customers msc ON c.customer_id = msc.customer_id\nGROUP BY c.customer_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q097_r3", "question_id": "spider/customers_campaigns_ecommerce/4629", "ds": "spider", "db": "customers_campaigns_ecommerce", "question": "Show the names of customers who have the most mailshots.", "evidence": "", "gold_sql": "SELECT T2.customer_name FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "pred_sql": "SELECT c.customer_name\nFROM Customers c\nJOIN Mailshot_Customers msc ON c.customer_id = msc.customer_id\nGROUP BY c.customer_id\nORDER BY COUNT(*) DESC\nLIMIT 1;", "label": "correct", "unseen": false} {"case_id": "spider_q098_r0", "question_id": "spider/hr_1/3510", "ds": "spider", "db": "hr_1", "question": "What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN?", "evidence": "", "gold_sql": "SELECT employee_id , first_name , last_name , job_id FROM employees WHERE salary > ( SELECT max(salary) FROM employees WHERE job_id = 'PU_MAN' )", "pred_sql": "SELECT employee_id, first_name, last_name, job_id\nFROM employees\nWHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN');", "label": "correct", "unseen": false} {"case_id": "spider_q098_r1", "question_id": "spider/hr_1/3510", "ds": "spider", "db": "hr_1", "question": "What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN?", "evidence": "", "gold_sql": "SELECT employee_id , first_name , last_name , job_id FROM employees WHERE salary > ( SELECT max(salary) FROM employees WHERE job_id = 'PU_MAN' )", "pred_sql": "SELECT e.EMPLOYEE_ID, e.FIRST_NAME, e.LAST_NAME, e.JOB_ID\nFROM employees e\nJOIN jobs j ON e.JOB_ID = j.JOB_ID\nWHERE e.SALARY > (\n SELECT MAX(e2.SALARY)\n FROM employees e2\n JOIN jobs j2 ON e2.JOB_ID = j2.JOB_ID\n WHERE j2.JOB_ID = 'PU_MAN'\n);", "label": "correct", "unseen": true} {"case_id": "spider_q098_r2", "question_id": "spider/hr_1/3510", "ds": "spider", "db": "hr_1", "question": "What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN?", "evidence": "", "gold_sql": "SELECT employee_id , first_name , last_name , job_id FROM employees WHERE salary > ( SELECT max(salary) FROM employees WHERE job_id = 'PU_MAN' )", "pred_sql": "SELECT e.EMPLOYEE_ID, e.FIRST_NAME, e.LAST_NAME, e.JOB_ID\nFROM employees e\nWHERE e.salary > (\n SELECT MAX(e2.salary)\n FROM employees e2\n JOIN jobs j ON e2.job_id = j.job_id\n WHERE j.job_title = 'PU_MAN'\n);", "label": "wrong", "unseen": true} {"case_id": "spider_q098_r3", "question_id": "spider/hr_1/3510", "ds": "spider", "db": "hr_1", "question": "What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN?", "evidence": "", "gold_sql": "SELECT employee_id , first_name , last_name , job_id FROM employees WHERE salary > ( SELECT max(salary) FROM employees WHERE job_id = 'PU_MAN' )", "pred_sql": "SELECT e.EMPLOYEE_ID, e.FIRST_NAME, e.LAST_NAME, e.JOB_ID\nFROM employees e\nWHERE e.SALARY > (\n SELECT MAX(e2.SALARY)\n FROM employees e2\n WHERE e2.JOB_ID = 'PU_MAN'\n);", "label": "correct", "unseen": false} {"case_id": "spider_q099_r0", "question_id": "spider/hr_1/3480", "ds": "spider", "db": "hr_1", "question": "What are the names of departments that have at least one employee.", "evidence": "", "gold_sql": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "pred_sql": "SELECT DISTINCT d.department_name\nFROM departments d\nJOIN employees e ON d.department_id = e.department_id;", "label": "correct", "unseen": false} {"case_id": "spider_q099_r1", "question_id": "spider/hr_1/3480", "ds": "spider", "db": "hr_1", "question": "What are the names of departments that have at least one employee.", "evidence": "", "gold_sql": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "pred_sql": "SELECT DISTINCT d.department_name\nFROM departments d\nJOIN employees e ON e.department_id = d.department_id;", "label": "correct", "unseen": false} {"case_id": "spider_q099_r2", "question_id": "spider/hr_1/3480", "ds": "spider", "db": "hr_1", "question": "What are the names of departments that have at least one employee.", "evidence": "", "gold_sql": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "pred_sql": "SELECT DISTINCT departments.DEPARTMENT_NAME\nFROM departments\nJOIN employees ON departments.DEPARTMENT_ID = employees.DEPARTMENT_ID;", "label": "correct", "unseen": false} {"case_id": "spider_q099_r3", "question_id": "spider/hr_1/3480", "ds": "spider", "db": "hr_1", "question": "What are the names of departments that have at least one employee.", "evidence": "", "gold_sql": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "pred_sql": "SELECT DISTINCT d.department_name\nFROM departments d\nJOIN employees e ON d.department_id = e.department_id;", "label": "correct", "unseen": false}