db_id
stringclasses
69 values
schema
stringclasses
69 values
m_schema
stringclasses
69 values
question
stringlengths
24
325
sql
stringlengths
23
804
evidence
stringlengths
0
673
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
How many players have the bowling skill greater than 2?
SELECT COUNT(Player_Name) FROM Player WHERE Bowling_skill > 2
bowling skill greater than 2 refers to Bowling_skill > 2
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
How many players were born in 1970?
SELECT COUNT(Player_Name) FROM Player WHERE DOB LIKE '1970%'
born in 1970 refers to DOB like '1970%';
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
How many players were born in the 80s and have bowling skill of 2?
SELECT COUNT(Player_Name) FROM Player WHERE DOB LIKE '198%' AND Bowling_skill = 2
born in the 80s refers to DOB like '198%'; have bowling skill of 2 refers to Bowling_skill = 2;
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
How many matches are there in April, 2008?
SELECT COUNT(Match_Id) FROM Match WHERE Match_date LIKE '2008-04%'
in April, 2008 refers to Match_date like '2008-04%'
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
What is the city name of country ID 3?
SELECT City_Name FROM City WHERE Country_ID = 3
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
How many victory matches were there in 2008?
SELECT COUNT(Match_Id) FROM Match WHERE Match_Date LIKE '2008%' AND Match_Winner IS NOT NULL
in 2008 refers to Match_Date like '2008%'
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
Provide the country ID of East London.
SELECT Country_id FROM City WHERE City_Name = 'East London'
East London refers to City_Name = 'East London'
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
How old is SC Ganguly in 2008?
SELECT 2008 - strftime('%Y', DOB) FROM Player WHERE Player_Name = 'SC Ganguly'
SC Ganguly refers to Player_Name = 'SC Ganguly'; old refers to SUBTRACT(2008, strftime('%Y',DOB))
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
List the names of players who play by the left hand.
SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Batting_Style AS T2 ON T1.Batting_hand = T2.Batting_Id WHERE T2.Batting_hand = 'Left-hand bat'
play by the left hand refers to Batting_hand =   'Left-hand bat'
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
How many players are Indians?
SELECT COUNT(T1.Player_Id) FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_ID WHERE T2.Country_Name = 'India'
are Indians refers to Country_Name = 'India'
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
List the name of England players.
SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_ID WHERE T2.Country_Name = 'England'
England players refers to Country_Name = 'England'
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
What is the venue name of Bandladore?
SELECT T1.Venue_Name FROM Venue AS T1 INNER JOIN City AS T2 ON T1.City_ID = T2.City_ID WHERE T2.City_Name = 'Bangalore'
Bandladore refers to City_Name = 'Bangalore'
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
What are the names of players who participated in season year 2008?
SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match INNER JOIN Player_Match AS T3 ON T3.Player_Id = T1.Player_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id WHERE T4.Season_Year = 2008 GROUP BY T1.Player_Name
season year 2008 refers to Season_Year = 2008
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
What are the names of players that have run scored less than 3?
SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Batsman_Scored AS T3 ON T2.Match_ID = T3.Match_ID WHERE T3.Runs_Scored < 3 GROUP BY T1.Player_Name
scored less than 3 refers to Runs_Scored < 3; name of player refers to Player_name;
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
What is the role of SC Ganguly?
SELECT T3.Role_Desc 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' GROUP BY T3.Role_Desc
SC Ganguly refers to Player_Name = 'SC Ganguly'; role refers to Role_Desc
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
List the names of players who played as a keeper.
SELECT T1.Player_Name 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 T3.Role_Desc = 'Keeper' GROUP BY T1.Player_Name
played as a keeper refers to Role_Desc = 'Keeper'; name of player refers to Player_Name;
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
What are the names of players in team 1?
SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Team AS T3 ON T2.Team_Id = T3.Team_Id WHERE T3.Team_Id = 1 GROUP BY T1.Player_Name
in team 1 refers to Team_Id = 1; name of player refers to Player_Name;
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
How many players played as a captain in season year 2008?
SELECT COUNT(T1.Player_Id) FROM Player_Match AS T1 INNER JOIN Match AS T2 ON T1.Match_Id = T2.Match_Id INNER JOIN Rolee AS T3 ON T1.Role_Id = T3.Role_Id WHERE T3.Role_Desc = 'Captain' AND T2.Match_Date LIKE '2008%'
played as a captain refers to Role_Desc = 'Captain'; in season year 2008 refers Match_Date like '2008%'
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
Which teams did SC Ganguly join in season year 2008?
SELECT T5.Team_Name FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match INNER JOIN Player_Match AS T3 ON T3.Player_Id = T1.Player_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id INNER JOIN Team AS T5 ON T3.Team_Id = T5.Team_Id WHERE T4.Season_Year = 2008 AND T1.Player_Name = 'SC Gan...
SC Ganguly refers to Player_Name = 'SC Ganguly'; in season year 2008 refers to Season_Year = 2008
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
What type did match ID 336000 win?
SELECT T2.Win_Type FROM Match AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id WHERE T1.Match_Id = 336000
type of match won refers to Win_Type
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
Where did SB Joshi come from?
SELECT T2.Country_Name FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_ID WHERE T1.Player_Name = 'SB Joshi'
SB Joshi refers to Player_Name = 'SB Joshi'; where the player come from refers to Country_Name
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
How many players have left arm fast in bowling skill?
SELECT COUNT(T1.Player_Id) FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id WHERE T2.Bowling_skill = 'Left-arm fast'
have left arm fast in bowling skill refers to Bowling_skill = 'Left-arm fast';
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
What is the outcome type of match ID 392195?
SELECT T2.Outcome_Type FROM Match AS T1 INNER JOIN Outcome AS T2 ON T1.Outcome_type = T2.Outcome_Id WHERE T1.Match_Id = '392195'
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
Who is the youngest player and which city did he/she come from?
SELECT T3.City_Name FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_Id INNER JOIN City AS T3 ON T2.Country_Id = T3.Country_Id ORDER BY T1.DOB LIMIT 1
youngest player refers to MIN(DOB); city refers to City_Name
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
How many matches did team Kings XI Punjab win in season year 2008?
SELECT COUNT(DISTINCT T2.Match_Id) FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Player_Match AS T3 ON T1.Team_Id = T3.Team_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id WHERE T1.Team_Name = 'Kings XI Punjab' AND T4.Season_Year = 2008
in season year 2008 refers to Season_Year = 2008; team Kings XI Punjab refers to Team_Name = 'Kings XI Punjab'
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
How many seasons did Pune Warriors participate in?
SELECT COUNT(T.Season_Year) FROM ( SELECT T4.Season_Year FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Player_Match AS T3 ON T1.Team_Id = T3.Team_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id WHERE T1.Team_Name = 'Pune Warriors' GROUP BY T4.Season_Year ) T
Pune Warriors refers to Team_Name = 'Pune Warriors'
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
What year was R Dravid born and the role he played?
SELECT T1.DOB, T3.Role_Desc 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 = 'R Dravid' GROUP BY T1.DOB, T3.Role_Desc
R Dravid refers to Player_Name = 'R Dravid'; year born refers to DOB; role refers to Role_Desc
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
How many times did SC Ganguly be the man of the match?
SELECT COUNT(T2.Man_of_the_Match) FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match INNER JOIN Player_Match AS T3 ON T3.Player_Id = T1.Player_Id WHERE T1.Player_Name = 'SC Ganguly'
SC Ganguly refers to Player_Name = 'SC Ganguly'
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
How many matches did team Mumbai Indians win in 2008?
SELECT COUNT(T.Match_Id) FROM ( SELECT T2.Match_Id FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Player_Match AS T3 ON T1.Team_Id = T3.Team_Id WHERE T1.Team_Name = 'Mumbai Indians' AND T2.Match_Date LIKE '2008%' GROUP BY T2.Match_Id ) T
team Mumbai Indians refers to Team_Name = 'Mumbai Indians'; in 2008 refers to Match_Date like '2008%'
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
Which team won by wickets in match ID 335993?
SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Player_Match AS T3 ON T1.Team_Id = T3.Team_Id INNER JOIN Win_By AS T4 ON T2.Win_Type = T4.Win_Id WHERE T2.Match_Id = '335993' GROUP BY T1.Team_Name
team refers to Team_Name
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
Count the matches that were won by wickets in all season.
SELECT COUNT(T1.Match_Id) FROM Match AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id WHERE T2.Win_type = 'wickets'
won by wickets refers to Win_type = 'wickets';
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
What is the role of W Jaffer in season year 2012?
SELECT T4.Role_Desc 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 INNER JOIN Rolee AS T4 ON T2.Role_Id = T4.Role_Id INNER JOIN Season AS T5 ON T3.Season_Id = T5.Season_Id WHERE T1.Player_name = 'W Jaffer' AND T5.Season_Year = 2012
W Jaffer refers to Player_name = 'W Jaffer'; in season year 2012 refers to Season_Year = 2012; role refers to Role_Desc
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
What are the names of players who had been man of the match more than 5 times in season year 2008?
SELECT CASE WHEN COUNT(T2.Man_of_the_Match) > 5 THEN T1.Player_Name ELSE 0 END FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match INNER JOIN Player_Match AS T3 ON T3.Player_Id = T1.Player_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id WHERE T4.Season_Year = 2008
man of the match more than 5 times refers to COUNT(Man_of_the_Match) > 5; in season year 2008 refers to Season_Year = 2008; name of player refers to Player_Name;
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
What is the average of Indian players that were born between 1975 and 1985 among all players?
SELECT CAST(SUM(CASE WHEN T2.Country_Name = 'India' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.Player_Id) FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_ID WHERE strftime('%Y', T1.DOB) BETWEEN '1975' AND '1985'
Indian players refers to Country_Name = 'India'; born between 1975 and 1985 refers to strftime('%Y',T1.DOB) between '1975' and '1985'; average refers to DIVIDE(COUNT(Country_Name = 'India'), COUNT(Player_Id))
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
Calculate the percentage of left hand batting style players among all players.
SELECT CAST(SUM(CASE WHEN T2.Batting_hand = 'Left-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
left hand batting style players refers to Batting_hand = 'Left-hand bat'; percentage refers to DIVIDE(COUNT(Batting_hand = 'Left-hand bat'), COUNT(Player_Id)) * 100.0
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
What is the percentage of matches that are won by runs?
SELECT CAST(SUM(CASE WHEN T1.win_type = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Win_Type) FROM Match AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id
won by runs refers to win_type = 1; percentage refers to DIVIDE(COUNT(win_type = 1), COUNT(Win_Type)) * 100
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
How many matches have 7 points of winning margin?
SELECT COUNT(Match_Id) FROM Match WHERE win_margin = 7
have 7 points of winning margin refers to win_margin = 7;
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
What is the total number of players born between 1970 to 1975?
SELECT COUNT(Player_Id) FROM Player WHERE strftime('%Y', DOB) BETWEEN '1970' AND '1975'
born between 1970 to 1975 refers to strftime('%Y',DOB) between '1970' and '1975'
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
Who is the winning team in a match held on April 26, 2009 with a winning margin of 6 points?
SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner WHERE T2.Win_Margin = 6 AND T2.Match_Date = '2009-04-26'
winning margin of 6 points refers to Win_Margin = 6; held on April 26, 2009 refers to Match_Date = '2009-04-26'
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
In the match ID 419135, who won by runs?
SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Win_By AS T3 ON T2.win_type = T3.win_id WHERE T2.Match_Id = 419135
who refers to Team_Name
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
Among the matches held in St. George's Park, give the match ID of the match with the highest winning margin points.
SELECT T2.Match_Id FROM Venue AS T1 INNER JOIN Match AS T2 ON T1.venue_id = T2.venue_id WHERE T1.Venue_Name = 'St George''s Park' ORDER BY T2.Win_Margin DESC LIMIT 1
held in St. George's Park refers to Venue_Name = 'St George''s Park'; highest winning margin points refers to MAX(Win_Margin)
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
How many of the players are from Sri Lanka?
SELECT COUNT(*) FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_ID WHERE T2.Country_Name = 'Sri Lanka'
from Sri Lanka refers to Country_Name = 'Sri Lanka';
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
List the player's name who played as a captain.
SELECT T2.Player_Name FROM Player_Match AS T1 INNER JOIN Player AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Rolee AS T3 ON T1.Role_Id = T3.Role_Id WHERE T3.Role_Desc = 'Captain' GROUP BY T2.Player_Name
played as a captain refers to Role_Desc = 'captain'; player refers to Player_Name
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
Give the match's venue and winning team for the match ID 392194.
SELECT T1.Venue_Name, T3.Team_Name FROM Venue AS T1 INNER JOIN Match AS T2 ON T1.venue_id = T2.venue_id INNER JOIN Team AS T3 ON T2.match_winner = T3.Team_Id WHERE T2.Match_Id = 392194
venue refers to Venue_Name; winning team refers to match_winner
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...
【DB_ID】 soccer_2016 【Schema】 # Table: main.Ball_by_Ball [ (Match_Id:INTEGER, Primary Key, Examples: [335987, 335988, 335989]), (Over_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Ball_Id:INTEGER, Primary Key, Examples: [1, 2, 3]), (Innings_No:INTEGER, Primary Key, Examples: [1, 2, 3]), (Team_Batting:INTEGER, Examples...
Among the matches of Delhi Daredevils in 2009, what is the percentage of their matches won by wickets?
SELECT CAST(SUM(CASE WHEN T3.Win_Type = 'wickets' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.Win_Type) FROM Team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Match_Winner INNER JOIN Win_By AS T3 ON T2.Win_Type = T3.Win_Id WHERE T1.Team_Name = 'Delhi Daredevils'
Delhi Daredevils refers to team_name = 'Delhi Daredevils'; in 2009 refers to Match_Date = '2009%'; won by wickets refers to Win_Type = 'wickets'; percentage refers to DIVIDE(COUNT(Win_Type = 'wickets'), COUNT(Win_Type))
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
What is the release title of the single that was released by Ron Hunt in 1979 that was downloaded 239 times?
SELECT groupName FROM torrents WHERE artist LIKE 'ron hunt & ronnie g & the sm crew' AND groupYear = 1979 AND releaseType LIKE 'single' AND totalSnatched = 239
release title refers to groupName; Ron Hunt is an artist; groupYear = 1979; releaseType = 'single'; downloaded 239 times refer to totalSnatched = 239;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
How many times was the album released by blowfly in 1980 downloaded?
SELECT totalSnatched FROM torrents WHERE artist LIKE 'blowfly' AND groupYear = 1980
blowfly is an artist; groupYear = 1980; album refers to releaseType; downloaded refers to totalSnatched;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
What is the tag of the album with the highest amount of downloads?
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'album' ORDER BY T1.totalSnatched DESC LIMIT 1
album refers to releaseType; the highest amount of downloads refers to MAX(totalSnatched);
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
What are the top 5 tags with the highest amount of downloads?
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'album' ORDER BY T1.totalSnatched DESC LIMIT 5
the highest amount of downloads refers to MAX(totalSnatched);
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
What is the release title of the single under the "funk" tag that was released the oldest?
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag LIKE 'funk' AND T1.releaseType = 'single' ORDER BY T1.groupYear LIMIT 1
release title of single refers to groupName where releaseType = 'single'; the oldest means coming before all others in time and refers to MIN(groupYear);
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Name all the release titles of the "ep's" under the alternative tag.
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag LIKE 'alternative' AND T1.releaseType = 'ep'
release titles of the "ep's" refer to groupName where releaseType = 'ep';
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
What are the tags of the top 5 least downloaded live albums?
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'album' ORDER BY T1.totalSnatched LIMIT 5
least downloaded album refers to MIN(totalSnatched where releaseType = 'album');
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
What is the tag and the artist of the most downloaded single?
SELECT T2.tag, T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'single' ORDER BY T1.totalSnatched DESC LIMIT 1
the most downloaded single refers to MAX(totalSnatched where releaseType = 'single');
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
How many releases are tagged "1980s"?
SELECT COUNT(id) FROM tags WHERE tag LIKE '1980s'
tag = '1980s';
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
How many times has the release "city funk" been downloaded?
SELECT totalSnatched FROM torrents WHERE groupName LIKE 'city funk'
groupName = 'city funk'; downloaded refers to totalSnatched;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Please list the releases that have been downloaded for more than 20000 times.
SELECT groupName FROM torrents WHERE totalSnatched > 20000
releases refer to groupName; downloaded for more than 20000 times refers to totalSnatched > 20000;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
What are the tags of the release "sugarhill gang"?
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupName = 'sugarhill gang'
release "sugarhill gang" refers to groupName = 'sugarhill gang';
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
How many tags does the release "city funk" have?
SELECT COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupName = 'city funk'
release "city funk" refers to groupName = 'city funk';
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Please list the titles of all the releases with the tag "1980s".
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s'
titles refer to groupName;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Among the releases with the tag "1980s", which one of them is the most downloaded? Please give its title.
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s' ORDER BY T1.totalSnatched DESC LIMIT 1
title refers to groupName; the most downloaded refers to MAX(totalSnatched);
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
How many releases by the artist michael jackson are tagged "pop"?
SELECT COUNT(T1.groupName) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'pop' AND T1.artist = 'michael jackson'
tag = 'pop';
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Among the releases that were released in 2000, how many of them were released as an album and tagged "pop"?
SELECT COUNT(T1.groupName) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'pop' AND T1.releaseType = 'album' AND T1.groupYear = 2000
groupYear = 2000; album refers to releaseType;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
What are the average download times for the a release tagged "1980s"?
SELECT CAST(SUM(T1.totalSnatched) AS REAL) / COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s'
AVG(totalSnatched where tag = '1980s');
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Name the title of the top three releases with the highest number of downloads.
SELECT groupName FROM torrents ORDER BY totalSnatched DESC LIMIT 3
title refers to groupName; the highest number of downloads refers to MAX(totalSnatched);
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Provide the name of the artist who released his or her Single-Table in 2012 with the highest number of downloads. Name the Single-Table title as well.
SELECT artist, groupName FROM torrents WHERE groupYear = 2012 AND releaseType LIKE 'Single' ORDER BY totalSnatched DESC LIMIT 1
title refers to groupName; the highest number of downloads refers to MAX(totalSnatched where groupYear = 2012 and releaseType = 'single');
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
How many albums and Single-Tables were released by the artist named '50 cent' between 2010 and 2015?
SELECT COUNT(id), ( SELECT COUNT(id) FROM torrents WHERE groupYear BETWEEN 2010 AND 2015 AND artist LIKE '50 cent' AND releaseType LIKE 'album' ) FROM torrents WHERE groupYear BETWEEN 2010 AND 2015 AND artist LIKE '50 cent' AND releaseType LIKE 'Single'
albums refer to releaseType = 'album'; releaseType = 'single'; between 2010 and 2015 refers to groupYear between 2010 and 2015;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
An American rapper '2Pac' released his first solo album in 1991, how many years have passed until his next album was released?
SELECT ( SELECT groupYear FROM torrents WHERE artist LIKE '2Pac' AND releaseType LIKE 'album' ORDER BY groupYear LIMIT 1, 1 ) - groupYear FROM torrents WHERE artist LIKE '2Pac' AND releaseType LIKE 'album' AND groupYear = 1991
2Pac is an artist; album refers to releaseType; groupYear = 1991; SUBTRACT(groupYear = 1991, groupYear where releaseType = 'album' LIMIT 1 OFFSET 1);
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Find the average number of downloads for Single-Tables released by '2Pac' between 2001 and 2013.
SELECT AVG(totalSnatched) FROM torrents WHERE artist LIKE '2Pac' AND releaseType LIKE 'Single' AND groupYear BETWEEN 2001 AND 2013
2Pac is an artist; releaseType = 'single'; between 2001 and 2013 refers to groupYear between 2001 and 2013; average number of downloads = AVG(totalSnatched);
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Provide the title, release year and the tag associated with the live album that has the highest number of downloads?
SELECT T1.groupName, T1.groupYear, T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'live album' ORDER BY T1.totalSnatched DESC LIMIT 1
release year refers to groupYear; title of live album refers to groupName where releaseType = 'live album'; the highest number of downloads refers to MAX(totalSnatched);
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Provide the name of artists who released at least two bootlegs in 2016.
SELECT artist FROM torrents WHERE groupYear = 2016 AND releaseType LIKE 'bootleg' GROUP BY artist HAVING COUNT(releaseType) > 2
at least two bootlegs refer to COUNT(releaseType = 'bootleg')≥ 2; groupYear = 2016;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Which artist released singles between 1980 to 1982?
SELECT artist FROM torrents WHERE groupYear BETWEEN 1980 AND 1982 AND releaseType LIKE 'single'
releaseType = 'single'; between 1980 to 1982 refers to groupYear between 1980 and 1982;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Indicates groups with id from 10 to 20 with singles downloaded at least 20.
SELECT groupName FROM torrents WHERE totalSnatched >= 20 AND releaseType LIKE 'single' AND id BETWEEN 10 AND 20
releaseType = 'single'; downloaded at least 20 refers to totalSnatched ≥ 20; id from 10 to 20 refer to id between 10 and 20; groups refer to groupName;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Among the artists from 1980 to 1982. Which artist was tagged as "disco"?
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'disco' AND T1.groupYear BETWEEN 1980 AND 1982
from 1980 to 1982 refers to groupYear between 1980 and 1982; tag = 'disco';
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Provide the name of artists who had no more than 100 downloads and are tagged "funk" in 1980.
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'funk' AND T1.groupYear = 1980 AND T1.totalSnatched <= 100
no more than 100 downloads refer to totalSnatched ≤ 100; groupYear = 1980; tag = 'funk';
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Which artist has released the most singles with the tag "soul"?
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'soul' AND T1.releaseType = 'single' GROUP BY T1.artist ORDER BY COUNT(T1.releaseType) DESC LIMIT 1
the most singles refer to MAX(COUNT(releaseType = 'single'));
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Among the artists with the id from 10 to 30. Which artist released the product with the tag "funk" in 1980?
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'funk' AND T1.groupYear = 1980 AND T1.id BETWEEN 10 AND 30
id from 10 to 30 refers to id between 10 and 30; groupYear = 1980;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
List the group name has the most downloaded that have released jazz genres from 1982 or later.
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'jazz' AND T1.groupYear >= 1982 ORDER BY T1.totalSnatched DESC LIMIT 1
the most downloaded refers to MAX(totalSnatched); tag = 'jazz'; from 1982 or later refers to groupYear ≥ 1982;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Which artist has id "16"? Provide her or his tag genre.
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.id = 16
FALSE;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Among id from 10 to 50. Which artist tagged as "new.york" has the most downloads?
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.id BETWEEN 10 AND 50 AND T2.tag LIKE 'new.york' ORDER BY T1.totalSnatched DESC LIMIT 1
Among id from 10 to 50 refers to id between 10 and 50; tag = 'new.york'; the most downloads refer to MAX(totalSnatched);
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
List the name of artists who have released albums and mixtape from 1980 to 1985 in "dance" genre.
SELECT COUNT(T1.artist) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'dance' AND T1.groupYear BETWEEN 1980 AND 1985 AND T1.releaseType LIKE 'album' OR T1.releaseType LIKE 'mixtape'
albums and mixtape refer to releaseType; from 1980 to 1985 refers to groupYear between 1980 and 1985; tag = 'dance';
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
How many singles were released between 1979 and 1981 labeled as "soul"?
SELECT COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'soul' AND T1.groupYear BETWEEN 1979 AND 1981 AND T1.releaseType LIKE 'single'
releaseType = 'single'; between 1979 and 1981 refers to groupYear between 1979 and 1981; tag = 'soul';
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
How many singles were released in 1979?
SELECT COUNT(releaseType) FROM torrents WHERE releaseType LIKE 'single' AND groupYear = 1979
releaseType = 'single'; groupYear = 1979;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
In 1980, how many singles were released by sugar daddy?
SELECT COUNT(releaseType) FROM torrents WHERE artist LIKE 'sugar daddy' AND releaseType LIKE 'Single' AND groupYear = 1980
sugar daddy is an artist; releaseType = 'single'; groupYear = 1980;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
How many christmas albums were released in 2004?
SELECT COUNT(T1.id) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'christmas' AND T1.groupYear = 2004 AND T1.releaseType LIKE 'album'
album refers to releaseType; groupYear = 2004; tag = 'christmas';
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Please list all tags of kurtis blow from 2000 to 2010.
SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear BETWEEN 2000 AND 2010 AND T1.artist LIKE 'kurtis blow'
kurtis blow is an artist; from 2000 to 2010 refers to groupYear between 2000 and 2010;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Which album title and tag that millie jackson released in 1980?
SELECT T1.groupName, T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear = 1980 AND T1.artist LIKE 'millie jackson' AND T1.releaseType LIKE 'album'
millie jackson is an artist; album title refers to groupName where releaseType = 'album'; groupYear = 1980;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Please list all release titles whose tag is jazz in 2005.
SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear = 2005 AND T2.tag LIKE 'jazz'
release titles refer to groupName; groupYear = 2005;
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
From 1980 to 2000, which artist had the most disco releases?
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear BETWEEN 1980 AND 2000 AND T2.tag LIKE 'disco' GROUP BY T1.artist ORDER BY COUNT(T2.tag) DESC LIMIT 1
From 1980 to 2000 refers to groupYear between 1980 and 2000; tag = 'disco'; the most releases refer to MAX(COUNT(id));
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
Which artists have released singles with the tag 1970s?
SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'single' AND T2.tag LIKE '1970s'
releaseType = 'single';
music_tracker
CREATE TABLE "torrents" ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER constraint torrents_pk primary key ); CREATE TABLE "tags" ( "index" INTEGER constr...
【DB_ID】 music_tracker 【Schema】 # Table: main.tags [ (index:INTEGER, Primary Key, Examples: [0, 1, 2]), (id:INTEGER, Examples: [0, 2, 3]), (tag:TEXT, Examples: [1970s, funk, disco]) ] # Table: main.torrents [ (groupName:TEXT, Examples: [superappin&#39;]), (totalSnatched:INTEGER, Examples: [239, 156, 480]), (artist:TEXT,...
From 1979 to 1982, what was the percentage of united.states albums out of total albums were released?
SELECT CAST(SUM(CASE WHEN T2.tag LIKE 'united.states' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.releaseType) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear BETWEEN 1979 AND 1982 AND T1.releaseType LIKE 'album'
From 1979 to 1982 refers to groupYear between 1979 and 1982; United States refer to tag; albums refer to releaseType; DIVIDE(COUNT(releaseType = 'album' where tag = 'united.states' and groupYear between 1979 and 1982), COUNT(releaseType = 'album' where groupYear between 1979 and 1982)) as percentage;
world_development_indicators
CREATE TABLE "Country" ( CountryCode TEXT not null primary key, ShortName TEXT, TableName TEXT, LongName TEXT, Alpha2Code TEXT, ...
【DB_ID】 world_development_indicators 【Schema】 # Table: main.Country [ (CountryCode:TEXT, Primary Key, Examples: [ABW, ADO, AFG]), (ShortName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (TableName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (LongName:TEXT, Examples: [Islamic State of Afghanistan]), (Alpha2Co...
Among the countries in the group of Heavily Indebted Poor Countries, how many of them are under the lending category of the International Development Associations?
SELECT COUNT(CountryCode) FROM Country WHERE LendingCategory = 'IDA' AND OtherGroups = 'HIPC'
group of Heavily Indebted Poor Countries is OtherGroups = 'HIPC'; International Development Associations refers to lendingcategory = 'IDA'
world_development_indicators
CREATE TABLE "Country" ( CountryCode TEXT not null primary key, ShortName TEXT, TableName TEXT, LongName TEXT, Alpha2Code TEXT, ...
【DB_ID】 world_development_indicators 【Schema】 # Table: main.Country [ (CountryCode:TEXT, Primary Key, Examples: [ABW, ADO, AFG]), (ShortName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (TableName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (LongName:TEXT, Examples: [Islamic State of Afghanistan]), (Alpha2Co...
Please list the countries under the lending category of the International Development Associations and have a external debt reporting finished by estimation.
SELECT ShortName, ExternalDebtReportingStatus FROM Country WHERE LendingCategory = 'IDA'
countries refer to the ShortName; International Development Associations refers to lendingcategory = 'IDA'; have a external debt reporting finished by estimation refers to ExternalDebtReportingStatus = 'Estimate'
world_development_indicators
CREATE TABLE "Country" ( CountryCode TEXT not null primary key, ShortName TEXT, TableName TEXT, LongName TEXT, Alpha2Code TEXT, ...
【DB_ID】 world_development_indicators 【Schema】 # Table: main.Country [ (CountryCode:TEXT, Primary Key, Examples: [ABW, ADO, AFG]), (ShortName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (TableName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (LongName:TEXT, Examples: [Islamic State of Afghanistan]), (Alpha2Co...
What's the description of the series code SM.POP.TOTL for Aruba?
SELECT T2.Description FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Seriescode = 'SM.POP.TOTL'
Aruba is the name of the country where ShortName = 'Aruba'
world_development_indicators
CREATE TABLE "Country" ( CountryCode TEXT not null primary key, ShortName TEXT, TableName TEXT, LongName TEXT, Alpha2Code TEXT, ...
【DB_ID】 world_development_indicators 【Schema】 # Table: main.Country [ (CountryCode:TEXT, Primary Key, Examples: [ABW, ADO, AFG]), (ShortName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (TableName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (LongName:TEXT, Examples: [Islamic State of Afghanistan]), (Alpha2Co...
Please list the countries in Latin America & Caribbean with a note on the series code SM.POP.TOTL.
SELECT T1.SHORTNAME, T2.Description FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.Region = 'Latin America & Caribbean' AND T2.Seriescode = 'SM.POP.TOTL'
Countries refer to the ShortName; Latin America & Caribbean is the name of the region
world_development_indicators
CREATE TABLE "Country" ( CountryCode TEXT not null primary key, ShortName TEXT, TableName TEXT, LongName TEXT, Alpha2Code TEXT, ...
【DB_ID】 world_development_indicators 【Schema】 # Table: main.Country [ (CountryCode:TEXT, Primary Key, Examples: [ABW, ADO, AFG]), (ShortName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (TableName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (LongName:TEXT, Examples: [Islamic State of Afghanistan]), (Alpha2Co...
Among the countries with note on the series code SM.POP.TOTL, how many of them are in the low-income group?
SELECT COUNT(T1.Countrycode) FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Seriescode = 'SM.POP.TOTL' AND T1.IncomeGroup = 'Low income'
countries refer to Countrycode; low-income group refers to incomegroup = 'Low income'; with notes refers to description IS NOT NULL; series code SM.POP.TOTL refers to Seriescode = 'SM.POP.TOTL'
world_development_indicators
CREATE TABLE "Country" ( CountryCode TEXT not null primary key, ShortName TEXT, TableName TEXT, LongName TEXT, Alpha2Code TEXT, ...
【DB_ID】 world_development_indicators 【Schema】 # Table: main.Country [ (CountryCode:TEXT, Primary Key, Examples: [ABW, ADO, AFG]), (ShortName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (TableName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (LongName:TEXT, Examples: [Islamic State of Afghanistan]), (Alpha2Co...
Please list the descriptions of the series code SM.POP.TOTL for all the countries that are under the lending category of the International Development Associations.
SELECT T2.Description FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.LendingCategory = 'IDA' AND T2.Seriescode = 'SM.POP.TOTL'
Countries are the Countrycode; International Development Associations refers to lendingcategory = 'IDA'
world_development_indicators
CREATE TABLE "Country" ( CountryCode TEXT not null primary key, ShortName TEXT, TableName TEXT, LongName TEXT, Alpha2Code TEXT, ...
【DB_ID】 world_development_indicators 【Schema】 # Table: main.Country [ (CountryCode:TEXT, Primary Key, Examples: [ABW, ADO, AFG]), (ShortName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (TableName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (LongName:TEXT, Examples: [Islamic State of Afghanistan]), (Alpha2Co...
How many low-income countries under the lending category of the International Development Associations have a note on the series code SM.POP.TOTL?
SELECT COUNT(T1.Countrycode) FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.LendingCategory = 'IDA' AND T2.Seriescode = 'SM.POP.TOTL' AND IncomeGroup = 'Low income'
low-income countries are where the incomegroup = Low income
world_development_indicators
CREATE TABLE "Country" ( CountryCode TEXT not null primary key, ShortName TEXT, TableName TEXT, LongName TEXT, Alpha2Code TEXT, ...
【DB_ID】 world_development_indicators 【Schema】 # Table: main.Country [ (CountryCode:TEXT, Primary Key, Examples: [ABW, ADO, AFG]), (ShortName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (TableName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (LongName:TEXT, Examples: [Islamic State of Afghanistan]), (Alpha2Co...
Among the countries in the High income: OECD group whose currency unit is Euro, how many of them have a note on the series code SP.DYN.AMRT.FE?
SELECT COUNT(T1.Countrycode) FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.IncomeGroup = 'High income: OECD' AND T1.CurrencyUnit = 'Euro' AND T2.Seriescode = 'SP.DYN.AMRT.FE'
countries refer to Countrycode; in the high income refers to incomegroup = 'High'; with notes refers to description IS NOT NULL; series code SP.DYN.AMRT.FE refers to Seriescode = 'SP.DYN.AMRT.FE'
world_development_indicators
CREATE TABLE "Country" ( CountryCode TEXT not null primary key, ShortName TEXT, TableName TEXT, LongName TEXT, Alpha2Code TEXT, ...
【DB_ID】 world_development_indicators 【Schema】 # Table: main.Country [ (CountryCode:TEXT, Primary Key, Examples: [ABW, ADO, AFG]), (ShortName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (TableName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (LongName:TEXT, Examples: [Islamic State of Afghanistan]), (Alpha2Co...
What is the long name of the country with the description "Estimates are derived from data on foreign-born population." on the series code SM.POP.TOTL?
SELECT T1.LongName FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Estimates are derived FROM data on foreign-born population.' AND T2.Seriescode = 'SM.POP.TOTL'
world_development_indicators
CREATE TABLE "Country" ( CountryCode TEXT not null primary key, ShortName TEXT, TableName TEXT, LongName TEXT, Alpha2Code TEXT, ...
【DB_ID】 world_development_indicators 【Schema】 # Table: main.Country [ (CountryCode:TEXT, Primary Key, Examples: [ABW, ADO, AFG]), (ShortName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (TableName:TEXT, Examples: [Afghanistan, Albania, Algeria]), (LongName:TEXT, Examples: [Islamic State of Afghanistan]), (Alpha2Co...
What is the description of the footnote on the series code AG.LND.FRST.K2 in 1990 for Aruba?
SELECT T2.Description FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Seriescode = 'AG.LND.FRST.K2' AND T2.Year = 'YR1990'
Year = 1990; Aruba is the name of country where ShortName = 'Aruba'