Chinastark/bird_dataset huggingface dataset:
Database: soccer_2016
Note: M Chinnaswamy Stadium refers to venue_name = 'M Chinnaswamy Stadium'; Maharashtra Cricket Association Stadium refers to venue_name = 'Maharashtra Cricket Association Stadium'; how many times = divide(count(match_id where venue_name = 'M Chinnaswamy Stadium'), count(match_id where venue_name = 'Maharashtra Cricket Association Stadium'));
Question: How many times does M Chinnaswamy Stadium host games than Maharashtra Cricket Association Stadium?
SQL: SELECT sum(CASE WHEN venue.venue_name = 'M Chinnaswamy Stadium' THEN 1 ELSE 0 END) - sum(CASE WHEN venue.venue_name = 'Maharashtra Cricket Association Stadium' THEN 1 ELSE 0 END) FROM `match` INNER JOIN venue ON match.venue_id = venue.venue_id
Database: soccer_2016
Note: name of the player refers to player_name; the oldest refers to min(dob);
Question: Who is the oldest player?
SQL: SELECT player_name FROM player ORDER BY dob ASC LIMIT 1
Database: soccer_2016
Note: in May 2008 refers to SUBSTR(match_date, 1, 4) = '2008' AND SUBSTR(match_date, 7, 1) = '5';
Question: How many matches were played on May 2008?
SQL: SELECT sum(CASE WHEN substr(match_date, 7, 1) = '5' THEN 1 ELSE 0 END) FROM `match` WHERE substr(match_date, 1, 4) = '2008'
Database: soccer_2016
Note: born in the 90s refers to dob >= '1990-01-01' AND dob <= '1999-12-31';
Question: How many players were born in the 90s?
SQL: SELECT count(player_id) AS cnt FROM player WHERE dob BETWEEN '1990-01-01' AND '1999-12-31'
Database: soccer_2016
Note: team 10 refers to team_1 = 10 OR team_2 = 10; in 2012 refers to SUBSTR(match_date, 1, 4) = '2012';
Question: How many matches did Team 10 play in 2012?
SQL: SELECT sum(CASE WHEN team_1 = 10 OR team_2 = 10 THEN 1 ELSE 0 END) FROM `match` WHERE substr(match_date, 1, 4) = '2012'
Database: soccer_2016
Note: id of the player who won the Orange Cap refers to orange_cap; for 2 consecutive seasons refers to count(season_year) > 1;
Question: List the id of the player who won the Orange Cap for 2 consecutive seasons.
SQL: SELECT orange_cap FROM season GROUP BY orange_cap HAVING count(season_year) > 1
Database: soccer_2016
Note: season 7 refers to season_id = 7;
Question: How many matches were played in Season 7?
SQL: SELECT count(match_id) FROM `match` WHERE season_id = 7
Database: soccer_2016
Note: South Africa refers to country_name = 'South Africa';
Question: How many umpires are from South Africa?
SQL: SELECT sum(CASE WHEN country.country_name = 'South Africa' THEN 1 ELSE 0 END) FROM country INNER JOIN umpire ON country.country_id = umpire.umpire_country
Database: soccer_2016
Note: name of the player refers to player_name; the highest number of outstanding player awards refers to max(count(man_of_the_match));
Question: What is the name of the player with the highest number of outstanding player awards in a particular match?
SQL: SELECT player.player_name FROM player INNER JOIN MATCH ON player.player_id = MATCH.man_of_the_match GROUP BY MATCH.man_of_the_match ORDER BY count(MATCH.man_of_the_match) DESC LIMIT 1
Database: soccer_2016
Note: country refers to country_name; the majority of the players  refers to max(count(country_name));
Question: In which country do the majority of the players are from?
SQL: SELECT country.country_name FROM country INNER JOIN player ON country.country_id = player.country_name GROUP BY player.country_name ORDER BY count(player.country_name) DESC LIMIT 1
Database: soccer_2016
Note: CH Gayle refers to player_name = 'CH Gayle';
Question: How many Orange Cap awards were won by CH Gayle?
SQL: SELECT sum(CASE WHEN player.player_name = 'CH Gayle' THEN 1 ELSE 0 END) AS cnt FROM player INNER JOIN season ON player.player_id = season.orange_cap
Database: soccer_2016
Note: season refers to season_id; the highest number of matches refers to max(count(season_id)); M Chinnaswamy Stadium refers to venue_name = 'M Chinnaswamy Stadium';
Question: Which season played the highest number of matches at M Chinnaswamy Stadium?
SQL: SELECT match.season_id FROM `match` INNER JOIN venue ON match.venue_id = venue.venue_id WHERE venue.venue_name = 'M Chinnaswamy Stadium' GROUP BY match.season_id ORDER BY count(match.season_id) DESC LIMIT 1
Database: soccer_2016
Note: name of the team refers to team_name; the most number of matches refers to max(count(match_winner)); season 1 refers to season_id = 1;
Question: What is the name of the team that won the most number of matches in season 1?
SQL: SELECT team_name FROM team WHERE team_id = ( SELECT match_winner FROM `match` WHERE season_id = 1 GROUP BY match_winner ORDER BY count(match_winner) DESC LIMIT 1 )
Database: soccer_2016
Note: venue refers to venue_name; Kolkata Knight Riders refers to team_name = 'Kolkata Knight Riders'; most of their matches refers to max(count(venue_id)); team 1 refers to team_id = team_1;
Question: Which venue did Kolkata Knight Riders play most of their matches as a Team 1?
SQL: SELECT venue.venue_name FROM team INNER JOIN MATCH ON team.team_id = MATCH.team_1 INNER JOIN venue ON MATCH.venue_id = venue.venue_id WHERE team.team_name = 'Kolkata Knight Riders' GROUP BY venue.venue_id ORDER BY count(venue.venue_id) DESC LIMIT 1
Database: soccer_2016
Note: name of the team refers to team_name; the highest number of losses refers to max(add(count(team_1 where team_id = team_1 and team_1 <> match_winner), count(team_2 where team_id = team_2 and team_2 <> match_winner)));
Question: Which team has the highest number of losses of all time?
SQL: SELECT team.team_name FROM team INNER JOIN ( SELECT count(team_1) AS a, team_1 FROM MATCH WHERE team_1 <> match_winner GROUP BY team_1 UNION SELECT count(team_2) AS a, team_2 FROM MATCH WHERE team_2 <> match_winner GROUP BY team_2 ORDER BY a DESC LIMIT 1 ) AS t2 ON team.team_id = t2.team_1
Database: soccer_2016
Note: name of the player refers to player_name; the first ever refers to min(match_date); "man of the match" award refers to player_id in 'man_of_the_match';
Question: Who is the player who won the first ever "man of the match" award?
SQL: SELECT player_name FROM player WHERE player_id = ( SELECT man_of_the_match FROM `match` ORDER BY match_date ASC LIMIT 1 )
Database: soccer_2016
Note: match date refers to match_date; Chennai Super Kings refers to team_name = 'Chennai Super Kings'; first match refers to min(match_date);
Question: When did Chennai Super Kings play its first match?
SQL: SELECT match_date FROM `match` WHERE team_1 = ( SELECT team_id FROM team WHERE team_name = 'Chennai Super Kings' ) OR team_2 = ( SELECT team_id FROM team WHERE team_name = 'Chennai Super Kings' ) ORDER BY match_date ASC LIMIT 1
Database: soccer_2016
Note: left-hand batting style refers to batting_hand = 'Left-hand bat'; India refers to country_name = 'India';
Question: How many players with left-hand batting style are from India?
SQL: SELECT sum(CASE WHEN batting_style.batting_hand = 'Left-hand bat' THEN 1 ELSE 0 END) AS cnt FROM batting_style INNER JOIN player ON batting_style.batting_id = player.batting_hand INNER JOIN country ON player.country_name = country.country_id WHERE country.country_name = 'India'
Database: soccer_2016
Note: name of the player refers to player_name; the highest number of roles refers to max(count(role_id)); as a captain refers to role_desc = 'Captain'; Deccan Chargers refers to team_name = 'Deccan Chargers';
Question: Who is the player that has the highest number of roles as a captain for Deccan Chargers?
SQL: SELECT player.player_name FROM team INNER JOIN player_match ON team.team_id = player_match.team_id INNER JOIN rolee ON player_match.role_id = rolee.role_id INNER JOIN player ON player_match.player_id = player.player_id WHERE team.team_name = 'Deccan Chargers' AND team.team_id = 8 AND rolee.role_desc = 'Captain' AND rolee.role_id = 1 GROUP BY player.player_id ORDER BY count(rolee.role_id) DESC LIMIT 1
Database: soccer_2016
Note: right-handed batting refers to batting_hand = 'Right-hand bat'; percentage = divide(count(player_id where batting_hand = 'Right-hand bat'), count(player_id)) * 100%;
Question: What is the percentage of all right-handed batting players among all the other players?
SQL: SELECT cast(sum(CASE WHEN batting_style.batting_hand = 'Right-hand bat' THEN 1 ELSE 0 END) AS REAL) * 100 / count(player.player_id) FROM batting_style INNER JOIN player ON player.batting_hand = batting_style.batting_id
Database: soccer_2016
Note: name of the player refers to player_name; born on July 7 1981 refers to dob = '1981-07-07';
Question: Name the player who is born on July 7, 1981.
SQL: SELECT player_name FROM player WHERE dob = '1981-07-07'
Database: soccer_2016
Note: player ID 2 refers to player_id = 2;
Question: How many matches were played by the player with player ID 2?
SQL: SELECT sum(CASE WHEN player_id = 2 THEN 1 ELSE 0 END) FROM player_match
Database: soccer_2016
Note: team's name refers to team_name; first team refers to team_id = team_1; the highest winning margin refers to max(win_margin);
Question: List the first team's name in the match with the highest winning margin.
SQL: SELECT team.team_name FROM MATCH INNER JOIN team ON team.team_id = MATCH.team_1 ORDER BY MATCH.win_margin DESC LIMIT 1
Database: soccer_2016
Note: country refers to country_name; St. George's Park refers to venue_name = 'St George''s Park';
Question: Give the country where St. George's Park is located.
SQL: SELECT country.country_name FROM venue INNER JOIN city ON city.city_id = venue.city_id INNER JOIN country ON country.country_id = city.country_id WHERE venue.venue_name = 'St George''s Park'
Database: soccer_2016
Note: Mumbai Indians refers to team_name = 'Mumbai Indians'; match ID 335990 refers to match_id = 335990;
Question: List the player's name of Mumbai Indians in the match ID 335990.
SQL: SELECT team.team_name FROM player INNER JOIN player_match ON player_match.player_id = player.player_id INNER JOIN team ON team.team_id = player_match.team_id WHERE player_match.match_id = 335990 AND team.team_name = 'Mumbai Indians' GROUP BY team.team_name
Database: soccer_2016
Note: the winning team refers to team_id = match_winner; the point of winning margin of 7 refers to win_margin = 7; on May 7 2009 refers to match_date = '2009-05-07';
Question: Provide the winning team's name in the match with the point of winning margin of 7 on May 7, 2009.
SQL: SELECT team.team_name FROM team INNER JOIN MATCH ON team.team_id = MATCH.match_winner WHERE MATCH.match_date = '2009-05-07' AND MATCH.win_margin = 7
Database: soccer_2016
Note: Superover refers to outcome_type = 'Superover';
Question: How many of the matches are Superover?
SQL: SELECT sum(CASE WHEN outcome.outcome_type = 'Superover' THEN 1 ELSE 0 END) FROM MATCH INNER JOIN outcome ON outcome.outcome_id = MATCH.outcome_type
Database: soccer_2016
Note: city refers to city_name; U.A.E refers to country_name = 'U.A.E';
Question: List the cities located in U.A.E.
SQL: SELECT city.city_name FROM city INNER JOIN country ON country.country_id = city.country_id WHERE country.country_name = 'U.A.E'
Database: soccer_2016
Note: the team named "Pune Warriors" refers to team_name = 'Pune Warriors'; the total number of won matches = count(team_name where team_id = match_winner);
Question: What is the total number of won matches of the team named "Pune Warriors"?
SQL: SELECT sum(CASE WHEN team.team_name = 'Pune Warriors' THEN 1 ELSE 0 END) FROM MATCH INNER JOIN team ON team.team_id = MATCH.match_winner
Database: soccer_2016
Note: in 2015 refers to match_date LIKE '2015%'; the winning team refers to team_id = match_winner; match ID 829768 refers to match_id = 829768;
Question: Among the matches held in 2015, who is the winning team in the match ID 829768?
SQL: SELECT team.team_name FROM MATCH INNER JOIN team ON team.team_id = MATCH.match_winner WHERE MATCH.match_date LIKE '2015%' AND MATCH.match_id = 829768
Database: soccer_2016
Note: role refers to role_desc; K Goel refers to player_name = 'K Goel'; match ID 335992 refers to match_id = 335992;
Question: What is the role of K Goel in the match ID 335992?
SQL: SELECT rolee.role_desc FROM player INNER JOIN player_match ON player_match.player_id = player.player_id INNER JOIN rolee ON rolee.role_id = player_match.role_id WHERE player_match.match_id = 335992 AND player.player_name = 'K Goel'
Database: soccer_2016
Note: South Africa refers to country_name = 'South Africa';
Question: How many cities are located in South Africa?
SQL: SELECT sum(CASE WHEN country.country_name = 'South Africa' THEN 1 ELSE 0 END) FROM city INNER JOIN country ON country.country_id = city.country_id
Database: soccer_2016
Note: the venue named "Newlands" refers to venue_name = 'Newlands';
Question: How many matches were held at the venue named "Newlands"?
SQL: SELECT sum(CASE WHEN venue.venue_name = 'Newlands' THEN 1 ELSE 0 END) FROM MATCH INNER JOIN venue ON venue.venue_id = MATCH.venue_id
Database: soccer_2016
Note: point of the winning margin refers to win_margin; Mumbai Indians refers to team_name = 'Mumbai Indians'; Royal Challengers Bangalore refers to team_name = 'Royal Challengers Bangalore'; on May 28 2008 refers to match_date = '2008-05-28';
Question: Provide the point of the winning margin in a match between Mumbai Indians and Royal Challengers Bangalore on May 28, 2008.
SQL: SELECT MATCH.win_margin FROM MATCH INNER JOIN team ON team.team_id = MATCH.team_1 INNER JOIN team ON team.team_id = MATCH.team_2 WHERE (team.team_name = 'Mumbai Indians' AND team.team_name = 'Royal Challengers Bangalore' AND MATCH.match_date = '2008-05-28') OR (team.team_name = 'Royal Challengers Bangalore' AND team.team_name = 'Mumbai Indians' AND MATCH.match_date = '2008-05-28')
Database: soccer_2016
Note: name of the team refers to team_name; in 2011 refers to match_date LIKE '2011%'; the point of winning margin lower than 30% of the average winning margin refers to win_margin < multiply(avg(win_margin), 0.3) where match_date LIKE '2011%';
Question: List the names of the first andthe second teams that played a match with the point of the winning margin lower than the 30% of the average winning margin of the matches held in 2011.
SQL: SELECT DISTINCT CASE WHEN MATCH.win_margin < ( SELECT avg(win_margin) * 0.3 FROM MATCH WHERE match_date LIKE '2011%' ) THEN team.team_name END, CASE WHEN MATCH.win_margin < ( SELECT avg(win_margin) * 0.3 FROM MATCH WHERE match_date LIKE '2011%' ) THEN team.team_name END FROM MATCH INNER JOIN team ON team.team_id = MATCH.team_1 INNER JOIN team ON team.team_id = MATCH.team_2 WHERE MATCH.match_date LIKE '2011%'
Database: soccer_2016
Note: born in 1977 refers to dob LIKE '1977%'; a role as a captain refers to role_desc = 'Captain'; percentage = divide(count(role_id where role_desc = 'Captain'), count(role_id)) * 100% where dob LIKE '1977%';
Question: Among the players born in 1977, what is the percentage of the players with a role as a captain?
SQL: SELECT cast(sum(CASE WHEN rolee.role_desc = 'Captain' THEN 1 ELSE 0 END) AS REAL) * 100 / count(rolee.role_id) FROM rolee INNER JOIN player_match ON player_match.role_id = rolee.role_id INNER JOIN player ON player.player_id = player_match.player_id WHERE player.dob LIKE '1977%'
Database: soccer_2016
Note: the first innings refers to innings_no = 1; match ID "335996" refers to match_id = 335996;
Question: How many overs were there in the first innings of match ID "335996"?
SQL: SELECT count(over_id) FROM ball_by_ball WHERE match_id = 335996 AND innings_no = 1
Database: soccer_2016
Note: over ID refers to over_id; ball ID refers to ball_id; innings number refers to innings_no; match ID "336004" refers to match_id = 336004; batsman got the maximum scores refers to max(runs_scored);
Question: List the over IDs, ball IDs, and innings numbers of the match ID "336004" while the batsman got the maximum scores.
SQL: SELECT over_id, ball_id, innings_no FROM batsman_scored WHERE match_id = 336004 ORDER BY runs_scored DESC LIMIT 1
Database: soccer_2016
Note: reached over ID 20 refers to over_id = 20;
Question: Describe any five matches IDs that reached over ID 20.
SQL: SELECT match_id FROM ball_by_ball WHERE over_id = 20 GROUP BY match_id LIMIT 5
Database: soccer_2016
Note: got out refers to player_out; the first inning refers to innings_no = 1; match ID "548335" refers to match_id = 548335;
Question: How many players got out in the first inning of match ID "548335"?
SQL: SELECT sum(CASE WHEN match_id = 548335 THEN 1 ELSE 0 END) FROM wicket_taken WHERE innings_no = 1
Database: soccer_2016
Note: players' name refers to player_name; born in 1971 refers to dob LIKE '1971%';
Question: List the players' names who were born in 1971.
SQL: SELECT player_name FROM player WHERE dob LIKE '1971%'
Database: soccer_2016
Note: on 18th April 2015 refers to DATE(match_date) = '2015-04-18';
Question: Provide the match IDs which were held on 18th April 2015.
SQL: SELECT match_id FROM MATCH WHERE match_date LIKE '%2015-04-18%'
Database: soccer_2016
Note: had players out by hit wickets refers to out_name = 'hit wicket';
Question: List the match IDs which had players out by hit wickets.
SQL: SELECT wicket_taken.match_id FROM wicket_taken INNER JOIN out_type ON out_type.out_id = wicket_taken.kind_out WHERE out_type.out_name = 'hit wicket'
Database: soccer_2016
Note: got out by being stumped refers to out_name = 'stumped'; the second innings refers to innings_no = 2;
Question: How many players got out by being stumped in the second innings of all matches?
SQL: SELECT sum(CASE WHEN wicket_taken.innings_no = 2 THEN 1 ELSE 0 END) FROM wicket_taken INNER JOIN out_type ON out_type.out_id = wicket_taken.kind_out WHERE out_type.out_name = 'stumped'
Database: soccer_2016
Note: Yuvraj Singh refers to player_name = 'Yuvraj Singh'; receive the Man of the match award refers to player_id = man_of_the_match;
Question: How many times did Yuvraj Singh receive the Man of the Match award?
SQL: SELECT sum(CASE WHEN player.player_name = 'Yuvraj Singh' THEN 1 ELSE 0 END) FROM MATCH INNER JOIN player ON player.player_id = MATCH.man_of_the_match
Database: soccer_2016
Note: born in 1977 refers to dob LIKE '1977%'; name refers to player_name; birthdate refers to dob; England refers to country_name = 'England';
Question: Among the players who were born in 1977, provide names and birthdates of the players from England.
SQL: SELECT player.player_name, player.dob FROM country INNER JOIN player ON player.country_name = country.country_id WHERE player.dob LIKE '1977%' AND country.country_name = 'England'
Database: soccer_2016
Note: player's name refers to player_name; got the Man of the Series Award refers to man_of_the_match = player_id; in 2010 refers to season_year = 2010;
Question: Who got the Man of the Series Award in 2010?
SQL: SELECT player.player_name FROM player INNER JOIN MATCH ON MATCH.man_of_the_match = player.player_id INNER JOIN season ON season.season_id = MATCH.season_id WHERE season.season_year = 2010 GROUP BY player.player_name
Database: soccer_2016
Note: team "Chennai Super Kings" refers to team_name = 'Chennai Super Kings'; win rate = divide(count(match_id where match_winner = 3), count(match_id)) * 100%;
Question: Calculate the win rate of the team "Chennai Super Kings".
SQL: SELECT cast(sum(CASE WHEN MATCH.match_winner = 3 THEN 1 ELSE 0 END) AS REAL) * 100 / count(MATCH.match_id) FROM MATCH INNER JOIN team ON team.team_id = MATCH.team_1 INNER JOIN team ON team.team_id = MATCH.team_2 WHERE team.team_name = 'Chennai Super Kings' OR team.team_name = 'Chennai Super Kings'
Database: soccer_2016
Note: player's name refers to player_name; country refers to country_name; Gujarat Lions refers to team_name = 'Gujarat Lions'; on 11th April 2016 refers to match_date = '2016-04-11';
Question: List the names and countries of the players from Gujarat Lions who played in the match held on 11th April 2016.
SQL: SELECT player.player_name, country.country_name FROM player_match INNER JOIN team ON team.team_id = player_match.team_id INNER JOIN MATCH ON MATCH.match_id = player_match.match_id INNER JOIN player ON player.player_id = player_match.player_id INNER JOIN country ON country.country_id = player.country_name WHERE team.team_name = 'Gujarat Lions' AND MATCH.match_date = '2016-04-11'
Database: soccer_2016
Note: player's name refers to player_name; birthdate refers to dob; have left-arm fast skills refers to bowling_skill = 'Left-arm fast';
Question: Provide the names and birthdates of players who have left-arm fast skills.
SQL: SELECT player.player_name, player.dob FROM player INNER JOIN bowling_style ON bowling_style.bowling_id = player.bowling_skill WHERE bowling_style.bowling_skill = 'Left-arm fast'
Database: soccer_2016
Note: the country the umpire comes from refers to country_name; BR Doctrove refers to umpire_name = 'BR Doctrove';
Question: Where did BR Doctrove come from?
SQL: SELECT country.country_name FROM country INNER JOIN umpire ON umpire.umpire_country = country.country_id WHERE umpire.umpire_name = 'BR Doctrove'
Database: soccer_2016
Note: player's name refers to player_name; captain refers to role_desc = 'Captain'; the winning team refers to match_winner = team_id; on 1st June 2008 refers to match_date = '2008-06-01';
Question: Who was the captain of the winning team in the match held on 1st June 2008?
SQL: SELECT player.player_name FROM player_match INNER JOIN MATCH ON MATCH.match_id = player_match.match_id INNER JOIN player ON player.player_id = player_match.player_id INNER JOIN rolee ON rolee.role_id = player_match.role_id WHERE MATCH.match_date = '2008-06-01' AND rolee.role_desc = 'Captain' AND MATCH.match_winner = player_match.team_id
Database: soccer_2016
Note: team refers to team_name; CK Kapugedera refers to player_name = 'CK Kapugedera';
Question: Which team did CK Kapugedera belong to? How many matches did he play?
SQL: SELECT team.team_name, count(player_match.match_id) FROM player INNER JOIN player_match ON player_match.player_id = player.player_id INNER JOIN team ON team.team_id = player_match.team_id WHERE player.player_name = 'CK Kapugedera'
Database: soccer_2016
Note: Mumbai refers to city_name = 'Mumbai'; Wankhede Stadium refers to venue_name = 'Wankhede Stadium'; percent = divide(count(match_id where venue_name = 'Wankhede Stadium'), count(match_id)) * 100% where city_name = 'Mumbai';
Question: Among the matches held in Mumbai, how many percent of them were held in Wankhede Stadium?
SQL: SELECT cast(sum(CASE WHEN venue.venue_name = 'Wankhede Stadium' THEN 1 ELSE 0 END) AS REAL) * 100 / count(MATCH.match_id) FROM city INNER JOIN venue ON venue.city_id = city.city_id INNER JOIN MATCH ON MATCH.venue_id = venue.venue_id WHERE city.city_name = 'Mumbai'
Database: soccer_2016
Note: out by bowl refers to out_name = 'bowled'; percentage = divide(count(player_out where out_name = 'bowled'), count(player_out)) * 100% where match_id = 392187;
Question: Among the players out in match ID 392187, calculate the percentage of players out by bowl.
SQL: SELECT cast(sum(CASE WHEN out_type.out_name = 'bowled' THEN 1 ELSE 0 END) AS REAL) * 100 / count(wicket_taken.player_out) FROM wicket_taken INNER JOIN out_type ON out_type.out_id = wicket_taken.kind_out WHERE wicket_taken.match_id = 392187
Database: soccer_2016
Note: decide to bowl first refers to toss_name = 'field'; from 2010 to 2016 refers to match_date BETWEEN '2010-01-01' AND '2016-12-31'; percent = divide(count(toss_id where toss_name = 'field'), count(toss_id)) * 100% where match_date BETWEEN '2010-01-01' AND '2016-12-31';
Question: How many percent of the toss-winners decided to bowl first on the pitch from 2010 to 2016?
SQL: SELECT cast(sum(CASE WHEN toss_decision.toss_name = 'field' THEN 1 ELSE 0 END) AS REAL) * 100 / count(toss_decision.toss_id) FROM MATCH INNER JOIN toss_decision ON toss_decision.toss_id = MATCH.toss_decide WHERE MATCH.match_date BETWEEN '2010-01-01' AND '2016-12-31'
Database: soccer_2016
Note: decided to bat refers to toss_decide = 2; ID of toss winners refers to toss_winner;
Question: List down the ID of toss winners who decided to bat after winning the "toss of the coin".
SQL: SELECT toss_winner FROM MATCH WHERE toss_decide = 2
Database: soccer_2016
Question: List down the match ID of matches that the "man of the match" award was given to BB McCullum.
SQL: SELECT MATCH.match_id FROM MATCH INNER JOIN player ON player.player_id = MATCH.man_of_the_match WHERE player.player_name = 'BB McCullum'