Chinastark/bird_dataset huggingface dataset:
Database: restaurant
Question: How many American restaurants are located in Front, San Francisco?
Evidence: American restaurant refers to food_type = 'american'; Front refers to street_name = 'front'; San Francisco refers to city = 'san francisco'
SQL: SELECT COUNT(T2.food_type = 'american') FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.street_name = 'front'
Database: restaurant
Question: List the restaurant's ID that has a review greater than the 70% of average review of all American restaurants with street number greater than 2000.
Evidence: American restaurant refers to food_type = 'american'; street number greater than 2000 refers to street_num > 2000; review greater than the 70% of average review refers to review > multiply(avg(review), 0.7)
SQL: SELECT T1.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.food_type = 'american' AND T1.street_num > 2000 GROUP BY T1.id_restaurant ORDER BY AVG(T2.review) * 0.7 DESC
Database: restaurant
Question: Among the restaurants located on the street number ranges from 1000 to 2000, what is the percentage of Afghani restaurants are there?
Evidence: street number ranges from 1000 to 2000 refers to 1000 < = street_num < = 2000; Afghani restaurant refers to food_type = 'afghani'; percentage = divide(count(id_restaurant where food_type = 'afghani'), count(id_restaurant)) * 100%
SQL: SELECT CAST(SUM(IIF(T2.food_type = 'afghani', 1, 0)) AS REAL) * 100 / COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE 1000 <= T1.street_num <= 2000
Database: restaurant
Question: What is the name of the most popular restaurant serving Asian foods in San Francisco?
Evidence: the most popular refers to max(review); Asian food refers to food_type = 'asian'; San Francisco refers to city = 'san francisco'
SQL: SELECT label FROM generalinfo WHERE food_type = 'asian' AND city = 'san francisco' AND review = ( SELECT MAX(review) FROM generalinfo WHERE food_type = 'asian' AND city = 'san francisco' )
Database: restaurant
Question: How many cities are there in Monterey?
Evidence: Monterey refers to region = 'monterey'
SQL: SELECT COUNT(DISTINCT city) FROM geographic WHERE region = 'monterey'
Database: restaurant
Question: How many deli in Belmont have a review rating of 2 or more?
Evidence: deli ris a food type; Belmont refers to city = 'belmont'; review rating of 2 or more refers to review > 2
SQL: SELECT COUNT(id_restaurant) FROM generalinfo WHERE city = 'belmont' AND review > 2 AND food_type = 'deli'
Database: restaurant
Question: Which county in northern California has the highest number of cities?
Evidence: northern California refers to region = 'northern california'; the highest number of cities refers to max(count(city))
SQL: SELECT county FROM geographic WHERE region = 'northern california' GROUP BY county ORDER BY COUNT(city) DESC LIMIT 1
Database: restaurant
Question: How many restaurants can you find in Concord?
Evidence: Concord refers to city = 'concord'
SQL: SELECT COUNT(id_restaurant) FROM location WHERE city = 'concord'
Database: restaurant
Question: In which region can you find the top 4 most popular restaurants?
Evidence: the top 4 most popular restaurant refers to top 4 max(review)
SQL: SELECT T2.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city ORDER BY T1.review DESC LIMIT 4
Database: restaurant
Question: How many Chinese restaurants are there on 1st st, Livermore?
Evidence: Chinese restaurant refers to food_type = 'chinese'; 1st st refers to street_name = '1st st'; Livermore refers to city = 'livermore'
SQL: SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'livermore' AND T1.food_type = 'chinese' AND T2.street_name = '1st st'
Database: restaurant
Question: How many Indian restaurants are there in the Los Angeles area?
Evidence: Indian restaurant refers to food_type = 'indian'; the Los Angeles area refers to region = 'los angeles area'
SQL: SELECT COUNT(T1.city) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'indian' AND T1.region = 'los angeles area'
Database: restaurant
Question: In the Bay Area, what is the most common type of food served by restaurants?
Evidence: the Bay Area refers to region = 'bay area'; the most common type of food refers to max(count(food_type))
SQL: SELECT T2.food_type FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'bay area' GROUP BY T2.food_type ORDER BY COUNT(T2.food_type) DESC LIMIT 1
Database: restaurant
Question: How many restaurants in Broadway, Oakland received a review of no more than 3?
Evidence: Broadway refers to street_name = 'broadway';  Oakland refers to city = 'oakland'; a review of no more than 3 refers to review < 3
SQL: SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.street_name = 'broadway' AND T2.review < 3 AND T1.city = 'oakland'
Database: restaurant
Question: In which region can you find the highest number of Baskin Robbins restaurants?
Evidence: the highest number refers to max(count(city)); Baskin Robbins restaurant refers to label = 'baskin robbins'
SQL: SELECT T2.region AS num FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.label = 'baskin robbins' GROUP BY T2.region ORDER BY COUNT(T1.city) DESC LIMIT 1
Database: restaurant
Question: List all the streets where pizza-serving restaurants are found in San Jose.
Evidence: street refers to street_name; pizza-serving restaurant refers to food_type = 'pizza'; San Jose refers to city = 'san jose'
SQL: SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'pizza' AND T1.city = 'san jose'
Database: restaurant
Question: How many types of restaurants are there in the Yosemite and Mono Lake area?
SQL: SELECT COUNT(T2.food_type) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'yosemite and mono lake area'
Database: restaurant
Question: What is the full address of the most popular restaurant among the diners?
Evidence: full address refers to street_num, street_name, city; the most popular refers to max(review)
SQL: SELECT T2.street_name, T2.street_num, T2.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant ORDER BY T1.review DESC LIMIT 1
Database: restaurant
Question: In which counties can you find the restaurant with the highest number of branches?
Evidence: restaurant refers to label; the highest number of branches refers to max(count(city))
SQL: SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city GROUP BY T2.county ORDER BY COUNT(T1.label) DESC LIMIT 1
Database: restaurant
Question: Which region has the highest number of restaurants?
Evidence: the highest number refers to max(count(id_restaurant))
SQL: SELECT T1.region FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city GROUP BY T1.region ORDER BY COUNT(T2.id_restaurant) DESC LIMIT 1
Database: restaurant
Question: List the full address of all the American restaurants with a review of 4 or more?
Evidence: full address refers to street_num, street_name, city; American restaurant refers to food_type = 'american'; a review of 4 or more refers to review > 4
SQL: SELECT T1.street_num, T1.street_name, T1.city FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.review >= 4
Database: soccer_2016
Question: How many players were born after the year 1985?
Evidence: born after the year 1985 refers to SUBSTR(DOB, 1, 4) > 1985
SQL: SELECT COUNT(Player_Id) FROM Player WHERE SUBSTR(DOB, 1, 4) > 1985
Database: soccer_2016
Question: How many matches were there in May, 2008?
Evidence: in May 2008 refers to SUBSTR(Match_Date, 1, 4) = '2008' AND SUBSTR(Match_Date, 7, 1) = '5'
SQL: SELECT COUNT(Match_Id) FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2008' AND SUBSTR(Match_Date, 7, 1) = '5'
Database: soccer_2016
Question: For how many times has player no.41 won the "man of the match" award?
Evidence: player no.41 won the "man of the match" refers to Man_of_the_Match = 41
SQL: SELECT COUNT(Match_Id) FROM `Match` WHERE Man_of_the_Match = 41
Database: soccer_2016
Question: Please list the IDs of all the matches in the year 2008.
Evidence: ID of matches refers to Match_Id; in the year 2008 refers to SUBSTR(Match_Date, 1, 4) = '2008'
SQL: SELECT Match_Id FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2008'
Database: soccer_2016
Question: How many players are from Australia?
Evidence: Australia refers to Country_Name = 'Australia'
SQL: SELECT COUNT(CASE WHEN T2.Country_Name = 'Australia' THEN T1.Player_Id ELSE NULL END) FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_Id
Database: soccer_2016
Question: Which country is the oldest player from?
Evidence: country refers to Country_Name; the oldest refers to min(DOB)
SQL: SELECT T1.Country_Name FROM Country AS T1 INNER JOIN Player AS T2 ON T2.Country_Name = T1.Country_Id WHERE T2.Country_Name IS NOT NULL ORDER BY T2.DOB LIMIT 1
Database: soccer_2016
Question: What is the bowling skill of SC Ganguly?
Evidence: SC Ganguly refers to Player_Name = 'SC Ganguly'
SQL: SELECT T1.Bowling_Skill FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T2.Bowling_skill = T1.Bowling_Id WHERE T2.Player_Name = 'SC Ganguly'
Database: soccer_2016
Question: Among the players who use the right hand as their batting hand, how many of them were born after 1985?
Evidence: right hand as batting hand refers to Batting_Hand = 'Right-hand bat'; born after 1985 refers to SUBSTR(DOB, 1, 4) > 1985
SQL: SELECT SUM(CASE WHEN SUBSTR(T1.DOB, 1, 4) > 1985 THEN 1 ELSE 0 END) FROM Player AS T1 INNER JOIN Batting_Style AS T2 ON T1.Batting_hand = T2.Batting_Id WHERE T2.Batting_Hand = 'Right-hand bat'
Database: soccer_2016
Question: Please list the names of the players who use the right hand as their batting hand and are from Australia.
Evidence: name of player refers to Player_Name; right hand as batting hand refers to Batting_Hand = 'Right-hand bat'; Australia refers to Country_Name = 'Australia'
SQL: SELECT T2.Player_Name FROM Country AS T1 INNER JOIN Player AS T2 ON T2.Country_Name = T1.Country_id INNER JOIN Batting_Style AS T3 ON T2.Batting_hand = T3.Batting_Id WHERE T1.Country_Name = 'Australia' AND T3.Batting_Hand = 'Right-hand bat'
Database: soccer_2016
Question: Please list the bowling skills of all the players from Australia.
Evidence: Australia refers to Country_Name = 'Australia'
SQL: SELECT T2.Bowling_Skill FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id INNER JOIN Country AS T3 ON T1.Country_Name = T3.Country_Id WHERE T3.Country_Name = 'Australia' GROUP BY T2.Bowling_Skill
Database: soccer_2016
Question: Among the players whose bowling skill is "Legbreak", when was the oldest one of them born?
Evidence: the oldest refers to min(DOB); date of birth refers to DOB
SQL: SELECT MIN(T1.DOB) FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id WHERE T2.Bowling_Skill = 'Legbreak'
Database: soccer_2016
Question: What is the bowling skill used by most players?
Evidence: bowling skill used by most players refers to max(count(Bowling_Skill))
SQL: SELECT T1.Bowling_Skill FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T2.Bowling_skill = T1.Bowling_Id GROUP BY T1.Bowling_Skill ORDER BY COUNT(T1.Bowling_Skill) DESC LIMIT 1
Database: soccer_2016
Question: What is the name of the player who won the "man of the match" award in the match on 2008/4/18?
Evidence: name of player refers to Player_Name; on 2008/4/18 refers to Match_Date = '2008-04-18'
SQL: SELECT T2.Player_Name FROM Match AS T1 INNER JOIN Player AS T2 ON T2.Player_Id = T1.Man_of_the_Match WHERE T1.Match_Date = '2008-04-18'
Database: soccer_2016
Question: For how many times has SC Ganguly played as team captain in a match?
Evidence: SC Ganguly refers to Player_Name = 'SC Ganguly'; team captain refers to Role_Desc = 'Captain'
SQL: 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'
Database: soccer_2016
Question: What is the role of SC Ganguly in the match on 2008/4/18?
Evidence: 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'
SQL: 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'
Database: soccer_2016
Question: Among all the matches SC Ganguly has played in, what is the highest winning margin?
Evidence: SC Ganguly refers to Player_Name = 'SC Ganguly'; the highest winning margin refers to max(Win_Margin)
SQL: 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'
Database: soccer_2016
Question: What is the average winning margin of all the matches SC Ganguly has played in?
Evidence: SC Ganguly refers to Player_Name = 'SC Ganguly'; the average winning margin = divide(sum(Win_Margin), count(Match_Id)) where Player_Name = 'SC Ganguly'
SQL: 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'
Database: soccer_2016
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?
Evidence: 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
SQL: 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
Database: soccer_2016
Question: Give the name of the youngest player.
Evidence: name of player refers to Player_Name; the youngest refers to max(DOB)
SQL: SELECT Player_Name FROM Player ORDER BY DOB DESC LIMIT 1
Database: soccer_2016
Question: How many times has Sunrisers Hyderabad been the toss winner of a game?
Evidence: Sunrisers Hyderabad refers to Team_Name = 'Sunrisers Hyderabad'; time of toss winner refers to count(Toss_Winner)
SQL: SELECT SUM(CASE WHEN Toss_Winner = ( SELECT Team_Id FROM Team WHERE Team_Name = 'Sunrisers Hyderabad' ) THEN 1 ELSE 0 END) FROM `Match`
Database: soccer_2016
Question: Give the name of the striker in the match no. 419169, over no.3, ball no.2, inning no.2.
Evidence: 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
SQL: 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
Database: soccer_2016
Question: Give the name of venue for the game with a win margin of 138 points.
Evidence: name of venue refers to Venue_Name; a win margin of 138 points refers to Win_Margin = 138
SQL: 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
Database: soccer_2016
Question: For the game on 2008/5/12, who was the man of the match?
Evidence: on 2008/5/12 refers to Match_Date = '2008-05-12'; name refers to Player_Name;
SQL: 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'
Database: soccer_2016
Question: State the name of captain keeper of the match no.419117.
Evidence: name refers to Player_Name; captain keeper refers to Role_Desc = 'CaptainKeeper'; match no.419117 refers to Match_Id = '419117'
SQL: 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'
Database: soccer_2016
Question: Who was the man of the series in 2013? Give the full name.
Evidence: full name refers to Player_Name; in 2013 refers to Season_Year = 2013
SQL: 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
Database: soccer_2016
Question: Give the date of birth of the 2014 Orange Cap winner.
Evidence: date of birth refers to DOB; 2014 refers to Season_Year = 2014; Orange Cap winner refers to Orange_Cap IS NOT NULL
SQL: 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
Database: soccer_2016
Question: What is the nationality of the 7th season Purple Cap winner?
Evidence: nationality refers to Country_Name; the 7th season refers to Season_Id = 7; Purple Cap winner refers to Purple_Cap IS NOT NULL
SQL: 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
Database: soccer_2016
Question: Which country does Ranchi city belong to?
Evidence: country refers to Country_Name; Ranchi city refers to City_Name = 'Ranchi'
SQL: 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'
Database: soccer_2016
Question: How many Indian cities are there in the database?
Evidence: Indian refers to Country_Name = 'India'
SQL: 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
Database: soccer_2016
Question: State the name of the city with the most venues.
Evidence: name of the city refers to City_Name; the most venues refers to max(count(Venue_Id))
SQL: 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
Database: soccer_2016
Question: What is the batting hand of MK Pandey?
Evidence: MK Pandey refers to Player_Name = 'MK Pandey'
SQL: 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'
Database: soccer_2016
Question: In the database, how many times is the number of Indian cities to the South African cities?
Evidence: 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'))
SQL: 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
Database: soccer_2016
Question: How many times does M Chinnaswamy Stadium host games than Maharashtra Cricket Association Stadium?
Evidence: M Chinnaswamy Stadium refers to Venue_Name = 'M Chinnaswamy Stadium'; Maharashtra Cricket Association Stadium refers to Venue_Name = 'Maharashtra Cricket Association Stadium'; how many times = divide(count(Match_Id where Venue_Name = 'M Chinnaswamy Stadium'), count(Match_Id where Venue_Name = 'Maharashtra Cricket Association Stadium'))
SQL: 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
Database: soccer_2016
Question: Who is the oldest player?
Evidence: name of the player refers to Player_Name; the oldest refers to min(DOB)
SQL: SELECT Player_Name FROM Player ORDER BY DOB ASC LIMIT 1
Database: soccer_2016
Question: How many matches were played on May 2008?
Evidence: in May 2008 refers to SUBSTR(Match_Date, 1, 4) = '2008' AND SUBSTR(Match_Date, 7, 1) = '5'
SQL: SELECT SUM(CASE WHEN SUBSTR(Match_Date, 7, 1) = '5' THEN 1 ELSE 0 END) FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2008'
Database: soccer_2016
Question: How many players were born in the 90s?
Evidence: born in the 90s refers to DOB > = '1990-01-01' AND DOB < = '1999-12-31'
SQL: SELECT COUNT(Player_Id) AS cnt FROM Player WHERE DOB BETWEEN '1990-01-01' AND '1999-12-31'
Database: soccer_2016
Question: How many matches did Team 10 play in 2012?
Evidence: Team 10 refers to Team_1 = 10 OR Team_2 = 10; in 2012 refers to SUBSTR(Match_Date, 1, 4) = '2012'
SQL: SELECT SUM(CASE WHEN Team_1 = 10 OR Team_2 = 10 THEN 1 ELSE 0 END) FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2012'
Database: soccer_2016
Question: List the id of the player who won the Orange Cap for 2 consecutive seasons.
Evidence: id of the player who won the Orange Cap refers to Orange_Cap; for 2 consecutive seasons refers to count(Season_Year) > 1
SQL: SELECT Orange_Cap FROM Season GROUP BY Orange_Cap HAVING COUNT(Season_Year) > 1
Database: soccer_2016
Question: How many matches were played in Season 7?
Evidence: Season 7 refers to Season_Id = 7
SQL: SELECT COUNT(Match_Id) FROM `Match` WHERE Season_Id = 7
Database: soccer_2016
Question: How many umpires are from South Africa?
Evidence: South Africa refers to Country_Name = 'South Africa'
SQL: 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
Database: soccer_2016
Question: What is the name of the player with the highest number of outstanding player awards in a particular match?
Evidence: name of the player refers to Player_Name; the highest number of outstanding player awards refers to max(count(Man_of_the_Match))
SQL: 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
Database: soccer_2016
Question: In which country do the majority of the players are from?
Evidence: country refers to Country_Name; the majority of the players  refers to max(count(Country_Name))
SQL: 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
Database: soccer_2016
Question: How many Orange Cap awards were won by CH Gayle?
Evidence: CH Gayle refers to Player_Name = 'CH Gayle'
SQL: 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
Database: soccer_2016
Question: Which season played the highest number of matches at M Chinnaswamy Stadium?
Evidence: 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'
SQL: 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
Database: soccer_2016
Question: What is the name of the team that won the most number of matches in season 1?
Evidence: 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
SQL: SELECT Team_Name FROM Team WHERE Team_Id = ( SELECT Match_Winner FROM `Match` WHERE season_Id = 1 GROUP BY Match_Winner ORDER BY COUNT(Match_Winner) DESC LIMIT 1 )