db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
soccer_2016
select sum(case when t3.role_desc = 'captain' then 1 else 0 end) from player as t1 inner join player_match as t2 on t1.player_id = t2.player_id inner join rolee as t3 on t2.role_id = t3.role_id where t1.player_name = 'sc ganguly'
Question: for how many times has sc ganguly played as team captain in a match? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id...
for how many times has sc ganguly played as team captain in a match?
soccer_2016
select t2.role_id from player as t1 inner join player_match as t2 on t1.player_id = t2.player_id inner join rolee as t3 on t2.role_id = t3.role_id inner join match as t4 on t2.match_id = t4.match_id where t1.player_name = 'sc ganguly' and t4.match_date = '2008-04-18'
Question: what is the role of sc ganguly in the match on 2008/4/18? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, ...
what is the role of sc ganguly in the match on 2008/4/18?
soccer_2016
select max(t3.win_margin) from player as t1 inner join player_match as t2 on t1.player_id = t2.player_id inner join match as t3 on t2.match_id = t3.match_id where t1.player_name = 'sc ganguly'
Question: among all the matches sc ganguly has played in, what is the highest winning margin? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Ma...
among all the matches sc ganguly has played in, what is the highest winning margin?
soccer_2016
select cast(sum(t3.win_margin) as real) / count(*) from player as t1 inner join player_match as t2 on t1.player_id = t2.player_id inner join match as t3 on t2.match_id = t3.match_id where t1.player_name = 'sc ganguly'
Question: what is the average winning margin of all the matches sc ganguly has played in? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_...
what is the average winning margin of all the matches sc ganguly has played in?
soccer_2016
select cast(sum(case when t2.batting_hand = 'right-hand bat' then 1 else 0 end) as real) * 100 / count(t1.player_id) from player as t1 inner join batting_style as t2 on t1.batting_hand = t2.batting_id where substr(t1.dob, 1, 4) > 1985
Question: among all the players born after the year 1985, what is the percentage of the players who use the right hand as their batting hand? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extr...
among all the players born after the year 1985, what is the percentage of the players who use the right hand as their batting hand?
soccer_2016
select player_name from player order by dob desc limit 1
Question: give the name of the youngest player. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, Extra...
give the name of the youngest player.
soccer_2016
select sum(case when toss_winner = ( select team_id from team where team_name = 'sunrisers hyderabad' ) then 1 else 0 end) from `match`
Question: how many times has sunrisers hyderabad been the toss winner of a game? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_...
how many times has sunrisers hyderabad been the toss winner of a game?
soccer_2016
select t2.player_name from ball_by_ball as t1 inner join player as t2 on t1.striker = t2.player_id where t1.match_id = 419169 and t1.over_id = 3 and t1.ball_id = 2 and t1.innings_no = 2
Question: give the name of the striker in the match no. 419169, over no.3, ball no.2, inning no.2. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs ...
give the name of the striker in the match no. 419169, over no.3, ball no.2, inning no.2.
soccer_2016
select t2.venue_name from `match` as t1 inner join venue as t2 on t1.venue_id = t2.venue_id where t1.win_margin = 138
Question: give the name of venue for the game with a win margin of 138 points. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id...
give the name of venue for the game with a win margin of 138 points.
soccer_2016
select t1.player_name from player as t1 inner join match as t2 on t1.player_id = t2.man_of_the_match where t2.match_date = '2008-05-12'
Question: for the game on 2008/5/12, who was the man of the match? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, E...
for the game on 2008/5/12, who was the man of the match?
soccer_2016
select t3.player_name from player_match as t1 inner join rolee as t2 on t1.role_id = t2.role_id inner join player as t3 on t1.player_id = t3.player_id where t1.match_id = '419117' and t2.role_desc = 'captainkeeper'
Question: state the name of captain keeper of the match no.419117. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, E...
state the name of captain keeper of the match no.419117.
soccer_2016
select t2.player_name from season as t1 inner join player as t2 on t1.man_of_the_series = t2.player_id where t1.season_year = 2013
Question: who was the man of the series in 2013? give the full name. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id,...
who was the man of the series in 2013? give the full name.
soccer_2016
select t2.dob from season as t1 inner join player as t2 on t1.man_of_the_series = t2.player_id where t1.season_year = 2014 and t1.orange_cap is not null
Question: give the date of birth of the 2014 orange cap winner. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extr...
give the date of birth of the 2014 orange cap winner.
soccer_2016
select t3.country_name from season as t1 inner join player as t2 on t1.man_of_the_series = t2.player_id inner join country as t3 on t2.country_name = t3.country_id where t1.season_id = 7 and t1.purple_cap is not null
Question: what is the nationality of the 7th season purple cap winner? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_I...
what is the nationality of the 7th season purple cap winner?
soccer_2016
select t2.country_name from city as t1 inner join country as t2 on t1.country_id = t2.country_id where t1.city_name = 'ranchi'
Question: which country does ranchi city belong to? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, E...
which country does ranchi city belong to?
soccer_2016
select sum(case when t2.country_name = 'india' then 1 else 0 end) from city as t1 inner join country as t2 on t1.country_id = t2.country_id
Question: how many indian cities are there in the database? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Ty...
how many indian cities are there in the database?
soccer_2016
select t1.city_name from city as t1 inner join venue as t2 on t1.city_id = t2.city_id group by t1.city_id order by count(t2.venue_id) desc limit 1
Question: state the name of the city with the most venues. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Typ...
state the name of the city with the most venues.
soccer_2016
select t2.batting_hand from player as t1 inner join batting_style as t2 on t1.batting_hand = t2.batting_id where t1.player_name = 'mk pandey'
Question: what is the batting hand of mk pandey? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, Extr...
what is the batting hand of mk pandey?
soccer_2016
select cast(sum(case when t2.country_name = 'india' then 1 else 0 end) as real) / sum(case when t2.country_name = 'south africa' then 1 else 0 end) from city as t1 inner join country as t2 on t1.country_id = t2.country_id
Question: in the database, how many times is the number of indian cities to the south african cities? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Ru...
in the database, how many times is the number of indian cities to the south african cities?
soccer_2016
select sum(case when t2.venue_name = 'm chinnaswamy stadium' then 1 else 0 end) - sum(case when t2.venue_name = 'maharashtra cricket association stadium' then 1 else 0 end) from `match` as t1 inner join venue as t2 on t1.venue_id = t2.venue_id
Question: how many times does m chinnaswamy stadium host games than maharashtra cricket association stadium? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. E...
how many times does m chinnaswamy stadium host games than maharashtra cricket association stadium?
soccer_2016
select player_name from player order by dob asc limit 1
Question: who is the oldest player? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, Extra_Runs, Innin...
who is the oldest player?
soccer_2016
select sum(case when substr(match_date, 7, 1) = '5' then 1 else 0 end) from `match` where substr(match_date, 1, 4) = '2008'
Question: how many matches were played on may 2008? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, E...
how many matches were played on may 2008?
soccer_2016
select count(player_id) as cnt from player where dob between '1990-01-01' and '1999-12-31'
Question: how many players were born in the 90s? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, Extr...
how many players were born in the 90s?
soccer_2016
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'
Question: how many matches did team 10 play in 2012? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, ...
how many matches did team 10 play in 2012?
soccer_2016
select orange_cap from season group by orange_cap having count(season_year) > 1
Question: list the id of the player who won the orange cap for 2 consecutive seasons. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, ...
list the id of the player who won the orange cap for 2 consecutive seasons.
soccer_2016
select count(match_id) from `match` where season_id = 7
Question: how many matches were played in season 7? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, E...
how many matches were played in season 7?
soccer_2016
select sum(case when t1.country_name = 'south africa' then 1 else 0 end) from country as t1 inner join umpire as t2 on t1.country_id = t2.umpire_country
Question: how many umpires are from south africa? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, Ext...
how many umpires are from south africa?
soccer_2016
select t1.player_name from player as t1 inner join match as t2 on t1.player_id = t2.man_of_the_match group by t2.man_of_the_match order by count(t2.man_of_the_match) desc limit 1
Question: what is the name of the player with the highest number of outstanding player awards in a particular match? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra...
what is the name of the player with the highest number of outstanding player awards in a particular match?
soccer_2016
select t1.country_name from country as t1 inner join player as t2 on t1.country_id = t2.country_name group by t2.country_name order by count(t2.country_name) desc limit 1
Question: in which country do the majority of the players are from? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, ...
in which country do the majority of the players are from?
soccer_2016
select sum(case when t1.player_name = 'ch gayle' then 1 else 0 end) as cnt from player as t1 inner join season as t2 on t1.player_id = t2.orange_cap
Question: how many orange cap awards were won by ch gayle? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Typ...
how many orange cap awards were won by ch gayle?
soccer_2016
select t1.season_id from `match` as t1 inner join venue as t2 on t1.venue_id = t2.venue_id where t2.venue_name = 'm chinnaswamy stadium' group by t1.season_id order by count(t1.season_id) desc limit 1
Question: which season played the highest number of matches at m chinnaswamy stadium? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, ...
which season played the highest number of matches at m chinnaswamy stadium?
soccer_2016
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 )
Question: what is the name of the team that won the most number of matches in season 1? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id...
what is the name of the team that won the most number of matches in season 1?
soccer_2016
select t3.venue_name from team as t1 inner join match as t2 on t1.team_id = t2.team_1 inner join venue as t3 on t2.venue_id = t3.venue_id where t1.team_name = 'kolkata knight riders' group by t3.venue_id order by count(t3.venue_id) desc limit 1
Question: which venue did kolkata knight riders play most of their matches as a team 1? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id...
which venue did kolkata knight riders play most of their matches as a team 1?
soccer_2016
select t1.team_name from team as t1 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 t1.team_id = t2.team_1
Question: which team has the highest number of losses of all time? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, E...
which team has the highest number of losses of all time?
soccer_2016
select player_name from player where player_id = ( select man_of_the_match from `match` order by match_date asc limit 1 )
Question: who is the player who won the first ever 'man of the match' award? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, ...
who is the player who won the first ever 'man of the match' award?
soccer_2016
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
Question: when did chennai super kings play its first match? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_T...
when did chennai super kings play its first match?
soccer_2016
select sum(case when t1.batting_hand = 'left-hand bat' then 1 else 0 end) as cnt from batting_style as t1 inner join player as t2 on t1.batting_id = t2.batting_hand inner join country as t3 on t2.country_name = t3.country_id where t3.country_name = 'india'
Question: how many players with left-hand batting style are from india? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_...
how many players with left-hand batting style are from india?
soccer_2016
select t4.player_name from team as t1 inner join player_match as t2 on t1.team_id = t2.team_id inner join rolee as t3 on t2.role_id = t3.role_id inner join player as t4 on t2.player_id = t4.player_id where t1.team_name = 'deccan chargers' and t1.team_id = 8 and t3.role_desc = 'captain' and t3.role_id = 1 group by t4.pl...
Question: who is the player that has the highest number of roles as a captain for deccan chargers? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs ...
who is the player that has the highest number of roles as a captain for deccan chargers?
soccer_2016
select cast(sum(case when t1.batting_hand = 'right-hand bat' then 1 else 0 end) as real) * 100 / count(t2.player_id) from batting_style as t1 inner join player as t2 on t2.batting_hand = t1.batting_id
Question: what is the percentage of all right-handed batting players among all the other players? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -...
what is the percentage of all right-handed batting players among all the other players?
soccer_2016
select player_name from player where dob = '1981-07-07'
Question: name the player who is born on july 7, 1981. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id...
name the player who is born on july 7, 1981.
soccer_2016
select sum(case when player_id = 2 then 1 else 0 end) from player_match
Question: how many matches were played by the player with player id 2? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_I...
how many matches were played by the player with player id 2?
soccer_2016
select t2.team_name from match as t1 inner join team as t2 on t2.team_id = t1.team_1 order by t1.win_margin desc limit 1
Question: list the first team's name in the match with the highest winning margin. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Ove...
list the first team's name in the match with the highest winning margin.
soccer_2016
select t3.country_name from venue as t1 inner join city as t2 on t2.city_id = t1.city_id inner join country as t3 on t3.country_id = t2.country_id where t1.venue_name = 'st george''s park'
Question: give the country where st. george's park is located. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra...
give the country where st. george's park is located.
soccer_2016
select t3.team_name from player as t1 inner join player_match as t2 on t2.player_id = t1.player_id inner join team as t3 on t3.team_id = t2.team_id where t2.match_id = 335990 and t3.team_name = 'mumbai indians' group by t3.team_name
Question: list the player's name of mumbai indians in the match id 335990. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ba...
list the player's name of mumbai indians in the match id 335990.
soccer_2016
select t1.team_name from team as t1 inner join match as t2 on t1.team_id = t2.match_winner where t2.match_date = '2009-05-07' and t2.win_margin = 7
Question: provide the winning team's name in the match with the point of winning margin of 7 on may 7, 2009. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. E...
provide the winning team's name in the match with the point of winning margin of 7 on may 7, 2009.
soccer_2016
select sum(case when t2.outcome_type = 'superover' then 1 else 0 end) from match as t1 inner join outcome as t2 on t2.outcome_id = t1.outcome_type
Question: how many of the matches are superover? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, Extr...
how many of the matches are superover?
soccer_2016
select t1.city_name from city as t1 inner join country as t2 on t2.country_id = t1.country_id where t2.country_name = 'u.a.e'
Question: list the cities located in u.a.e. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, Extra_Run...
list the cities located in u.a.e.
soccer_2016
select sum(case when t2.team_name = 'pune warriors' then 1 else 0 end) from match as t1 inner join team as t2 on t2.team_id = t1.match_winner
Question: what is the total number of won matches of the team named 'pune warriors'? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, O...
what is the total number of won matches of the team named 'pune warriors'?
soccer_2016
select t2.team_name from match as t1 inner join team as t2 on t2.team_id = t1.match_winner where t1.match_date like '2015%' and t1.match_id = 829768
Question: among the matches held in 2015, who is the winning team in the match id 829768? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_...
among the matches held in 2015, who is the winning team in the match id 829768?
soccer_2016
select t3.role_desc from player as t1 inner join player_match as t2 on t2.player_id = t1.player_id inner join rolee as t3 on t3.role_id = t2.role_id where t2.match_id = 335992 and t1.player_name = 'k goel'
Question: what is the role of k goel in the match id 335992? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_T...
what is the role of k goel in the match id 335992?
soccer_2016
select sum(case when t2.country_name = 'south africa' then 1 else 0 end) from city as t1 inner join country as t2 on t2.country_id = t1.country_id
Question: how many cities are located in south africa? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id...
how many cities are located in south africa?
soccer_2016
select sum(case when t2.venue_name = 'newlands' then 1 else 0 end) from match as t1 inner join venue as t2 on t2.venue_id = t1.venue_id
Question: how many matches were held at the venue named 'newlands'? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, ...
how many matches were held at the venue named 'newlands'?
soccer_2016
select t1.win_margin from match as t1 inner join team as t2 on t2.team_id = t1.team_1 inner join team as t3 on t3.team_id = t1.team_2 where (t2.team_name = 'mumbai indians' and t3.team_name = 'royal challengers bangalore' and t1.match_date = '2008-05-28') or (t2.team_name = 'royal challengers bangalore' and t3.team_nam...
Question: provide the point of the winning margin in a match between mumbai indians and royal challengers bangalore on may 28, 2008. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type ->...
provide the point of the winning margin in a match between mumbai indians and royal challengers bangalore on may 28, 2008.
soccer_2016
select distinct case when t1.win_margin < ( select avg(win_margin) * 0.3 from match where match_date like '2011%' ) then t2.team_name end, case when t1.win_margin < ( select avg(win_margin) * 0.3 from match where match_date like '2011%' ) then t3.team_name end from match as t1 inner join team as t2 on t2.team_id = t1.t...
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. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Co...
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.
soccer_2016
select cast(sum(case when t1.role_desc = 'captain' then 1 else 0 end) as real) * 100 / count(t1.role_id) from rolee as t1 inner join player_match as t2 on t2.role_id = t1.role_id inner join player as t3 on t3.player_id = t2.player_id where t3.dob like '1977%'
Question: among the players born in 1977, what is the percentage of the players with a role as a captain? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extr...
among the players born in 1977, what is the percentage of the players with a role as a captain?
soccer_2016
select count(over_id) from ball_by_ball where match_id = 335996 and innings_no = 1
Question: how many overs were there in the first innings of match id '335996'? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id...
how many overs were there in the first innings of match id '335996'?
soccer_2016
select over_id, ball_id, innings_no from batsman_scored where match_id = 336004 order by runs_scored desc limit 1
Question: list the over ids, ball ids, and innings numbers of the match id '336004' while the batsman got the maximum scores. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_...
list the over ids, ball ids, and innings numbers of the match id '336004' while the batsman got the maximum scores.
soccer_2016
select match_id from ball_by_ball where over_id = 20 group by match_id limit 5
Question: describe any five matches ids that reached over id 20. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Ext...
describe any five matches ids that reached over id 20.
soccer_2016
select sum(case when match_id = 548335 then 1 else 0 end) from wicket_taken where innings_no = 1
Question: how many players got out in the first inning of match id '548335'? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, ...
how many players got out in the first inning of match id '548335'?
soccer_2016
select player_name from player where dob like '1971%'
Question: list the players' names who were born in 1971. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_...
list the players' names who were born in 1971.
soccer_2016
select match_id from match where match_date like '%2015-04-18%'
Question: provide the match ids which were held on 18th april 2015. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, ...
provide the match ids which were held on 18th april 2015.
soccer_2016
select t1.match_id from wicket_taken as t1 inner join out_type as t2 on t2.out_id = t1.kind_out where t2.out_name = 'hit wicket'
Question: list the match ids which had players out by hit wickets. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, E...
list the match ids which had players out by hit wickets.
soccer_2016
select sum(case when t1.innings_no = 2 then 1 else 0 end) from wicket_taken as t1 inner join out_type as t2 on t2.out_id = t1.kind_out where t2.out_name = 'stumped'
Question: how many players got out by being stumped in the second innings of all matches? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_...
how many players got out by being stumped in the second innings of all matches?
soccer_2016
select sum(case when t2.player_name = 'yuvraj singh' then 1 else 0 end) from match as t1 inner join player as t2 on t2.player_id = t1.man_of_the_match
Question: how many times did yuvraj singh receive the man of the match award? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id,...
how many times did yuvraj singh receive the man of the match award?
soccer_2016
select t2.player_name, t2.dob from country as t1 inner join player as t2 on t2.country_name = t1.country_id where t2.dob like '1977%' and t1.country_name = 'england'
Question: among the players who were born in 1977, provide names and birthdates of the players from england. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. E...
among the players who were born in 1977, provide names and birthdates of the players from england.
soccer_2016
select t1.player_name from player as t1 inner join match as t2 on t2.man_of_the_match = t1.player_id inner join season as t3 on t3.season_id = t2.season_id where t3.season_year = 2010 group by t1.player_name
Question: who got the man of the series award in 2010? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id...
who got the man of the series award in 2010?
soccer_2016
select cast(sum(case when t1.match_winner = 3 then 1 else 0 end) as real) * 100 / count(t1.match_id) from match as t1 inner join team as t2 on t2.team_id = t1.team_1 inner join team as t3 on t3.team_id = t1.team_2 where t2.team_name = 'chennai super kings' or t3.team_name = 'chennai super kings'
Question: calculate the win rate of the team 'chennai super kings'. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, ...
calculate the win rate of the team 'chennai super kings'.
soccer_2016
select t4.player_name, t5.country_name from player_match as t1 inner join team as t2 on t2.team_id = t1.team_id inner join match as t3 on t3.match_id = t1.match_id inner join player as t4 on t4.player_id = t1.player_id inner join country as t5 on t5.country_id = t4.country_name where t2.team_name = 'gujarat lions' and ...
Question: list the names and countries of the players from gujarat lions who played in the match held on 11th april 2016. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, ...
list the names and countries of the players from gujarat lions who played in the match held on 11th april 2016.
soccer_2016
select t1.player_name, t1.dob from player as t1 inner join bowling_style as t2 on t2.bowling_id = t1.bowling_skill where t2.bowling_skill = 'left-arm fast'
Question: provide the names and birthdates of players who have left-arm fast skills. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, O...
provide the names and birthdates of players who have left-arm fast skills.
soccer_2016
select t1.country_name from country as t1 inner join umpire as t2 on t2.umpire_country = t1.country_id where t2.umpire_name = 'br doctrove'
Question: where did br doctrove come from? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, Extra_Runs...
where did br doctrove come from?
soccer_2016
select t3.player_name from player_match as t1 inner join match as t2 on t2.match_id = t1.match_id inner join player as t3 on t3.player_id = t1.player_id inner join rolee as t4 on t4.role_id = t1.role_id where t2.match_date = '2008-06-01' and t4.role_desc = 'captain' and t2.match_winner = t1.team_id
Question: who was the captain of the winning team in the match held on 1st june 2008? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, ...
who was the captain of the winning team in the match held on 1st june 2008?
soccer_2016
select t3.team_name, count(t2.match_id) from player as t1 inner join player_match as t2 on t2.player_id = t1.player_id inner join team as t3 on t3.team_id = t2.team_id where t1.player_name = 'ck kapugedera'
Question: which team did ck kapugedera belong to? how many matches did he play? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_I...
which team did ck kapugedera belong to? how many matches did he play?
soccer_2016
select cast(sum(case when t2.venue_name = 'wankhede stadium' then 1 else 0 end) as real) * 100 / count(t3.match_id) from city as t1 inner join venue as t2 on t2.city_id = t1.city_id inner join match as t3 on t3.venue_id = t2.venue_id where t1.city_name = 'mumbai'
Question: among the matches held in mumbai, how many percent of them were held in wankhede stadium? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs...
among the matches held in mumbai, how many percent of them were held in wankhede stadium?
soccer_2016
select cast(sum(case when t2.out_name = 'bowled' then 1 else 0 end) as real) * 100 / count(t1.player_out) from wicket_taken as t1 inner join out_type as t2 on t2.out_id = t1.kind_out where t1.match_id = 392187
Question: among the players out in match id 392187, calculate the percentage of players out by bowl. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Run...
among the players out in match id 392187, calculate the percentage of players out by bowl.
soccer_2016
select cast(sum(case when t2.toss_name = 'field' then 1 else 0 end) as real) * 100 / count(t2.toss_id) from match as t1 inner join toss_decision as t2 on t2.toss_id = t1.toss_decide where t1.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? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Run...
how many percent of the toss-winners decided to bowl first on the pitch from 2010 to 2016?
soccer_2016
select toss_winner from match where toss_decide = 2
Question: list down the id of toss winners who decided to bat after winning the 'toss of the coin'. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs...
list down the id of toss winners who decided to bat after winning the 'toss of the coin'.
soccer_2016
select t1.match_id from match as t1 inner join player as t2 on t2.player_id = t1.man_of_the_match where t2.player_name = 'bb mccullum'
Question: list down the match id of matches that the 'man of the match' award was given to bb mccullum. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_...
list down the match id of matches that the 'man of the match' award was given to bb mccullum.
soccer_2016
select t2.dob from match as t1 inner join player as t2 on t2.player_id = t1.man_of_the_match
Question: list down the dob of players who received the 'man of the match' award. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over...
list down the dob of players who received the 'man of the match' award.
soccer_2016
select t2.team_name from match as t1 inner join team as t2 on t2.team_id = t1.toss_winner where t1.match_id between 336010 and 336020
Question: list down the name of teams that won the toss of the coin from matches with id from 336010 to 336020. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name...
list down the name of teams that won the toss of the coin from matches with id from 336010 to 336020.
soccer_2016
select sum(case when t2.team_name = 'mumbai indians' then 1 else 0 end) from match as t1 inner join team as t2 on t2.team_id = t1.match_winner
Question: how many matches have mumbai indians won? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, E...
how many matches have mumbai indians won?
soccer_2016
select t2.team_name from match as t1 inner join team as t2 on t2.team_id = t1.team_2 where t1.team_1 = ( select team_id from team where team_name = 'pune warriors' ) group by t2.team_name
Question: list down names of teams that have played as second team against pune warriors. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_...
list down names of teams that have played as second team against pune warriors.
soccer_2016
select t2.team_name from match as t1 inner join team as t2 on t2.team_id = t1.match_winner where t1.match_id = 336000
Question: what is the name of the team that won match id 336000? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Ext...
what is the name of the team that won match id 336000?
soccer_2016
select t1.match_id from match as t1 inner join venue as t2 on t2.venue_id = t1.venue_id where t2.venue_name = 'brabourne stadium'
Question: what are the match ids that were played at brabourne stadium? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_...
what are the match ids that were played at brabourne stadium?
soccer_2016
select t2.venue_name from match as t1 inner join venue as t2 on t2.venue_id = t1.venue_id where t1.season_id = 2 group by t2.venue_name
Question: list down the name of venues in season 2. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, E...
list down the name of venues in season 2.
soccer_2016
select t1.city_name from city as t1 inner join venue as t2 on t2.city_id = t1.city_id where t2.venue_name = 'm chinnaswamy stadium'
Question: what is the city of m chinnaswamy stadium? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, ...
what is the city of m chinnaswamy stadium?
soccer_2016
select t2.venue_name from city as t1 inner join venue as t2 on t2.city_id = t1.city_id where t1.city_name = 'mumbai'
Question: list down all of the venues in mumbai. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, Extr...
list down all of the venues in mumbai.
soccer_2016
select t2.match_winner from venue as t1 inner join match as t2 on t1.venue_id = t2.venue_id where t1.venue_name like 'st george%'
Question: list down all of the winning teams' ids that played in st george's park. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Ove...
list down all of the winning teams' ids that played in st george's park.
soccer_2016
select t2.city_name from venue as t1 inner join city as t2 on t1.city_id = t2.city_id where t1.venue_name like 'st george%'
Question: is supersport park located at centurion? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id, Ex...
is supersport park located at centurion?
soccer_2016
select sum(t2.match_winner) from team as t1 inner join match as t2 on t1.team_id = t2.match_winner where t1.team_name = 'deccan chargers'
Question: calculate the total winning match for deccan chargers. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Ext...
calculate the total winning match for deccan chargers.
soccer_2016
select sum(t1.venue_name) from venue as t1 inner join city as t2 on t1.city_id = t2.city_id where t2.city_name = 'pune'
Question: count the total venues located in pune city. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Type_Id...
count the total venues located in pune city.
soccer_2016
select ball_id from ball_by_ball where non_striker = ball_id order by ball_id desc limit 1
Question: give the player id of the player who was at the non-striker end for the most number of balls in the match 501219. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id...
give the player id of the player who was at the non-striker end for the most number of balls in the match 501219.
soccer_2016
select cast(sum(case when 1 < over_id and over_id < 25 then 1 else 0 end) as real) * 100 / sum(runs_scored) from batsman_scored where innings_no = 1
Question: calculate the average runs scored during the first half of all first innings. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id...
calculate the average runs scored during the first half of all first innings.
soccer_2016
select avg(innings_no) from extra_runs where innings_no = 2
Question: what are the average extra runs given in the second innings of every match? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, ...
what are the average extra runs given in the second innings of every match?
soccer_2016
select cast(count(case when win_margin > 100 then 1 else 0 end) as real) * 100 / total(match_id) from `match`
Question: among the matches, what percentage have a winning margin above 100? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id,...
among the matches, what percentage have a winning margin above 100?
soccer_2016
select player_name from player where dob between '1970-01-01' and '1990-12-31' order by dob desc
Question: list the name of the players born between 1970 and 1990 in descending order of age. | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Ma...
list the name of the players born between 1970 and 1990 in descending order of age.
soccer_2016
select sum(case when fielders = '' then 1 else 0 end) from wicket_taken where over_id = 3
Question: of the wickets taken in the third overs, how many are without the involvement of fielders? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Run...
of the wickets taken in the third overs, how many are without the involvement of fielders?
soccer_2016
select t2.country_id, count(t1.umpire_id) from umpire as t1 inner join country as t2 on t2.country_id = t1.umpire_country group by t2.country_id order by count(t1.umpire_id) desc limit 1
Question: from which country does the most umpires are from? how many of them are from the mentioned country? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. ...
from which country does the most umpires are from? how many of them are from the mentioned country?
soccer_2016
select cast(sum(case when t2.role_desc = 'captainkeeper' then 1 else 0 end) as real) * 100 / total(t1.player_id) from player_match as t1 inner join rolee as t2 on t1.role_id = t2.role_id
Question: among the players, what percentage are both captain and keeper? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Bal...
among the players, what percentage are both captain and keeper?
soccer_2016
select player_out from wicket_taken as t1 inner join out_type as t2 on t1.kind_out = t2.out_id where out_name = 'hit wicket'
Question: in the players, how many were out by hit wicket? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Over_Id, Ball_Id, Extra_Typ...
in the players, how many were out by hit wicket?
soccer_2016
select cast(sum(case when t1.batting_hand = 'right-hand bat' then 1 else 0 end) as real) * 100 / count(t2.country_name) from batting_style as t1 inner join player as t2 on t1.batting_id = t2.batting_hand
Question: on average, how many players from each country bat with their right hand? | Tables: Batting_Style -> Batting_Id, Batting_hand. Bowling_Style -> Bowling_Id, Bowling_skill. City -> City_Id, City_Name, Country_id. Country -> Country_Id, Country_Name. Extra_Type -> Extra_Id, Extra_Name. Extra_Runs -> Match_Id, Ov...
on average, how many players from each country bat with their right hand?