db_id stringclasses 66
values | question stringlengths 24 325 | evidence stringlengths 1 673 ⌀ | gold_query stringlengths 23 804 | db_schema stringclasses 66
values |
|---|---|---|---|---|
music_tracker | Which artists have released singles with the tag 1970s? | releaseType = 'single'; | 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' | CREATE TABLE torrents
(
groupName TEXT, --
totalSnatched INTEGER, --
id INTEGER constraint torrents_pk primary key,
artist TEXT, --
releaseType TEXT, -- Example Values: `single`, `album`, `live album`, `ep`, `unknown` | Value Statics: Total count 75719 - Distinct count 15 - Null count 0
groupYear INTEGER... |
world_development_indicators | Please list the countries under the lending category of the International Development Associations and have a external debt reporting finished by estimation. | countries refer to the ShortName; International Development Associations refers to lendingcategory = 'IDA'; have a external debt reporting finished by estimation refers to ExternalDebtReportingStatus = 'Estimate' | SELECT ShortName, ExternalDebtReportingStatus FROM Country WHERE LendingCategory = 'IDA' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
soccer_2016 | Who is the winning team in a match held on April 26, 2009 with a winning margin of 6 points? | winning margin of 6 points refers to Win_Margin = 6; held on April 26, 2009 refers to Match_Date = '2009-04-26' | 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' | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
world_development_indicators | Among the countries with note on the series code SM.POP.TOTL, how many of them are in the low-income group? | 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' | 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' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | 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? | group of Heavily Indebted Poor Countries is OtherGroups = 'HIPC'; International Development Associations refers to lendingcategory = 'IDA' | SELECT COUNT(CountryCode) FROM Country WHERE LendingCategory = 'IDA' AND OtherGroups = 'HIPC' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | 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? | 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' | 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' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | Please list the countries in Latin America & Caribbean with a note on the series code SM.POP.TOTL. | Countries refer to the ShortName; Latin America & Caribbean is the name of the region | 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' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | How many low-income countries under the lending category of the International Development Associations have a note on the series code SM.POP.TOTL? | low-income countries are where the incomegroup = Low income | 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' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
soccer_2016 | What is the percentage of matches that are won by runs? | won by runs refers to win_type = 1; percentage refers to DIVIDE(COUNT(win_type = 1), COUNT(Win_Type)) * 100 | 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 | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
world_development_indicators | What is the description of the footnote on the series code AG.LND.FRST.K2 in 1990 for Aruba? | Year = 1990; Aruba is the name of country where ShortName = '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' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | 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. | Countries are the Countrycode; International Development Associations refers to lendingcategory = 'IDA' | 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' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | Please list the countries that got the footnote "Data are classified as official aid." on the series code DC.DAC.AUSL.CD in 2002. | countries are the Countrycode; footnote refers to Description = 'Data are classified as official aid' | SELECT T1.SHORTNAME FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Data are classified as official aid.' AND T2.Seriescode = 'DC.DAC.AUSL.CD' AND T2.Year LIKE '%2002%' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | 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? | null | 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' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | On which years did Aruba got a footnote on the series code AG.LND.FRST.K2? | Aruba is the name of country where ShortName = 'Aruba' | SELECT T2.Year 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' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
soccer_2016 | In the match ID 419135, who won by runs? | who refers to Team_Name | 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 | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
soccer_2016 | List the player's name who played as a captain. | played as a captain refers to Role_Desc = 'captain'; player refers to Player_Name | 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 | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
world_development_indicators | For how many consecutive years did Aruba get a footnote on the series code BX.KLT.DINV.CD.WD? | Aruba is the name of country where ShortName = 'Aruba' | SELECT COUNT(T2.Year) FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Seriescode = 'BX.KLT.DINV.CD.WD' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
soccer_2016 | Calculate the percentage of left hand batting style players among all players. | 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 | 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 | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
world_development_indicators | What are the special notes for the country whose average adolescent fertility rate is the highest? | the average adolescent fertility rate is DIVIDE(SUM(value), SUM(IndicatorName like 'adolescent fertility rate%')); MAX(average adolescent fertility rate) | SELECT DISTINCT T1.SpecialNotes FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Value = ( SELECT Value FROM Indicators WHERE IndicatorName LIKE 'Adolescent fertility rate%' ORDER BY Value DESC LIMIT 1 ) | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | How many footnotes did Aruba got on different series code in the year 2002? | Aruba is the name of country where ShortName = 'Aruba' | SELECT COUNT(T2.SeriesCode) FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Year = 'YR2002' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | What is the average value of Adjusted net enrolment rate, primary, both sexes (%) indicator in Algeria from 1975 to 1980? | the average value of Adjusted net enrolment rate, primary, both sexes (%) is DIVIDE(SUM(Value), SUM(IndicatorName = 'Adjusted net enrolment rate, primary, both sexes (%)')); Year BETWEEN 1975 AND 1980; Algeria is the name of country where CountryName = 'Algeria' | SELECT CAST(SUM(Value) AS REAL) / COUNT(CountryCode) FROM Indicators WHERE CountryName = 'Algeria' AND Year > 1974 AND Year < 1981 AND IndicatorName = 'Adjusted net enrolment rate, primary, both sexes (%)' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | What is the average adolescent fertility rate of the country whose Alpha2Code is 1A over the years this indicator was calculated. | the average adolescent fertility rate is DIVIDE(SUM(value), SUM(IndicatorName like 'adolescent fertility rate%')) | SELECT AVG(T2.Value) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.Alpha2Code = '1A' AND T2.IndicatorName LIKE 'adolescent fertility rate%' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | In which country's latest trade data and latest water withdrawal data were both updated in the year 2013? Give its long name and Alpha 2 code. | null | SELECT LongName, Alpha2Code FROM Country WHERE LatestTradeData = 2013 AND LatestWaterWithdrawalData = 2013 | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | List down the series codes in which the topic is about Environment: Emissions and the license type is restricted. Please include their alpha code. | null | SELECT SeriesCode FROM Series WHERE Topic = 'Environment: Emissions' AND LicenseType = 'Restricted' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | List the East Asia & Pacific countries which are under the High income: nonOECD group. Please include their alpha code. | the East Asia & Pacific countries are where Region = 'East Asia & Pacific'; High income: nonOECD group is where IncomeGroup = 'High income: nonOECD' | SELECT CountryCode, Alpha2Code FROM Country WHERE Region = 'East Asia & Pacific' AND IncomeGroup = 'High income: nonOECD' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | What are the Indicator names and aggregation methods when the topic is Economic Policy & Debt: Balance of payments: Capital & financial account? | null | SELECT IndicatorName, AggregationMethod FROM Series WHERE Topic = 'Economic Policy & Debt: Balance of payments: Capital & financial account' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | List down the top 3 Latin American & Caribbean countries with the highest average value in "CO2 emissions (kt)" indicator since 1965. Give their highest value and in what year. | Latin American & Caribbean countries is the name of the region where Region in ('Latin America' , 'Caribbean'); CO2 emissions from gaseous fuel consumption (kt) is the name of indicator where IndicatorName = 'CO2 emissions from gaseous fuel consumption (kt)'; average value in CO2 emissions (kt) = DIVIDE(SUM(Value), SUM... | SELECT DISTINCT T1.CountryCode, T1.Year, T1.Value FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Region = 'Latin America & Caribbean' AND T1.IndicatorName = 'CO2 emissions (kt)' AND T1.Year > 1965 AND T1.Year < 1980 ORDER BY T1.Value DESC LIMIT 3 | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
soccer_2016 | How many of the players are from Sri Lanka? | from Sri Lanka refers to Country_Name = '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' | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
world_development_indicators | Enumerate the footnote narratives of The Bahamas under the series code SH.DTH.IMRT in the year 1984. | narratives is Description; The Bahamas is the name of the country where Country = 'The Bahamas' | SELECT DISTINCT T1.Description FROM FootNotes AS T1 INNER JOIN Country AS T2 ON T1.Countrycode = T2.CountryCode WHERE T1.Year = 'YR1984' AND T2.ShortName = 'The Bahamas' AND T1.Seriescode = 'SH.DTH.IMRT' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | In 1970, how many Middle Eastern & North African countries whose value for CO2 emissions from gaseous fuel consumption (kt) indicator is more than 600? | Year = 1970; Middle East & North Africa is the name of the region where Region = 'Middle East & North Africa'; CO2 emissions from gaseous fuel consumption (kt) is the name of indicator where IndicatorName = 'CO2 emissions from gaseous fuel consumption (kt)' | SELECT COUNT(T2.CountryCode) FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Region = 'Middle East & North Africa' AND T1.IndicatorName = 'CO2 emissions FROM gaseous fuel consumption (kt)' AND T1.Year = 1970 AND T1.Value > 600 | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | Please write down the footnote descriptions of Albania in 1981. | Albania is the name of country where Country = 'Albania' | SELECT DISTINCT T1.Description FROM FootNotes AS T1 INNER JOIN Country AS T2 ON T1.Countrycode = T2.CountryCode WHERE T1.Year = 'YR1981' AND T2.ShortName = 'Albania' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | What is the topic of the series when the Total reserves minus gold (current US$) indicator of Haiti hit the value of 3,000,000 in 1961? Please include its series code and license type. | Total reserves minus gold (current US$) is the IndicatorName; Haiti is the CountryName; Year = 1961 | SELECT T2.Topic, T2.Seriescode, T2.LicenseType FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T1.Year = 1961 AND T1.CountryName = 'Haiti' AND T1.IndicatorName = 'Total reserves minus gold (current US$)' AND T1.Value = 3000000 | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | What is the series note description of the series "SP.DYN.TO65.MA.ZS" which covers the topic "Health: Mortality" in 1967? | in 1967 refers to Year = 'YR1967' | SELECT T2.Description FROM Series AS T1 INNER JOIN SeriesNotes AS T2 ON T1.SeriesCode = T2.Seriescode WHERE T1.SeriesCode = 'SP.DYN.TO65.MA.ZS' AND T1.Topic = 'Health: Mortality' AND T2.Year = 'YR1967' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | List down the World Bank code of the countries whose country note has described "Data source : Human Mortality Database by University of California, Berkeley, and Max Planck Institute for Demographic Research."? Please include their lending category. | World Bank code refers to Wb2code; Data source refers to Description | SELECT DISTINCT T1.Wb2code, T1.LendingCategory FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Data source : Human Mortality Database by University of California, Berkeley, and Max Planck Institute for Demographic Research.' AND T1.LendingCategory != '' | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
soccer_2016 | How many matches have 7 points of winning margin? | have 7 points of winning margin refers to win_margin = 7; | SELECT COUNT(Match_Id) FROM Match WHERE win_margin = 7 | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
world_development_indicators | How many countries have reached their Adjusted net national income per capita (constant 2005 US$) indicator value to more than 1,000 but have not finished their external debt reporting? | Adjusted net national income per capita (constant 2005 US$) is the IndicatorName; have not finished their external debt reporting means ExternalDebtReportingStatus = 'Preliminary' | SELECT COUNT(T1.CountryCode) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IndicatorName = 'Adjusted net national income per capita (constant 2005 US$)' AND T1.ExternalDebtReportingStatus = 'Preliminary' AND T2.Value > 1000 | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | What is the short name of the country in which the "Net bilateral aid flows from DAC donors, Sweden (current US$)" indicator hit the 570,000 value in 1970? | Net bilateral aid flows from DAC donors, Sweden (current US$) is the name of indicator where IndicatorName = 'Net bilateral aid flows from DAC donors, Sweden (current US$)'; Year = 1970; Value > 570,000 | SELECT T2.ShortName FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IndicatorName = 'Net bilateral aid flows FROM DAC donors, Sweden (current US$)' AND T1.Year = 1970 AND T1.Value = 570000 | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
world_development_indicators | Which countries have a fertility rate between 4 and 5 in 1979? List their names. | Year = 1979; fertility rate refers to IndicatorName = 'Fertility rate, total (births per woman)'; Value is between 4 and 5; | SELECT CountryName FROM Indicators WHERE Year = 1979 AND IndicatorName = 'Fertility rate, total (births per woman)' AND value >= 4 AND Value <= 5 | CREATE TABLE CountryNotes
(
primary key (Countrycode, Seriescode),
FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode),
Seriescode TEXT NOT NULL, --
Countrycode TEXT NOT NULL, --
Description TEXT, --
FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode),
);
CREATE TABLE Series
(
BasePeriod TEXT, --... |
college_completion | Compare the graduate cohort for Auburn University from 2011 to 2013? | graduate cohort for Auburn University refers to grad_cohort is not null WHERE chronname = 'Auburn University', gender = 'B', race = 'X' and cohort = '4y other', '4y bach'; from 2011 to 2013 refers to year in (2011, 2012, 2013); | SELECT SUM(CASE WHEN T2.year = 2011 THEN T2.grad_cohort ELSE 0 END), SUM(CASE WHEN T2.year = 2012 THEN T2.grad_cohort ELSE 0 END), SUM(CASE WHEN T2.year = 2013 THEN T2.grad_cohort ELSE 0 END) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T2.gender = 'B' AND T2.race = '... | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
legislator | State the number of female legislators in the list. | female refers to gender_bio = 'F' | SELECT COUNT(*) FROM current WHERE gender_bio = 'F' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
simpson_episodes | How many award winners are from the USA? | award winner refers to result = 'Winner'; 'USA' is the birth_country | SELECT COUNT(*) FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T1.birth_country = 'USA' AND T2.result = 'Winner'; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
college_completion | List all the public institutes from the state with the least number of graduate cohort in 2013. | public refers to control = 'Public'; institutes refers to chronname; least number of graduate cohort refers to MIN(grad_cohort); in 2013 refers to year = 2013; | SELECT T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2013 AND T1.control = 'Public' ORDER BY T2.grad_cohort LIMIT 1 | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
legislator | How many historical legislators were born in 1973? | born in 1973 refers to birthday_bio = 1973 | SELECT COUNT(*) FROM historical WHERE CAST(birthday_bio AS date) = 1973 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
legislator | Provide the current legislators' official full names who are from the Independent party. | Independent party refers to party = 'Independent' | SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Independent' GROUP BY T1.official_full_name | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
college_completion | What is the ratio of Asian male graduates to Asian female graduates from Harvard University in 2013? | ratio = MULTIPLY(DIVIDE(SUM(grad_cohort WHERE Gender = 'M'), SUM( grad_cohort WHERE Gender = 'F')), 1.0); Asian refers to race = 'A'; female refers to gender = 'F'; graduates refers to grad_cohort; male refers to gender = 'M'; Harvard University refers to chronname = 'Harvard University'; in 2013 refers to year = 2013; | SELECT CAST(SUM(CASE WHEN T2.Gender = 'M' THEN T2.grad_cohort ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.Gender = 'F' THEN T2.grad_cohort ELSE 0 END) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T1.chronname = 'Harvard University' AND T2.year = 2013 AND T2.race = 'A' | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
legislator | What is the ratio of males and females among historical legislators? | male refers to gender_bio = 'M'; female refers to gender_bio = 'F'; calculation = DIVIDE(COUNT(gender_bio = 'M' THEN bioguide_id), COUNT(gender_bio = 'F' THEN bioguide_id)) | SELECT CAST(SUM(CASE WHEN gender_bio = 'M' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN gender_bio = 'F' THEN 1 ELSE 0 END) FROM historical | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
simpson_episodes | In "Sex, Pies and Idiot Scrapes", how many percentage of votes did the 9 star score has? | "Sex, Pies and Idiot Scrapes" is the title of episode; 9 star score refers to stars = 9; percentage refers to percent | SELECT T2.percent FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.title = 'Sex, Pies and Idiot Scrapes' AND T2.stars = 9; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
college_completion | In 2012, how many Asian female graduates were seeking another type of degree or certificate at the 4-year institution at University of Alaska at Anchorage? | In 2012 refers to year = 2012; Asian refers to race = 'A'; female refers to gender = 'F'; graduates refers to grad_cohort; seeking another type of degree or certificate at a 4-year institution refers to cohort = '4y other'; University of Alaska at Anchorage refers to chronname = 'University of Alaska at Anchorage'; | SELECT COUNT(*) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T2.gender = 'F' AND T2.race = 'A' AND T1.chronname = 'University of Alaska at Anchorage' AND T2.cohort = '4y other' | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
simpson_episodes | In Season 20 Episode 11, how many times was Doofus included in the credit list? | in Season 20 Episode 11 refers to episode_id = 'S20-E11'; 'Doofus' is the nickname of person; include in credit list refers to credited = 'true' | SELECT COUNT(*) FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T1.nickname = 'Doofus' AND T2.credited = 'true' AND T2.episode_id = 'S20-E11'; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
college_completion | Calculate the percentage of Asian students among students of other races who graduated from institution in Alabama in year 2013 within 100 percent of normal / expected time. | Asian refers to race = 'A'; Alabama refers to state = 'Alabama'; graduated within 100 percent of normal/expected time refers to grad_100; percentage = MULTIPLY(DIVIDE(SUM(race = 'A'), SUM(grad_cohort)), 100); | SELECT CAST(SUM(CASE WHEN T2.race = 'A' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T2.year = 2013 AND T1.state = 'Alabama' | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
legislator | List the official full names and genders of legislators who have Collins as their last name. | genders refers to gender_bio; Collins is a last_name | SELECT official_full_name, gender_bio FROM current WHERE last_name = 'Collins' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
legislator | List the full names of Republican legislators who have a nickname. | full names refers to official_full_name; Republican refers to party = 'Republican'; nickname refers to nickname_name | SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Republican' AND T1.nickname_name IS NOT NULL GROUP BY T1.official_full_name | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
college_completion | How many institutes are private and not-for profit? | private and not for profit refers to control = 'Private not-for-profit'; | SELECT COUNT(*) FROM institution_details WHERE control = 'Private not-for-profit' | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
legislator | Which state did Veronica Grace Boland represent and which party is she affiliated? | Veronica Grace Boland is a full name; full name refers to first_name, middle_name, last_name; party affiliated refers to party | SELECT T2.state, T2.party FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name OR T1.middle_name OR T1.last_name = 'VeronicaGraceBoland' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
simpson_episodes | Provide the episode number, title and rating of which were aired in October, 2008. | episode number refers to episode; aired in refers to air_date; October refers to Substr(air_date, 6, 2) = '10': 2008 refers to Substr(air_date, 0, 5) = '2008' | SELECT episode, title, rating FROM Episode WHERE SUBSTR(air_date, 1, 7) LIKE '2008-10%'; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
college_completion | Calculate the percentage of Black students in all private for profit institutions. | Black students refers to race = 'B'; private for profit refers to control = 'Private for-profit'; percentage = MULTIPLY(DIVIDE(SUM(race = 'B'), SUM(grad_cohort)), 100.0); | SELECT CAST(SUM(CASE WHEN T2.race = 'B' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T2.race = 'B' AND T1.control = 'Private for-profit' | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
legislator | List the full names, religions, and parties of legislators who have served in Maine. | full names refers to official_full_name; religion refers to religion_bio; Maine refers to state = "ME" | SELECT T1.official_full_name, T2.relation, T2.party FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'ME' GROUP BY T1.official_full_name, T2.relation, T2.party | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
simpson_episodes | What was the first award won by the cast or crew member of the show? Give the name of the person who won the said award. | won refers to result = 'Winner'; first award refers to Min(year) | SELECT T2.award, T1.name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.result = 'Winner' ORDER BY T2.year LIMIT 1; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
college_completion | From which institute is harder to graduate for a bachelor, Amridge University or Auburn University? | institute refers to chronname; harder to graduate for a bachelor refers to MIN(grad_100_value); Amridge University refers to chronname = 'Amridge University'; Auburn University refers to chronname = 'Auburn University'; | SELECT chronname FROM institution_details WHERE chronname IN ('Amridge University', 'Auburn University') ORDER BY grad_100_value LIMIT 1 | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
legislator | Give the Wikipedia IDs of historical legislators who are Readjuster Democrats. | Readjuster Democrats refers to party = 'Readjuster Democrat' | SELECT T2.wikipedia_id FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.party = 'Readjuster Democrat' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
legislator | What is the contact URL of Claire McCaskill? | contact URL refers to contact_form; Claire McCaskill is an official_full_name | SELECT T2.contact_form FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Claire McCaskill' GROUP BY T2.contact_form | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
simpson_episodes | Among the casts who were born in Los Angeles, describe the name and birth date of who have 1.8 m and above in height. | "Los Angeles" is the birth_place; 1.8 m and above in height refers to height_meters > = 1.8 | SELECT name, birthdate FROM Person WHERE birth_place = 'Los Angeles' AND height_meters >= 1.8; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
college_completion | How many students that graduated from Lincoln College in 2011 belong to the cohort type of Bachelor's/equivalent seeking cohort at 4-year institutions? | Lincoln College refers to chronname = 'Lincoln College'; in 2011 refers to year = 2011; Bachelor's/equivalent seeking cohort at 4-year institutions refers to cohort = '4y bach'; | SELECT COUNT(T1.unitid) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T1.chronname = 'Lincoln College' AND T2.year = 2011 AND T2.cohort = '4y bach' | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
simpson_episodes | What is the ratio between the 5 stars votes for 'No Loan Again, Naturally' episode and 'Coming to Homerica' episode? | 5 stars votes refers to stars = 5 ; 'No Loan Again, Naturally' and 'Coming to Homerica' are both the title of episode; ratio = Divide (votes where title = 'No Loan Again, Naturally', votes where title = 'Coming to Homerica') | SELECT CAST(SUM(CASE WHEN T1.title = 'No Loan Again, Naturally' THEN T1.votes ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.title = 'Coming to Homerica' THEN T1.votes ELSE 0 END) AS ratio FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars = 5; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
college_completion | What is the number of female graduate for all students cohort from Oakwood University in 2013? | female refers to gender = 'F'; graduates refers to grad_cohort; Oakwood University refers to chronname = 'Oakwood University'; in 2013 refers to year = 2013; all sutdents refer to rae = 'X'; | SELECT COUNT(*) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T2.year = 2013 AND T2.gender = 'F' AND T2.race = 'X' AND T1.chronname = 'Oakwood University' | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
legislator | Give the official full names of legislators representing Virginia. | Virginia refers to state = 'VA' | SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'VA' GROUP BY T1.official_full_name | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
simpson_episodes | List down the award name, result, credit category and credited status of the "Billy Kimball". | "Billy Kimball" is the person; award name refers to award; credited category refers to category; credited status refers to credited; credited = 'true' means the person is included in the credit list and vice versa | SELECT DISTINCT T1.award, T1.result, T2.category, T2.credited FROM Award AS T1 INNER JOIN Credit AS T2 ON T2.episode_id = T1.episode_id WHERE T2.person = 'Billy Kimball'; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
legislator | Among the legislators who will end in 2009, how many are from the Republican party? | the legislators who will end in 2009 refers to END 2009; from the Republican party refers to party = 'Republican' | SELECT `END`, party FROM `current-terms` WHERE STRFTIME('%Y', `END`) = '2009' AND party = 'Republican' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
legislator | Which party does Christopher Henderson Clark belong to? | Christopher Henderson Clark is full name; full name refers to first_name, middle_name, last_name | SELECT T1.party FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name OR T2.middle_name OR T2.last_name = 'ChristopherHendersonClark' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
simpson_episodes | List the award name and persons who won the award in 2009. | won the award refers to result = 'Winner'; in 2009 refers to year = 2009 | SELECT award, person FROM Award WHERE result = 'Winner' AND SUBSTR(year, 1, 4) = '2009'; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
legislator | List the full names of 10 legislators who only have a Facebook account. | full names refers to official_full_name; only have a Facebook account refers to youtube is NULL or youtube = '', instagram is NULL or instagram = '', twitter is NULL or twitter = '', facebook is not NULL and facebook = '' | SELECT T2.official_full_name FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE (T1.youtube IS NULL OR T1.youtube = '') AND (T1.instagram IS NULL OR T1.instagram = '') AND (T1.twitter IS NULL OR T1.twitter = '') AND T1.facebook IS NOT NULL AND T1.facebook != '' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
simpson_episodes | List the nominee, keywords and episode ID of the title "The Good, the Sad and the Drugly". | nominee refers to result = 'Nominee' | SELECT T3.person, T1.keyword, T1.episode_id FROM Keyword AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Award AS T3 ON T2.episode_id = T3.episode_id WHERE T2.title = 'The Good, the Sad and the Drugly' AND T3.result = 'Nominee'; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
college_completion | How many students graduated from Central Alabama Community College in 2011 in total? | Central Alabama Community College refers to chronname = 'Central Alabama Community College'; in 2011 refers to year = 2011; | SELECT T2.grad_cohort FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T1.chronname = 'Central Alabama Community College' AND T2.year = 2011 | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
legislator | Which historical legislators are members of the National Greenbacker party? Write their first and last names. | members of the National Greenbacker party refers to party = 'National Greenbacker'; first and last names refers to first_name, last_name | SELECT T2.first_name, T2.last_name FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.party = 'National Greenbacker' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
simpson_episodes | Write down the award ID, award name and winner for character named "Homer simpson 20". | "Homer simpson 20" is the character; "Winner" is the result; award name refers to award | SELECT T1.award_id, T1.award, T1.person FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T2.character = 'Homer Simpson' AND T1.result = 'Winner'; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
college_completion | In total, how many Hispanic male students graduated from Amridge University? | Hispanic refers to race = 'H'; male refers to gender = 'M'; Amridge University refers to chronname = 'Amridge University'; | SELECT SUM(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T1.chronname = 'Amridge University' AND T2.gender = 'M' AND T2.race = 'H' | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
legislator | What is the middle name of the legislator whose birthday was on 8/24/1956? | birthday was on 8/24/1956 refers to birthday_bio = '1956-08-24' | SELECT middle_name FROM current WHERE birthday_bio = '1956-08-24' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
simpson_episodes | Describe the birth country, height and person name who were not included in credit list with category of casting. | height refers to height_meters; not in credit list refers to credited = ''; category of casting refers to category = 'Casting Department' | SELECT T1.birth_country, T1.height_meters, T1.name FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.category = 'Cast' AND T2.credited = 'false'; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
college_completion | Which institute has the highest percentage of male White students graduating in 2011 within 150 percent of normal/expected time? | male refers to gender = 'M'; white refers to race = 'w'; in 2011 refers to year = 2011; graduating within 150 percent of normal/expected time refers to grad_150; | SELECT T1.chronname FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T2.year = 2011 AND T2.gender = 'M' AND T2.race = 'W' AND T2.grad_150 = ( SELECT MAX(T2.grad_150) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T2.year =... | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
simpson_episodes | Among the episode that get more than 950 votes, how many of the episodes were nominated for the 'Outstanding Voice-Over Performance Award in 2009'? Find the percentage of the episodes. | more than 950 votes refers to votes > 950; in 2009 refers to year = 2009; number of episode = Count(episode_id); nominated refers to result = 'Nominee'; percentage = Divide(Count(award = 'Outstanding Voice-Over Performance'), Count(episode_id)) * 100 | SELECT CAST(SUM(CASE WHEN T1.award = 'Outstanding Voice-Over Performance' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.episode_id) FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T2.votes > 950 AND T1.year = 2009; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
college_completion | What's the number of male Hispanic students who graduated from Central Alabama Community College in 2011 within 100 percent of normal/expected time? | male refers to gender = 'M'; Hispanic students refers to race = 'H'; Central Alabama Community College refers to chronname = 'Central Alabama Community College'; in 2011 refers to year = 2011; number of students who graduated within 100 percent of normal/expected time refers to grad_100; | SELECT SUM(T2.grad_100) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T1.chronname = 'Central Alabama Community College' AND T2.year = 2011 AND T2.gender = 'M' AND T2.race = 'H' | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
legislator | How many percent of senators were from class 1? | senator refers to type = 'sen'; class 1 refers to class = 1; calculation = MULTIPLY(DIVIDE(COUNT(class = 1 then bioguide), COUNT(bioguide)), 1.0) | SELECT CAST(SUM(CASE WHEN class = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM `historical-terms` WHERE type = 'sen' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
legislator | Calculate the percentage of the total number of current female legislators and past female legislators. State which one has the highest value. | female refers to gender_bio = 'F'; calculation = MULTIPLY(DIVIDE(COUNT(current.gender_bio = 'F' THEN current.bioguide_id)), (COUNT(historical.gender_bio = 'F' then historical.bioguide_id)), 1.0); the highest value refers to MAX(calculation) | SELECT CAST(COUNT(CASE WHEN current.gender_bio = 'F' THEN current.bioguide_id ELSE NULL END) AS REAL) * 100 / ( SELECT COUNT(CASE WHEN historical.gender_bio = 'F' THEN historical.bioguide_id ELSE NULL END) FROM historical ) FROM current | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
college_completion | Which cohort had the higher percentage of students who graduated from Central Alabama Community College in 2011 within 150 percent of normal/expected time, female White students or male White students? | amount of percentage = SUM(grad_150 WHERE gender = 'F') as female; percentage = SUM(grad_150 WHERE gender = 'M') as male; Central Alabama Community College refers to chronname = 'Central Alabama Community College'; in 2011 refers to year = 2011; graduated within 150 percent of normal/expected time refers to grad_150; f... | SELECT IIF(SUM(CASE WHEN T2.gender = 'F' THEN T2.grad_150 ELSE 0 END) > SUM(CASE WHEN T2.gender = 'M' THEN T2.grad_150 ELSE 0 END), 'female White students', 'male White students') FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname = 'Central Alabama Community C... | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
legislator | Write the full names of junior ranked Republicans. | full name refers to official_full_name; junior refers to state_rank = 'junior'; Republicans refers to party = 'Republican' | SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Republican' AND T2.state_rank = 'junior' GROUP BY T1.official_full_name | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
simpson_episodes | For the episode who won the award held by Jupiter Award, describe award name, aired date and rating of that episode. | held by Jupiter Award refers to organization = 'Jupiter Award'; won the award refers to result = 'Winner' | SELECT T1.award, T2.air_date, T2.rating FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.organization = 'Jupiter Award' AND T1.result = 'Winner'; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
college_completion | How many students for both genders graduated from a 2-year institute in Alabama in 2011? | 2-year institute refers to cohort = '2y all'; Alabama refers to state = 'Alabama'; in 2011 refers to year = 2011; T2.gender = 'B' means both genders; | SELECT SUM(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T2.cohort = '2y all' AND T2.year = 2011 AND T1.state = 'Alabama' | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
simpson_episodes | Name the person, award, organization, result and credited status of the assistant director in S20-E13. | "assistant director" is the role of person; 'S20-E13' is the episode_id; credited status refers to credited; credited = 'true' means the person is included in the credit list and vice versa | SELECT T1.person, T1.award, T1.organization, T1.result, T2.credited FROM Award AS T1 INNER JOIN Credit AS T2 ON T2.episode_id = T1.episode_id WHERE T2.episode_id = 'S20-E13' AND T2.role = 'assistant director'; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
authors | Mention the titile of paper writen by Joe Lograsso. | 'Joe Lograsso' is name of paper author | SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Joe Lograsso' | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
legislator | Which legislator has the YouTube channel 'RoskamIL06?' Write the official full name. | YouTube channel 'RoskamIL06' refers to youtube = 'RoskamIL06'; | SELECT T1.official_full_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.youtube = 'RoskamIL06' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
disney | List all of Wolfgang Reitherman's movies and their voice actors. | Wolfgang Reitherman refers to director = 'Wolfgang Reitherman'; | SELECT T1.name, T2.`voice-actor` FROM director AS T1 INNER JOIN `voice-actors` AS T2 ON T1.name = T2.movie WHERE T1.director = 'Wolfgang Reitherman' | CREATE TABLE movies_total_gross
(
MPAA_rating TEXT, -- Example Values: `G`, ``, `Not Rated`, `PG`, `R` | Value Statics: Total count 579 - Distinct count 6 - Null count 0
release_date TEXT, --
total_gross TEXT, --
foreign key (movie_title) references characters(movie_title),
movie_title TEXT, --
genre TEX... |
movie_platform | For movie titled 'Welcome to the Dollhouse', how many percentage of the ratings were rated with highest score. | rated with highest score refers to rating_score = 5; percentage = MULTIPLY(DIVIDE(SUM(rating_score = 5), COUNT(rating_score)), 100) | SELECT CAST(SUM(CASE WHEN T2.rating_score = 5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_title = 'Welcome to the Dollhouse' | CREATE TABLE ratings_users
(
user_cover_image_url TEXT, --
user_avatar_image_url TEXT, --
rating_date_utc TEXT, --
user_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
user_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value S... |
legislator | What is the district number that Chris Van Hollen serving? | Chris Van Hollen is an official_full_name | SELECT T2.district FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Chris Van Hollen' AND T2.district IS NOT NULL GROUP BY T2.district | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
college_completion | Among the institutes in the state of Alabama whose percent rank for median SAT value within sector is 77, how many of them have over 500 graduates in total in 2011? | percent rank for median SAT value within sector refers to med_sat_percentile; over 500 graduates refers to grad_cohort > 500; in 2011 refers to year = 2011; | SELECT COUNT(DISTINCT T1.chronname) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.state = 'Alabama' AND T1.med_sat_percentile = '100' AND T2.year = 2011 AND T2.grad_cohort > 500 | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
legislator | List the official full names of 10 legislators who have a YouTube account but no Instagram account. | have a YouTube account but no Instagram account refers to facebook is not null and (instagram is null or instagram = '') | SELECT T2.official_full_name FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T1.facebook IS NOT NULL AND (T1.instagram IS NULL OR T1.instagram = '') LIMIT 10 | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
simpson_episodes | Among the episodes with excellent rating which were aired in 2008, describe the title, episode's image, award name and person who were nominated. | excellent rating refers to 7 < = rating < = 10; aired in 2008 refers to SUBSTRACT(air_date, 0, 5) = '2008'; who were nominated refers to result = 'Nominee' | SELECT T2.title, T2.episode_image, T1.award, T1.person FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T2.rating BETWEEN 7 AND 10 AND SUBSTR(T2.air_date, 1, 4) = '2008' AND T1.result = 'Nominee'; | CREATE TABLE Keyword
(
foreign key (episode_id) references Episode(episode_id),
keyword TEXT, --
primary key (episode_id, keyword),
episode_id TEXT, --
);
CREATE TABLE Vote
(
foreign key (episode_id) references Episode(episode_id),
votes INTEGER, --
episode_id TEXT, --
percent REAL, --
stars INTEGER... |
college_completion | Please list the names of the institutes with the percentage of male White students graduating in 2011 within 150 percent of normal/expected time over 20. | names of the institutes refers to chronname; male refers to gender = 'M'; white refers to race = 'w'; in 2011 refers to year = 2011; percentage of students graduating within 150 percent of normal/expected time over 20 refers to grad_150>20; | SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.grad_150 > 20 THEN T1.chronname ELSE NULL END AS T FROM institution_details T1 INNER JOIN institution_grads T2 ON T2.unitid = T1.unitid WHERE T2.year = 2011 AND T2.gender = 'M' AND T2.race = 'W' ) WHERE T IS NOT NULL | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
legislator | How many times did Richard Durbin become a legislator in district 20? | Richard Durbin is an official_full_name; official_full_name refers to first_name, last_name; district 20 refers to district = 20 | SELECT SUM(CASE WHEN T2.district = 20 THEN 1 ELSE 0 END) AS count FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'Richard' AND T1.last_name = 'Durbin' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
college_completion | How many more students in total graduated from Central Alabama Community College in 2012 than in 2011? | how many more = SUBTRACT(SUM(grad_cohort WHERE year = 2012)), (sum(grad_cohort WHERE year = 2011)); Central Alabama Community College refers to chronname = 'Central Alabama Community College'; in 2012 refers to year = 2012; in 2011 refers to year = 2011; | SELECT SUM(CASE WHEN T2.year = 2012 THEN T2.grad_cohort ELSE 0 END) - SUM(CASE WHEN T2.year = 2011 THEN T2.grad_cohort ELSE 0 END) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname = 'Central Alabama Community College' | CREATE TABLE institution_details
(
vsa_enroll_after6_transfer TEXT, --
chronname TEXT, --
vsa_enroll_elsewhere_after6_first TEXT, --
lat_y REAL, --
retain_percentile INTEGER, --
exp_award_state_value INTEGER, --
basic TEXT, --
grad_100_value REAL, --
vsa_grad_after6_transfer TEXT, --
endow_p... |
legislator | Give the YouTube ID of the channel 'RepWassermanSchultz.' | RepWassermanSchultz refers to youtube | SELECT youtube_id FROM `social-media` WHERE youtube = 'RepWassermanSchultz' | CREATE TABLE current
(
gender_bio TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 541 - Distinct count 2 - Null count 0
suffix_name TEXT, -- Example Values: `Jr.`, `III`, `II` | Value Statics: Total count 20 - Distinct count 3 - Null count 521
house_history_id REAL, --
birthday_bio DATE, -- ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.