id
int64
0
9.43k
db_id
stringclasses
69 values
schema
stringclasses
69 values
question
stringlengths
24
325
output
stringlengths
23
804
evidence
stringlengths
0
673
filtered_schema
listlengths
0
16
1,800
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
For how many times has SC Ganguly played as team captain in a match?
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'
SC Ganguly refers to Player_Name = 'SC Ganguly'; team captain refers to Role_Desc = 'Captain'
[ "Player.Player_Id", "Player.Player_Name", "Player_Match.Player_Id", "Player_Match.Role_Id", "Rolee.Role_Desc", "Rolee.Role_Id" ]
1,801
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
What is the role of SC Ganguly in the match on 2008/4/18?
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'
role refers to of Role_Id; SC Ganguly refers to Player_Name = 'SC Ganguly'; on 2008/4/18 refers to Match_Date = '2008-04-18'
[ "Match.Match_Date", "Match.Match_Id", "Player.Player_Id", "Player.Player_Name", "Player_Match.Match_Id", "Player_Match.Player_Id", "Player_Match.Role_Id", "Rolee.Role_Id" ]
1,802
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Among all the matches SC Ganguly has played in, what is the highest winning margin?
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'
SC Ganguly refers to Player_Name = 'SC Ganguly'; the highest winning margin refers to max(Win_Margin)
[ "Match.Match_Id", "Match.Win_Margin", "Player.Player_Id", "Player.Player_Name", "Player_Match.Match_Id", "Player_Match.Player_Id" ]
1,803
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
What is the average winning margin of all the matches SC Ganguly has played in?
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'
SC Ganguly refers to Player_Name = 'SC Ganguly'; the average winning margin = divide(sum(Win_Margin), count(Match_Id)) where Player_Name = 'SC Ganguly'
[ "Match.Match_Id", "Match.Win_Margin", "Player.Player_Id", "Player.Player_Name", "Player_Match.Match_Id", "Player_Match.Player_Id" ]
1,804
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
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?
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
born after the year 1985 refers to SUBSTR(DOB, 1, 4) > 1985; right hand as batting hand refers to Batting_Hand = 'Right-hand bat'; percentage = divide(count(Player_Id where Batting_Hand = 'Right-hand bat'), count(Player_Id)) * 100% where SUBSTR(DOB, 1, 4) > 1985
[ "Batting_Style.Batting_Hand", "Batting_Style.Batting_Id", "Player.Batting_hand", "Player.DOB", "Player.Player_Id" ]
1,805
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Give the name of the youngest player.
SELECT Player_Name FROM Player ORDER BY DOB DESC LIMIT 1
name of player refers to Player_Name; the youngest refers to max(DOB)
[ "Player.DOB", "Player.Player_Name" ]
1,806
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many times has Sunrisers Hyderabad been the toss winner of a game?
SELECT SUM(CASE WHEN Toss_Winner = ( SELECT Team_Id FROM Team WHERE Team_Name = 'Sunrisers Hyderabad' ) THEN 1 ELSE 0 END) FROM `Match`
Sunrisers Hyderabad refers to Team_Name = 'Sunrisers Hyderabad'; time of toss winner refers to count(Toss_Winner)
[ "Team.Team_Id", "Team.Team_Name" ]
1,807
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Give the name of the striker in the match no. 419169, over no.3, ball no.2, inning no.2.
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
name of the striker refers to Player_Name; match no. 419169 refers to Match_Id = 419169; over no.3 refers to Over_Id = 3; ball no.2 refers to Ball_Id = 2; inning no.2 refers to Innings_No = 2
[ "Ball_by_Ball.Ball_Id", "Ball_by_Ball.Innings_No", "Ball_by_Ball.Match_Id", "Ball_by_Ball.Over_Id", "Ball_by_Ball.Striker", "Player.Player_Id", "Player.Player_Name" ]
1,808
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Give the name of venue for the game with a win margin of 138 points.
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
name of venue refers to Venue_Name; a win margin of 138 points refers to Win_Margin = 138
[ "Match.Venue_Id", "Match.Win_Margin", "Venue.Venue_Id", "Venue.Venue_Name" ]
1,809
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
For the game on 2008/5/12, who was the man of the match?
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'
on 2008/5/12 refers to Match_Date = '2008-05-12'; name refers to Player_Name;
[ "Match.Man_of_the_Match", "Match.Match_Date", "Player.Player_Id", "Player.Player_Name" ]
1,810
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
State the name of captain keeper of the match no.419117.
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'
name refers to Player_Name; captain keeper refers to Role_Desc = 'CaptainKeeper'; match no.419117 refers to Match_Id = '419117'
[ "Player.Player_Id", "Player.Player_Name", "Player_Match.Match_Id", "Player_Match.Player_Id", "Player_Match.Role_Id", "Rolee.Role_Desc", "Rolee.Role_Id" ]
1,811
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Who was the man of the series in 2013? Give the full name.
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
full name refers to Player_Name; in 2013 refers to Season_Year = 2013
[ "Player.Player_Id", "Player.Player_Name", "Season.Man_of_the_Series", "Season.Season_Year" ]
1,812
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Give the date of birth of the 2014 Orange Cap winner.
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
date of birth refers to DOB; 2014 refers to Season_Year = 2014; Orange Cap winner refers to Orange_Cap IS NOT NULL
[ "Player.DOB", "Player.Player_Id", "Season.Man_of_the_Series", "Season.Orange_Cap", "Season.Season_Year" ]
1,813
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
What is the nationality of the 7th season Purple Cap winner?
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
nationality refers to Country_Name; the 7th season refers to Season_Id = 7; Purple Cap winner refers to Purple_Cap IS NOT NULL
[ "Country.Country_Id", "Country.Country_Name", "Player.Country_Name", "Player.Player_Id", "Season.Man_of_the_Series", "Season.Purple_Cap", "Season.Season_Id" ]
1,814
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Which country does Ranchi city belong to?
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'
country refers to Country_Name; Ranchi city refers to City_Name = 'Ranchi'
[ "City.City_Name", "City.Country_Id", "Country.Country_Id", "Country.Country_Name" ]
1,815
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many Indian cities are there in the database?
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
Indian refers to Country_Name = 'India'
[ "City.Country_Id", "Country.Country_Id", "Country.Country_Name" ]
1,816
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
State the name of the city with the most venues.
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
name of the city refers to City_Name; the most venues refers to max(count(Venue_Id))
[ "City.City_Id", "City.City_Name", "Venue.City_Id", "Venue.Venue_Id" ]
1,817
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
What is the batting hand of MK Pandey?
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'
MK Pandey refers to Player_Name = 'MK Pandey'
[ "Batting_Style.Batting_Id", "Batting_Style.Batting_hand", "Player.Batting_hand", "Player.Player_Name" ]
1,818
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
In the database, how many times is the number of Indian cities to the South African cities?
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
Indian refers to Country_Name = 'India'; South African refers to Country_Name = 'South Africa'; how many times = divide(count(City_Id where Country_Name = 'India'), count(City_Id where Country_Name = 'South Africa'))
[ "City.Country_Id", "Country.Country_Id", "Country.Country_Name" ]
1,819
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many times does M Chinnaswamy Stadium host games than Maharashtra Cricket Association Stadium?
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
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 Assoc...
[ "Match.Venue_Id", "Venue.Venue_Id", "Venue.Venue_Name" ]
1,820
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Who is the oldest player?
SELECT Player_Name FROM Player ORDER BY DOB ASC LIMIT 1
name of the player refers to Player_Name; the oldest refers to min(DOB)
[ "Player.DOB", "Player.Player_Name" ]
1,821
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many matches were played on May 2008?
SELECT SUM(CASE WHEN SUBSTR(Match_Date, 7, 1) = '5' THEN 1 ELSE 0 END) FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2008'
in May 2008 refers to SUBSTR(Match_Date, 1, 4) = '2008' AND SUBSTR(Match_Date, 7, 1) = '5'
[ "Match.Match_Date" ]
1,822
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many players were born in the 90s?
SELECT COUNT(Player_Id) AS cnt FROM Player WHERE DOB BETWEEN '1990-01-01' AND '1999-12-31'
born in the 90s refers to DOB > = '1990-01-01' AND DOB < = '1999-12-31'
[ "Player.DOB", "Player.Player_Id" ]
1,823
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many matches did Team 10 play in 2012?
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'
Team 10 refers to Team_1 = 10 OR Team_2 = 10; in 2012 refers to SUBSTR(Match_Date, 1, 4) = '2012'
[ "Match.Match_Date", "Match.Team_1", "Match.Team_2" ]
1,824
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List the id of the player who won the Orange Cap for 2 consecutive seasons.
SELECT Orange_Cap FROM Season GROUP BY Orange_Cap HAVING COUNT(Season_Year) > 1
id of the player who won the Orange Cap refers to Orange_Cap; for 2 consecutive seasons refers to count(Season_Year) > 1
[ "Season.Orange_Cap", "Season.Season_Year" ]
1,825
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many matches were played in Season 7?
SELECT COUNT(Match_Id) FROM `Match` WHERE Season_Id = 7
Season 7 refers to Season_Id = 7
[ "Match.Match_Id", "Match.Season_Id" ]
1,826
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many umpires are from South Africa?
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
South Africa refers to Country_Name = 'South Africa'
[ "Country.Country_ID", "Country.Country_Name", "Umpire.Umpire_Country" ]
1,827
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
What is the name of the player with the highest number of outstanding player awards in a particular match?
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
name of the player refers to Player_Name; the highest number of outstanding player awards refers to max(count(Man_of_the_Match))
[ "Match.Man_of_the_Match", "Player.Player_Id", "Player.Player_Name" ]
1,828
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
In which country do the majority of the players are from?
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
country refers to Country_Name; the majority of the players  refers to max(count(Country_Name))
[ "Country.Country_Id", "Country.Country_Name", "Player.Country_Name" ]
1,829
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many Orange Cap awards were won by CH Gayle?
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
CH Gayle refers to Player_Name = 'CH Gayle'
[ "Player.Player_Id", "Player.Player_Name", "Season.Orange_Cap" ]
1,830
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Which season played the highest number of matches at M Chinnaswamy Stadium?
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
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'
[ "Match.Season_Id", "Match.Venue_Id", "Venue.Venue_Id", "Venue.Venue_Name" ]
1,831
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
What is the name of the team that won the most number of matches in season 1?
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 )
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
[ "Match.Match_Winner", "Match.season_Id" ]
1,832
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Which venue did Kolkata Knight Riders play most of their matches as a Team 1?
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
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
[ "Match.Team_1", "Match.Venue_Id", "Team.Team_Id", "Team.Team_Name", "Venue.Venue_Id", "Venue.Venue_Name" ]
1,833
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Which team has the highest number of losses of all time?
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
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)))
[ "Match.Match_Winner", "Match.Team_1", "Match.Team_2", "Match.a", "T2.Team_1", "Team.Team_Id", "Team.Team_Name" ]
1,834
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Who is the player who won the first ever "man of the match" award?
SELECT Player_Name FROM Player WHERE Player_Id = ( SELECT Man_of_the_Match FROM `Match` ORDER BY match_date ASC LIMIT 1 )
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'
[ "Match.Man_of_the_Match", "Match.match_date" ]
1,835
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
When did Chennai Super Kings play its first match?
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
match date refers to Match_Date; Chennai Super Kings refers to Team_Name = 'Chennai Super Kings'; first match refers to min(Match_Date)
[ "Team.Team_Id", "Team.Team_Name" ]
1,836
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many players with left-hand batting style are from India?
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'
left-hand batting style refers to Batting_hand = 'Left-hand bat'; India refers to Country_Name = 'India'
[ "Batting_Style.Batting_Id", "Batting_Style.Batting_hand", "Country.Country_Id", "Country.Country_Name", "Player.Batting_hand", "Player.Country_Name" ]
1,837
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Who is the player that has the highest number of roles as a captain for Deccan Chargers?
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...
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'
[ "Player.Player_Id", "Player.Player_Name", "Player_Match.Player_Id", "Player_Match.Role_Id", "Player_Match.Team_id", "Rolee.Role_Desc", "Rolee.Role_Id", "Team.Team_Id", "Team.Team_Name", "Team.Team_id" ]
1,838
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
What is the percentage of all right-handed batting players among all the other players?
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
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%
[ "Batting_Style.Batting_Id", "Batting_Style.Batting_hand", "Player.Batting_hand", "Player.Player_Id" ]
1,839
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Name the player who is born on July 7, 1981.
SELECT Player_name FROM Player WHERE DOB = '1981-07-07'
name of the player refers to Player_Name; born on July 7 1981 refers to DOB = '1981-07-07'
[ "Player.DOB", "Player.Player_name" ]
1,840
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many matches were played by the player with player ID 2?
SELECT SUM(CASE WHEN Player_Id = 2 THEN 1 ELSE 0 END) FROM Player_Match
player ID 2 refers to Player_Id = 2
[ "Player_Match.Player_Id" ]
1,841
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List the first team's name in the match with the highest winning margin.
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
team's name refers to Team_Name; first team refers to Team_Id = Team_1; the highest winning margin refers to max(Win_Margin)
[ "Match.Team_1", "Match.Win_Margin", "Team.Team_Id", "Team.Team_Name" ]
1,842
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Give the country where St. George's Park is located.
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'
country refers to Country_Name; St. George's Park refers to Venue_Name = 'St George''s Park'
[ "City.City_Id", "City.Country_id", "Country.Country_Id", "Country.Country_Name", "Venue.City_Id", "Venue.Venue_Name" ]
1,843
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List the player's name of Mumbai Indians in the match ID 335990.
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
Mumbai Indians refers to Team_Name = 'Mumbai Indians'; match ID 335990 refers to Match_Id = 335990
[ "Player.Player_Id", "Player_Match.Match_Id", "Player_Match.Player_Id", "Player_Match.Team_Id", "Team.Team_Id", "Team.Team_Name" ]
1,844
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Provide the winning team's name in the match with the point of winning margin of 7 on May 7, 2009.
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
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'
[ "Match.Match_Date", "Match.Match_Winner", "Match.Win_Margin", "Team.Team_Id", "Team.Team_Name" ]
1,845
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many of the matches are Superover?
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
Superover refers to Outcome_Type = 'Superover'
[ "Match.Outcome_type", "Outcome.Outcome_Id", "Outcome.Outcome_Type" ]
1,846
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List the cities located in U.A.E.
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'
city refers to City_Name; U.A.E refers to Country_Name = 'U.A.E'
[ "City.City_Name", "City.Country_id", "Country.Country_Id", "Country.Country_Name" ]
1,847
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
What is the total number of won matches of the team named "Pune Warriors"?
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
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)
[ "Match.Match_Winner", "Team.Team_Id", "Team.Team_Name" ]
1,848
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Among the matches held in 2015, who is the winning team in the match ID 829768?
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
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
[ "Match.Match_Date", "Match.Match_Id", "Match.Match_Winner", "Team.Team_Id", "Team.Team_Name" ]
1,849
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
What is the role of K Goel in the match ID 335992?
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'
role refers to Role_Desc; K Goel refers to Player_Name = 'K Goel'; match ID 335992 refers to Match_Id = 335992
[ "Player.Player_Id", "Player.Player_Name", "Player_Match.Match_Id", "Player_Match.Player_Id", "Player_Match.Role_Id", "Rolee.Role_Desc", "Rolee.Role_Id" ]
1,850
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many cities are located in South Africa?
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
South Africa refers to Country_Name = 'South Africa'
[ "City.Country_id", "Country.Country_Id", "Country.Country_Name" ]
1,851
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many matches were held at the venue named "Newlands"?
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
the venue named "Newlands" refers to Venue_Name = 'Newlands'
[ "Match.Venue_Id", "Venue.Venue_Id", "Venue.Venue_Name" ]
1,852
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Provide the point of the winning margin in a match between Mumbai Indians and Royal Challengers Bangalore on May 28, 2008.
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...
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'
[ "Match.Match_Date", "Match.Team_1", "Match.Team_2", "Match.Win_Margin", "Team.Team_Id", "Team.Team_Name" ]
1,853
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
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.
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...
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%'
[ "Match.Match_Date", "Match.Team_1", "Match.Team_2", "Match.Win_Margin", "Team.Team_Id", "Team.Team_Name" ]
1,854
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Among the players born in 1977, what is the percentage of the players with a role as a captain?
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%'
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%'
[ "Player.DOB", "Player.Player_Id", "Player_Match.Player_Id", "Player_Match.Role_Id", "Rolee.Role_Desc", "Rolee.Role_Id" ]
1,855
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many overs were there in the first innings of match ID "335996"?
SELECT COUNT(Over_Id) FROM Ball_by_Ball WHERE Match_Id = 335996 AND Innings_No = 1
the first innings refers to Innings_No = 1; match ID "335996" refers to Match_Id = 335996
[ "Ball_by_Ball.Innings_No", "Ball_by_Ball.Match_Id", "Ball_by_Ball.Over_Id" ]
1,856
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List the over IDs, ball IDs, and innings numbers of the match ID "336004" while the batsman got the maximum scores.
SELECT Over_Id, Ball_Id, Innings_No FROM Batsman_Scored WHERE Match_Id = 336004 ORDER BY Runs_Scored DESC LIMIT 1
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)
[ "Batsman_Scored.Ball_Id", "Batsman_Scored.Innings_No", "Batsman_Scored.Match_Id", "Batsman_Scored.Over_Id", "Batsman_Scored.Runs_Scored" ]
1,857
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Describe any five matches IDs that reached over ID 20.
SELECT Match_Id FROM Ball_by_Ball WHERE Over_Id = 20 GROUP BY Match_Id LIMIT 5
reached over ID 20 refers to Over_Id = 20
[ "Ball_by_Ball.Match_Id", "Ball_by_Ball.Over_Id" ]
1,858
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many players got out in the first inning of match ID "548335"?
SELECT SUM(CASE WHEN Match_Id = 548335 THEN 1 ELSE 0 END) FROM Wicket_Taken WHERE Innings_No = 1
got out refers to Player_Out; the first inning refers to Innings_No = 1; match ID "548335" refers to Match_Id = 548335
[ "Wicket_Taken.Innings_No", "Wicket_Taken.Match_Id" ]
1,859
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List the players' names who were born in 1971.
SELECT Player_name FROM Player WHERE DOB LIKE '1971%'
players' name refers to Player_name; born in 1971 refers to DOB LIKE '1971%'
[ "Player.DOB", "Player.Player_name" ]
1,860
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Provide the match IDs which were held on 18th April 2015.
SELECT Match_Id FROM Match WHERE Match_Date LIKE '%2015-04-18%'
on 18th April 2015 refers to DATE(Match_Date) = '2015-04-18'
[ "Match.Match_Date", "Match.Match_Id" ]
1,861
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List the match IDs which had players out by hit wickets.
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'
had players out by hit wickets refers to Out_Name = 'hit wicket'
[ "Out_Type.Out_Id", "Out_Type.Out_Name", "Wicket_Taken.Kind_Out", "Wicket_Taken.Match_Id" ]
1,862
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many players got out by being stumped in the second innings of all matches?
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'
got out by being stumped refers to Out_Name = 'stumped'; the second innings refers to Innings_No = 2
[ "Out_Type.Out_Id", "Out_Type.Out_Name", "Wicket_Taken.Innings_No", "Wicket_Taken.Kind_Out" ]
1,863
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many times did Yuvraj Singh receive the Man of the Match award?
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
Yuvraj Singh refers to Player_Name = 'Yuvraj Singh'; receive the Man of the Match award refers to Player_Id = Man_of_the_Match
[ "Match.Man_of_the_Match", "Player.Player_Id", "Player.Player_Name" ]
1,864
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Among the players who were born in 1977, provide names and birthdates of the players from England.
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'
born in 1977 refers to DOB LIKE '1977%'; name refers to Player_Name; birthdate refers to DOB; England refers to Country_Name = 'England'
[ "Country.Country_Id", "Country.Country_Name", "Player.Country_Name", "Player.DOB", "Player.Player_Name" ]
1,865
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Who got the Man of the Series Award in 2010?
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
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
[ "Match.Man_of_the_Match", "Match.Season_Id", "Player.Player_Id", "Player.Player_Name", "Season.Season_Id", "Season.Season_Year" ]
1,866
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Calculate the win rate of the team "Chennai Super Kings".
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'
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%
[ "Match.Match_Id", "Match.Match_Winner", "Match.Team_1", "Match.Team_2", "Team.Team_Id", "Team.Team_Name" ]
1,867
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List the names and countries of the players from Gujarat Lions who played in the match held on 11th April 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 ...
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'
[ "Country.Country_Id", "Country.Country_Name", "Match.Match_Date", "Match.Match_Id", "Player.Country_Name", "Player.Player_Id", "Player.Player_Name", "Player_Match.Match_Id", "Player_Match.Player_Id", "Player_Match.Team_Id", "Team.Team_Id", "Team.Team_Name" ]
1,868
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Provide the names and birthdates of players who have left-arm fast skills.
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'
player's name refers to Player_Name; birthdate refers to DOB; have left-arm fast skills refers to Bowling_skill = 'Left-arm fast'
[ "Bowling_Style.Bowling_Id", "Bowling_Style.Bowling_skill", "Player.Bowling_skill", "Player.DOB", "Player.Player_Name" ]
1,869
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Where did BR Doctrove come from?
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'
the country the umpire comes from refers to Country_Name; BR Doctrove refers to Umpire_Name = 'BR Doctrove'
[ "Country.Country_Id", "Country.Country_Name", "Umpire.Umpire_Country", "Umpire.Umpire_Name" ]
1,870
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Who was the captain of the winning team in the match held on 1st June 2008?
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
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'
[ "Match.Match_Date", "Match.Match_Id", "Match.Match_Winner", "Player.Player_Id", "Player.Player_Name", "Player_Match.Match_Id", "Player_Match.Player_Id", "Player_Match.Role_Id", "Player_Match.Team_Id", "Rolee.Role_Desc", "Rolee.Role_Id" ]
1,871
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Which team did CK Kapugedera belong to? How many matches did he play?
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'
team refers to Team_Name; CK Kapugedera refers to Player_Name = 'CK Kapugedera'
[ "Player.Player_Id", "Player.Player_Name", "Player_Match.Match_Id", "Player_Match.Player_Id", "Player_Match.Team_Id", "Team.Team_Id", "Team.Team_Name" ]
1,872
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Among the matches held in Mumbai, how many percent of them were held in Wankhede Stadium?
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'
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'
[ "City.City_Id", "City.City_Name", "Match.Match_Id", "Match.Venue_Id", "Venue.City_Id", "Venue.Venue_Id", "Venue.Venue_Name" ]
1,873
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Among the players out in match ID 392187, calculate the percentage of players out by bowl.
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
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
[ "Out_Type.Out_Id", "Out_Type.Out_Name", "Wicket_Taken.Kind_Out", "Wicket_Taken.Match_Id", "Wicket_Taken.Player_Out" ]
1,874
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many percent of the toss-winners decided to bowl first on the pitch from 2010 to 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'
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'
[ "Match.Match_Date", "Match.Toss_Decide", "Toss_Decision.Toss_Id", "Toss_Decision.Toss_Name" ]
1,875
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List down the ID of toss winners who decided to bat after winning the "toss of the coin".
SELECT Toss_Winner FROM Match WHERE Toss_Decide = 2
decided to bat refers to Toss_Decide = 2; ID of toss winners refers to Toss_winner
[ "Match.Toss_Decide", "Match.Toss_Winner" ]
1,876
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List down the match ID of matches that the "man of the match" award was given to BB McCullum.
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'
[ "Match.Man_of_the_Match", "Match.Match_Id", "Player.Player_Id", "Player.Player_Name" ]
1,877
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List down the DOB of players who received the "man of the match" award.
SELECT T2.DOB FROM Match AS T1 INNER JOIN Player AS T2 ON T2.Player_Id = T1.Man_of_the_Match
[ "Match.Man_of_the_Match", "Player.DOB", "Player.Player_Id" ]
1,878
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List down the name of teams that won the toss of the coin from matches with ID from 336010 to 336020.
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
name of teams refers to Team_Name; won the toss refers to Toss_Winner; matches with ID from 336010 to 336020  refers to Match_Id BETWEEN 336010 AND 336020
[ "Match.Match_Id", "Match.Toss_Winner", "Team.Team_Id", "Team.Team_Name" ]
1,879
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
How many matches have Mumbai Indians won?
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
Mumbai Indians refers to Team_Name = 'Mumbai Indians'; won refers to Match_Winner
[ "Match.Match_Winner", "Team.Team_Id", "Team.Team_Name" ]
1,880
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List down names of teams that have played as second team against Pune Warriors.
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
names of teams refers to Team_Name; second team refers to Team_2; Pune Warriors refers to Team_Name = 'Pune Warriors'
[ "Match.Team_1", "Match.Team_2", "Team.Team_Id", "Team.Team_Name" ]
1,881
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
What is the name of the team that won match ID 336000?
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
name of the team refers to Team_Name; won refers to Match_Winner
[ "Match.Match_Id", "Match.Match_Winner", "Team.Team_Id", "Team.Team_Name" ]
1,882
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
What are the match IDs that were played at Brabourne Stadium?
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'
at Brabourne Stadium refers to Venue_Name = 'Brabourne Stadium'
[ "Match.Match_Id", "Match.Venue_Id", "Venue.Venue_Id", "Venue.Venue_Name" ]
1,883
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List down the name of venues in season 2.
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
name of venues refers to Venue_Name; season 2 refers to Season_Id = 2
[ "Match.Season_Id", "Match.Venue_Id", "Venue.Venue_Id", "Venue.Venue_Name" ]
1,884
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
What is the city of M Chinnaswamy Stadium?
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'
city refers to City_Name; M Chinnaswamy Stadium refers to Venue_Name = 'M Chinnaswamy Stadium'
[ "City.City_Id", "City.City_Name", "Venue.City_Id", "Venue.Venue_Name" ]
1,885
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List down all of the venues in Mumbai.
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'
venues refers to Venue_Name; Mumbai refers to City_Name = 'Mumbai'
[ "City.City_Id", "City.City_Name", "Venue.City_Id", "Venue.Venue_Name" ]
1,886
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List down all of the winning teams' IDs that played in St George's Park.
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%'
winning teams' refers to Match_Winner; played in St George's Park refers to Venue_Name like 'St George%'
[ "Match.Match_Winner", "Match.Venue_Id", "Venue.Venue_Id", "Venue.Venue_Name" ]
1,887
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Is SuperSport Park located at Centurion?
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%'
SuperSport Park refers to Venue_Name = 'SuperSport Park'; Centurion refers to City_Name = 'Centurion'
[ "City.City_Id", "City.City_Name", "Venue.City_Id", "Venue.Venue_Name" ]
1,888
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Calculate the total winning match for Deccan Chargers.
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'
winning refers to Match_Winner; Deccan Chargers refers to Team_Name = 'Deccan Chargers'
[ "Match.Match_Winner", "Team.Team_Id", "Team.Team_Name" ]
1,889
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Count the total venues located in Pune City.
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'
Pune City refers to City_Name = 'Pune'
[ "City.City_Id", "City.City_Name", "Venue.City_Id", "Venue.Venue_Name" ]
1,890
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Give the player id of the player who was at the non-striker end for the most number of balls in the match 501219.
SELECT Ball_Id FROM Ball_by_Ball WHERE Non_Striker = Ball_Id ORDER BY Ball_Id DESC LIMIT 1
most number of balls refers to max(Ball_Id); match 501219 refers to Match_Id = 501219; player id also refers to non_striker or ball_id
[ "Ball_by_Ball.Ball_Id", "Ball_by_Ball.Non_Striker" ]
1,891
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Calculate the average runs scored during the first half of all first innings.
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
first half refers to 1 < Over_Id and Over_Id < 25; average = divide(sum(Over_Id) when 1 < Over_Id and Over_Id < 25, sum(Runs_Scored)) as percentage; first innings refers to Innings_No = 1
[ "Batsman_Scored.Innings_No", "Batsman_Scored.Over_Id", "Batsman_Scored.Runs_Scored" ]
1,892
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
What are the average extra runs given in the second innings of every match?
SELECT AVG(Innings_No) FROM Extra_Runs WHERE Innings_No = 2
second innings refers to Innings_No = 2; average extra runs = divide(sum(Extra_Runs), count(Innings_No)) when Innings_No = 2
[ "Extra_Runs.Innings_No" ]
1,893
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Among the matches, what percentage have a winning margin above 100?
SELECT CAST(COUNT(CASE WHEN Win_Margin > 100 THEN 1 ELSE 0 END) AS REAL) * 100 / TOTAL(Match_Id) FROM `Match`
winning margin above 100 refers to Win_Margin > 100; percentage = divide(count(Match_Id) when Win_Margin > 100, count(Match_Id)) as percentage
[ "Match.Match_Id", "Match.Win_Margin" ]
1,894
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
List the name of the players born between 1970 and 1990 in descending order of age.
SELECT Player_Name FROM Player WHERE DOB BETWEEN '1970-01-01' AND '1990-12-31' ORDER BY DOB DESC
name of the players refers to Player_Name; born between 1970 and 1990 refers to DOB between '1970-01-01' and '1990-12-31'
[ "Player.DOB", "Player.Player_Name" ]
1,895
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Of the wickets taken in the third overs, how many are without the involvement of fielders?
SELECT SUM(CASE WHEN Fielders = '' THEN 1 ELSE 0 END) FROM Wicket_Taken WHERE Over_Id = 3
third overs refers to Over_Id = 3; without the involvement of fielders refers to Fielders = ''
[ "Wicket_Taken.Fielders", "Wicket_Taken.Over_Id" ]
1,896
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
From which country does the most umpires are from? How many of them are from the mentioned country?
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
which country refers to Country_Id; most umpires refers to max(count(Umpire_Id))
[ "Country.Country_Id", "Umpire.Umpire_Country", "Umpire.Umpire_Id" ]
1,897
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
Among the players, what percentage are both captain and keeper?
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
captain and keeper refers to Role_Desc = 'CaptainKeeper'; percentage = divide(count(Player_Id) when Role_Desc = 'CaptainKeeper', count(Player_Id)) as percentage
[ "Player_Match.Player_Id", "Player_Match.Role_Id", "Rolee.Role_Desc", "Rolee.Role_Id" ]
1,898
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
In the players, how many were out by hit wicket?
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'
out by hit wicket refers to Out_Name = 'hit wicket'
[ "Out_Type.Out_Id", "Wicket_Taken.Kind_Out" ]
1,899
soccer_2016
CREATE TABLE Batting_Style ( Batting_Id INTEGER primary key, Batting_hand TEXT ); CREATE TABLE Bowling_Style ( Bowling_Id INTEGER primary key, Bowling_skill TEXT ); CREATE TABLE City ( City_Id INTEGER primary key, City_Name TEXT, Country_id INTE...
On average, how many players from each country bat with their right hand?
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
bat with their right hand refers to Batting_hand = 'Right-hand bat'; average = divide(count(Player_Id) when Batting_hand = 'Right-hand bat', count(Country_Name))
[ "Batting_Style.Batting_hand", "Batting_Style.Batting_id", "Player.Batting_hand", "Player.Country_Name" ]