Chinastark/bird_dataset huggingface dataset:
Database: soccer_2016
Note: When refers to match_date; youngest player refers to max(dob); first match refers to min(match_date);
Question: When and for what role did the youngest player appear in his first match?
SQL: SELECT match.match_date, rolee.role_desc FROM `match` INNER JOIN player_match ON match.match_id = player_match.match_id INNER JOIN player ON player_match.player_id = player.player_id INNER JOIN rolee ON player_match.role_id = rolee.role_id ORDER BY player.dob DESC LIMIT 1
Database: soccer_2016
Question: Tally the match IDs in which V Kohli is the "Man of the Match".
SQL: SELECT match.match_id FROM `match` INNER JOIN player ON match.man_of_the_match = player.player_id WHERE player.player_name = 'V Kohli'
Database: soccer_2016
Note: From 2011 to 2012 refers to match_date between '2011%' and '2012%'; Australian players refers to country_name = 'Australia';
Question: From 2011 to 2012, how many Australian players became the "Man of the Match"?
SQL: SELECT sum(CASE WHEN match.match_date BETWEEN '2011%' AND '2012%' THEN 1 ELSE 0 END) FROM `match` INNER JOIN player ON player.player_id = match.man_of_the_match INNER JOIN country ON country.country_id = player.country_name WHERE country.country_name = 'Australia'
Database: soccer_2016
Note: Who refers to player_name;
Question: Who among the players won both "Man of the Series" and "Orange Cap" in the same season?
SQL: SELECT player.player_name FROM player INNER JOIN season ON player.player_id = season.man_of_the_series = season.orange_cap
Database: soccer_2016
Note: Sunrisers Hyderabad refers to team_name = 'Sunrisers Hyderabad'; win their first match refers to match_winner and min(match_date);
Question: When did the Sunrisers Hyderabad win their first match?
SQL: SELECT match.match_date FROM `match` INNER JOIN team ON match.match_winner = team.team_id WHERE team.team_name = 'Sunrisers Hyderabad'
Database: soccer_2016
Note: English umpires refers to country_name = 'England';
Question: Write down the player names and IDs of the English umpires.
SQL: SELECT umpire.umpire_name, umpire.umpire_id FROM umpire INNER JOIN country ON umpire.umpire_country = country.country_id WHERE country.country_name = 'England'
Database: soccer_2016
Note: 4/18/2008 refers to match_date = 4/18/2008; end of 17 overs refers to count(toss_name = 'field' ) = 17; run rate = divide(sum(runs_scored) when toss_name = 'bat', sum(over_id) when toss_name = 'field');
Question: Calculate the run rate at the end of 17 overs of the match ID 335987 on 4/18/2008.
SQL: SELECT cast(count(CASE WHEN toss_decision.toss_name = 'bat' THEN batsman_scored.runs_scored ELSE NULL END) AS REAL) / sum(CASE WHEN toss_decision.toss_name = 'field' THEN 1 ELSE 0 END) FROM toss_decision INNER JOIN MATCH ON toss_decision.toss_id = MATCH.toss_decide INNER JOIN batsman_scored ON MATCH.match_id = batsman_scored.match_id WHERE MATCH.match_id = 335987 AND MATCH.match_date = '2008-04-18' GROUP BY batsman_scored.over_id HAVING count(toss_decision.toss_name = 'field') = 17
Database: soccer_2016
Note: end of 16 overs refers to count(toss_name = 'field' ) = 16; run rate = divide(count(runs_scored) when toss_name = 'bat', sum(over_id)when toss_name = 'field'); name refers to player_name;
Question: Compute the run rate at the end of 16 overs of the match ID 335999. Please include the name of the "Man of_the Match".
SQL: SELECT cast(count(CASE WHEN toss_decision.toss_name = 'bat' THEN batsman_scored.runs_scored ELSE NULL END) AS REAL) / sum(CASE WHEN toss_decision.toss_name = 'field' THEN 1 ELSE 0 END) FROM toss_decision INNER JOIN MATCH ON toss_decision.toss_id = MATCH.toss_decide INNER JOIN batsman_scored ON MATCH.match_id = batsman_scored.match_id WHERE MATCH.match_id = 335987 AND MATCH.match_date = '2008-04-18' GROUP BY batsman_scored.over_id HAVING count(toss_decision.toss_name = 'field') = 16
Database: soccer_2016
Note: id of the team refers to team_id; highest number of matches won refers to max(count(match_winner));
Question: What is the id of the team with the highest number of matches won?
SQL: SELECT match_id FROM `match` ORDER BY match_winner DESC LIMIT 1
Database: soccer_2016
Note: year refers to dob; majority of the players refers to max(count(player_id));
Question: Which year do the majority of the players were born?
SQL: SELECT dob FROM player GROUP BY dob ORDER BY count(dob) DESC LIMIT 1
Database: soccer_2016
Note: date of the match refers to match_date; highest wager refers to max(win_margin);
Question: What is the date of the match that has the highest wager on the final result of a game?
SQL: SELECT match_date FROM `match` ORDER BY win_margin DESC LIMIT 1
Database: soccer_2016
Note: fewest number of matches refers to min(count(match_id));
Question: Which season has the fewest number of matches?
SQL: SELECT season_id FROM `match` GROUP BY season_id ORDER BY count(match_id) LIMIT 1
Database: soccer_2016
Note: won at least 5 man of the match awards refers to COUNT(match_id) >= 5;
Question: How many players have won at least 5 man of the match awards?
SQL: SELECT count(match_id) FROM `match` GROUP BY man_of_the_match HAVING count(match_id) >= 5
Database: soccer_2016
Note: Who refers to player_name; last match of season 9 refers to max(match_date) where season_id = 9;
Question: Who is the player who received the man of the match award during the last match of Season 9?
SQL: SELECT player.player_name FROM player INNER JOIN MATCH ON player.player_id = MATCH.man_of_the_match WHERE MATCH.season_id = 9 ORDER BY MATCH.match_date DESC LIMIT 1
Database: soccer_2016
Note: name of the team refers to team_name; won the first ever match refers to match_winner where max(match_date);
Question: What is the name of the team that won the first ever match?
SQL: SELECT team.team_name FROM team INNER JOIN MATCH ON team.team_id = MATCH.match_winner WHERE MATCH.season_id = 1 ORDER BY MATCH.match_date LIMIT 1
Database: soccer_2016
Note: U.A.E refers to country_name = 'U.A.E';
Question: How many cities are in U.A.E?
SQL: SELECT sum(CASE WHEN country.country_name = 'U.A.E' THEN 1 ELSE 0 END) FROM city INNER JOIN country ON city.country_id = country.country_id
Database: soccer_2016
Note: from England refers to country_name = 'England';
Question: List the names of all the umpires from England.
SQL: SELECT umpire.umpire_name FROM umpire INNER JOIN country ON country.country_id = umpire.umpire_country WHERE country.country_name = 'England'
Database: soccer_2016
Note: legbreak style refers to bowling_skill = 'Legbreak';
Question: How many players bowl in the legbreak style?
SQL: SELECT player.player_name FROM player INNER JOIN bowling_style ON player.bowling_skill = bowling_style.bowling_id WHERE bowling_style.bowling_skill = 'Legbreak'
Database: soccer_2016
Note: season 8 refers to season_id = 8;
Question: How many matches did Rajasthan Royals play in Season 8?
SQL: SELECT sum(CASE WHEN match.season_id = 8 THEN 1 ELSE 0 END) FROM `match` INNER JOIN team ON match.team_1 = team.team_id OR match.team_2 = team.team_id WHERE team.team_name = 'Rajasthan Royals'
Database: soccer_2016
Note: country refers to country_name;
Question: Which country is umpire TH Wijewardene from?
SQL: SELECT country.country_name FROM umpire INNER JOIN country ON country.country_id = umpire.umpire_country WHERE umpire.umpire_name = 'TH Wijewardene'
Database: soccer_2016
Note: names of the venues refers to venue_name; Abu Dhabi refers to city_name = 'Abu Dhabi';
Question: What are the names of the venues in Abu Dhabi?
SQL: SELECT venue.venue_name FROM venue INNER JOIN city ON venue.city_id = city.city_id WHERE city.city_name = 'Abu Dhabi'
Database: soccer_2016
Note: country refers to country_name; youngest player refers to max(dob);
Question: Which country is the youngest player from?
SQL: SELECT country.country_name FROM country INNER JOIN player ON country.country_id = player.country_name ORDER BY player.dob DESC LIMIT 1
Database: soccer_2016
Note: names refers to player_name; winning team's refers to match_winner; first match of season 1 refers to season_id = 1 and min(match_date);
Question: List all the names of the winning team's players in the first match of season 1.
SQL: SELECT player.player_name FROM `match` INNER JOIN player_match ON match.match_winner = player_match.team_id INNER JOIN player ON player_match.player_id = player.player_id WHERE match.season_id = 1 ORDER BY match.match_date LIMIT 1
Database: soccer_2016
Note: Who refers to player_name; youngest player to have won the Purple Cap refers to min(subtract(season_year, dob));
Question: Who is the youngest player to have won the Purple Cap?
SQL: SELECT player.player_name FROM player INNER JOIN season ON player.player_id = season.purple_cap ORDER BY season.season_year - substr(player.dob, 1, 4) LIMIT 1
Database: soccer_2016
Note: name of the venue, city and country refers to venue_name and city_name and country_name; last match refers to max(match_date);
Question: Provide the complete name of the venue, city and country where the last match was held.
SQL: SELECT venue.venue_name, city.city_name, country.country_name FROM venue INNER JOIN city ON venue.city_id = city.city_id INNER JOIN country ON city.country_id = country.country_id INNER JOIN MATCH ON venue.venue_id = MATCH.venue_id ORDER BY MATCH.match_date DESC LIMIT 1
Database: soccer_2016
Question: How many overs were there in each innings of match ID "336011"?
SQL: SELECT sum(CASE WHEN innings_no = 1 THEN 1 ELSE 0 END) AS in1 , sum(CASE WHEN innings_no = 2 THEN 1 ELSE 0 END) AS in2 FROM ball_by_ball WHERE match_id = 336011
Database: soccer_2016
Note: innings numbers refers to innings_no;
Question: List the ball IDs, scores, and innings numbers in the over ID 20 of match ID "335988".
SQL: SELECT ball_id, runs_scored, innings_no FROM batsman_scored WHERE match_id = 335988 AND over_id = 20
Database: soccer_2016
Note: held in 2011 refers to match_date like '2011%';
Question: How many matches were held in 2011?
SQL: SELECT count(match_id) FROM `match` WHERE match_date LIKE '2011%'
Database: soccer_2016
Note: old refers to SUBTRACT(2022, SUBSTR(dob, 1, 4)); Ishan Kishan refers to player_name = 'Ishan Kishan';
Question: How old is Ishan Kishan in 2022?
SQL: SELECT 2022 - substr(dob, 1, 4) FROM player WHERE player_name = 'Ishan Kishan'
Database: soccer_2016
Note: in 2012 refers to match_date like '2012%'; win rate refers to DIVIDE(COUNT(toss_winner = match_winner), COUNT(match_date like '2012%'));
Question: Calculate the win rate of the toss-winners in 2012.
SQL: SELECT cast(sum(CASE WHEN toss_winner = match_winner THEN 1 ELSE 0 END) AS REAL) / sum(CASE WHEN match_date LIKE '2012%' THEN 1 ELSE 0 END) FROM `match`
Database: soccer_2016
Note: in 2009 refers to match_date like '2009%'; win margins of less than 10 refers to win_margin < 10;
Question: How many matches in 2009 had win margins of less than 10?
SQL: SELECT count(match_id) FROM `match` WHERE match_date LIKE '2009%' AND win_margin < 10
Database: soccer_2016
Note: held in June 2014 refers to SUBSTR(match_date, 7, 1) = 6 and SUBSTR(match_date, 1, 4) = 2014;
Question: Provide the players' names in both teams of the match that was held in June 2014.
SQL: SELECT player.player_name FROM player INNER JOIN player_match ON player.player_id = player_match.player_id INNER JOIN MATCH ON player_match.match_id = MATCH.match_id WHERE substr(MATCH.match_date, 1, 4) = '2014' AND substr(MATCH.match_date, 7, 1) = '6' LIMIT 2
Database: soccer_2016
Note: Mohammad Hafeez refers to player_name = 'Mohammad Hafeez';
Question: How many matches did Mohammad Hafeez play?
SQL: SELECT sum(CASE WHEN player.player_name = 'Mohammad Hafeez' THEN 1 ELSE 0 END) FROM player_match INNER JOIN player ON player_match.player_id = player.player_id
Database: soccer_2016
Note: from South Africa refers to country_name = 'South Africa'; born in 1984 refers to dob like '1984%';
Question: Among the players from South Africa, provide the players' names who were born in 1984.
SQL: SELECT player.player_name FROM player INNER JOIN country ON player.country_name = country.country_id WHERE country.country_name = 'South Africa' AND player.dob LIKE '1984%'
Database: soccer_2016
Note: played in 2009 match_date like '2009%'; Mumbai Indians" team refers to team_name = 'Mumbai Indians'; percent of the matches did they win refers to DIVIDE(COUNT(match_winner = team_id), COUNT(match_id));
Question: Among the" Mumbai Indians" team that played in 2009, how many percent of the matches did they win?
SQL: SELECT cast(sum(CASE WHEN match.match_winner = team.team_id THEN 1 ELSE 0 END) AS REAL) * 100 / count(match.match_id) FROM `match` INNER JOIN team ON match.team_1 = team.team_id OR match.team_2 = team.team_id WHERE team.team_name = 'Mumbai Indians' AND match.match_date LIKE '2009%'
Database: soccer_2016
Note: batting hands of left refers to batting_hand = 'Left-hand bat'; right refers to batting_hand = 2; ratio refers to DIVIDE(COUNT(batting_hand = 'Right-hand bat'), COUNT(batting_hand = 2));
Question: What is the ratio of players with batting hands of left and right?
SQL: SELECT cast(sum(CASE WHEN batting_style.batting_hand = 'Left-hand bat' THEN 1 ELSE 0 END) AS REAL) / sum(CASE WHEN batting_style.batting_hand = 'Right-hand bat' THEN 1 ELSE 0 END) FROM player INNER JOIN batting_style ON player.batting_hand = batting_style.batting_id
Database: soccer_2016
Note: eldest player refers to MIN(dob); where he/she come from refers to country_name;
Question: Who is the eldest player and where did he/she come from?
SQL: SELECT player.player_name, country.country_name FROM player INNER JOIN country ON player.country_name = country.country_id ORDER BY player.dob LIMIT 1
Database: soccer_2016
Note: Zimbabwea refers to country_name = 'Zimbabwea';
Question: Which bowling skills did the players from Zimbabwea have?
SQL: SELECT bowling_style.bowling_skill FROM bowling_style INNER JOIN player ON bowling_style.bowling_id = player.bowling_skill INNER JOIN country ON player.country_name = country.country_id WHERE country.country_name = 'Zimbabwea'
Database: soccer_2016
Note: New Zealand refers to country_name = 'New Zealand'; ID of the umpire refers to umpire_id; name of the umpire refers to umpire_name;
Question: List the IDs and names of the umpires from New Zealand.
SQL: SELECT umpire.umpire_id, umpire.umpire_name FROM umpire INNER JOIN country ON umpire.umpire_country = country.country_id WHERE country.country_name = 'New Zealand'
Database: soccer_2016
Note: captain-keeper refers to role_desc = 'CaptainKeeper'; Rising Pune Supergiants refers to role_desc = 'CaptainKeeper';
Question: Who was the captain-keeper of Rising Pune Supergiants?
SQL: SELECT player.player_name FROM player INNER JOIN player_match ON player.player_id = player_match.player_id INNER JOIN team ON player_match.team_id = team.team_id INNER JOIN rolee ON player_match.role_id = rolee.role_id WHERE team.team_name = 'Rising Pune Supergiants' AND rolee.role_desc = 'CaptainKeeper' GROUP BY player.player_name
Database: soccer_2016
Note: Sunrisers Hyderabad team refers to team_name = 'Sunrisers Hyderabad'; in 2013 refers to match_date like '2013%';
Question: How many matches did the Sunrisers Hyderabad team win in 2013?
SQL: SELECT sum(CASE WHEN match_date LIKE '2013%' THEN 1 ELSE 0 END) FROM `match` INNER JOIN team ON match.match_winner = team.team_id WHERE team.team_name = 'Sunrisers Hyderabad'
Database: soccer_2016
Note: extra type of penalty refers to extra_name = 'penalty';
Question: Provide match ID which had the extra type of penalty.
SQL: SELECT extra_runs.match_id FROM extra_runs INNER JOIN extra_type ON extra_runs.extra_type_id = extra_type.extra_id WHERE extra_type.extra_name = 'penalty'
Database: soccer_2016
Note: resulted in a tie refers to win_type = 'Tie'; in 2015 refers to SUBSTR(match_date, 1, 4) = 2015;
Question: Name the teams played in a match which resulted in a tie in 2015.
SQL: SELECT team.team_name FROM team INNER JOIN MATCH ON team.team_id = MATCH.team_1 OR team.team_id = MATCH.team_2 INNER JOIN win_by ON MATCH.win_type = win_by.win_id WHERE substr(MATCH.match_date, 1, 4) = '2015' AND win_by.win_type = 'Tie' LIMIT 1
Database: soccer_2016
Note: out by the leg refers to out_name = 'lbw'; out in the first innings refers to innings_no = 2;
Question: Calculate the average players out in the first innings per match. How many of them were out by the leg before wicket?
SQL: SELECT cast(count(wicket_taken.player_out) AS REAL) / count(wicket_taken.match_id), sum(CASE WHEN out_type.out_name = 'lbw' THEN 1 ELSE 0 END) FROM wicket_taken INNER JOIN out_type ON wicket_taken.kind_out = out_type.out_id WHERE wicket_taken.innings_no = 2
Database: soccer_2016
Note: in 2008 refers to match_date like '2008%';
Question: How many matches are there in 2008?
SQL: SELECT count(match_id) FROM `match` WHERE match_date LIKE '2008%'
Database: soccer_2016
Note: total of two innings refers to innings_no = 2;
Question: Count the matches with a total of two innings.
SQL: SELECT count(match_id) FROM wicket_taken WHERE innings_no = 2
Database: soccer_2016
Note: city named "Rajkot" refers to city_name = 'Rajkot';
Question: Which is the country of the city named "Rajkot"?
SQL: SELECT country.country_name FROM country INNER JOIN city ON country.country_id = city.country_id WHERE city_name = 'Rajkot'
Database: soccer_2016
Note: are Superover refers to win_type = 'wickets';
Question: How many of the matches are Superover?
SQL: SELECT sum(CASE WHEN win_by.win_type = 'wickets' THEN 1 ELSE 0 END) FROM `match` INNER JOIN win_by ON match.win_type = win_by.win_id
Database: soccer_2016
Note: point of winning margin of 38 refers to win_margin = 38; on April 30, 2009 refers to match_date = '2009-04-30'; team refers to team_name;
Question: What are the teams that played in a match with the point of winning margin of 38 on April 30, 2009?
SQL: SELECT team.team_name FROM team INNER JOIN MATCH ON team.team_id = MATCH.team_1 WHERE MATCH.win_margin = 38 AND match_date = '2009-04-30'
Database: soccer_2016
Note: team of T Kohli refers to player_name = 'T Kohli';
Question: Give the name of the team of T Kohli in the match ID 335989.
SQL: SELECT team.team_name FROM team INNER JOIN player_match ON team.team_id = player_match.team_id INNER JOIN player ON player_match.player_id = player.player_id WHERE player_match.match_id = 335989 AND player.player_name = 'T Kohli'
Database: soccer_2016
Note: venues are located at Centurion refers to city_name = 'Centurion'; South Africa refers to country_name = 'South Africa';
Question: How many venues are located at Centurion, South Africa?
SQL: SELECT count(venue.venue_name) FROM venue INNER JOIN city ON venue.city_id = city.city_id INNER JOIN country ON city.country_id = country.country_id WHERE country.country_name = 'South Africa' AND city.city_name = 'Centurion'
Database: soccer_2016
Note: Delhi Daredevils refers to team_name = 'Delhi Daredevils'; in 2014 refers to match_date contains '2014';
Question: Among the matches of Delhi Daredevils in 2014, how many won matches are there?
SQL: SELECT count(match.match_winner) FROM `match` INNER JOIN team ON team.team_id = match.team_1 OR team.team_id = match.team_2 WHERE team.team_name = 'Delhi Daredevils' AND match.match_date LIKE '2014%'
Database: soccer_2016
Note: Royal Challengers Bangalore refers to team_name = 'Royal Challengers Bangalore'; highest winning margin refers to MAX(win_margin);
Question: Among the matches played by Royal Challengers Bangalore, what is the match ID of the match with the highest winning margin?
SQL: SELECT MATCH.match_id FROM team INNER JOIN MATCH ON team.team_id = MATCH.match_winner WHERE team.team_name = 'Royal Challengers Bangalore' AND MATCH.match_date LIKE '2012%' ORDER BY MATCH.win_margin DESC LIMIT 1
Database: soccer_2016
Note: K Goel refers to player_name = 'K Goel'; played as a player only refers to role_id = 3;
Question: How many times did K Goel played as a player only?
SQL: SELECT count(player_match.match_id) FROM player_match INNER JOIN player ON player_match.player_id = player.player_id INNER JOIN rolee ON player_match.role_id = rolee.role_id WHERE player.player_name = 'K Goel' AND rolee.role_id = 3
Database: soccer_2016
Note: average winning margin refers to avg(win_margin); held in Newlands refers to venue_name = 'Newlands';
Question: What is the average winning margin of the matches held in Newlands?
SQL: SELECT avg(MATCH.win_margin) FROM MATCH INNER JOIN venue ON MATCH.venue_id = venue.venue_id WHERE venue.venue_name = 'Newlands'
Database: soccer_2016
Note: losing team's name refers to team_id NOT in "match_winner" column;
Question: Provide the losing team's name in the match ID 336039.
SQL: SELECT team_name FROM team WHERE team_id = ( SELECT CASE WHEN team_1 = match_winner THEN team_2 ELSE team_1 END FROM MATCH WHERE match_id = 336039 )
Database: soccer_2016
Note: venue refers to venue_name;
Question: What is the venue for the match ID 829768?
SQL: SELECT venue.venue_name FROM venue INNER JOIN MATCH ON venue.venue_id = MATCH.venue_id WHERE MATCH.match_id = 829768
Database: soccer_2016
Note: lowest winning margin refers to MIN(win_margin); team name refers to team_name; second team refers to team_2;
Question: What is the second team's name in the match with the lowest winning margin?
SQL: SELECT team.team_name FROM team INNER JOIN MATCH ON team.team_id = MATCH.team_2 ORDER BY MATCH.win_margin LIMIT 1
Database: soccer_2016
Note: in 2013 refers to match_date like '2013%'; winning of the team "Mumbai Indians" refers to match_winner = 7; percentage refers to DIVIDE(COUNT(match_winner = 7), COUNT(match_winner));
Question: Among the matches in 2013, what is the percentage of winning of the team "Mumbai Indians"?
SQL: SELECT cast(sum(CASE WHEN MATCH.match_winner = 7 THEN 1 ELSE 0 END) AS REAL) * 100 / count(MATCH.match_winner) FROM team INNER JOIN MATCH ON team.team_id = MATCH.match_winner WHERE MATCH.match_date LIKE '2013%'
Database: soccer_2016
Note: SC Ganguly refers to player_name = 'SC Ganguly'; played as a Captain refers to role_id = 1; played other roles refers to role_id > 1; difference refers to SUBTRACT(COUNT(role_id = 1), COUNT(role_id > 1));
Question: What is the difference between the number of matches where SC Ganguly played as a Captain and those matches where he played other roles?
SQL: SELECT sum(CASE WHEN rolee.role_id = 1 THEN 1 ELSE 0 END) - sum(CASE WHEN rolee.role_id > 1 THEN 1 ELSE 0 END) FROM player_match INNER JOIN player ON player_match.player_id = player.player_id INNER JOIN rolee ON player_match.role_id = rolee.role_id WHERE player.player_name = 'SC Ganguly'
Database: soccer_2016
Note: bowling skill greater than 2 refers to bowling_skill > 2;
Question: How many players have the bowling skill greater than 2?
SQL: SELECT count(player_name) FROM player WHERE bowling_skill > 2
Database: soccer_2016
Note: born in 1970 refers to dob like '1970%';
Question: How many players were born in 1970?
SQL: SELECT count(player_name) FROM player WHERE dob LIKE '1970%'
Database: soccer_2016
Note: born in the 80s refers to dob like '198%'; have bowling skill of 2 refers to bowling_skill = 2;
Question: How many players were born in the 80s and have bowling skill of 2?
SQL: SELECT count(player_name) FROM player WHERE dob LIKE '198%' AND bowling_skill = 2
Database: soccer_2016
Note: in April, 2008 refers to match_date like '2008-04%';
Question: How many matches are there in April, 2008?
SQL: SELECT count(match_id) FROM MATCH WHERE match_date LIKE '2008-04%'
Database: soccer_2016
Question: What is the city name of country ID 3?
SQL: SELECT city_name FROM city WHERE country_id = 3
Database: soccer_2016
Note: in 2008 refers to match_date like '2008%';
Question: How many victory matches were there in 2008?
SQL: SELECT count(match_id) FROM MATCH WHERE match_date LIKE '2008%' AND match_winner IS NOT NULL
Database: soccer_2016
Note: East London refers to city_name = 'East London';
Question: Provide the country ID of East London.
SQL: SELECT country_id FROM city WHERE city_name = 'East London'
Database: soccer_2016
Note: SC Ganguly refers to player_name = 'SC Ganguly'; old refers to SUBTRACT(2008, strftime('%Y',dob));
Question: How old is SC Ganguly in 2008?
SQL: SELECT 2008 - strftime('%Y', dob) FROM player WHERE player_name = 'SC Ganguly'