SQL
stringlengths 18
577
| question
stringlengths 317
11.5k
|
---|---|
SELECT count(*) FROM FINREV_FED_17 WHERE school_district LIKE "%Wisconsin%" | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many Wisconsin school districts receive federal funding? |
SELECT state FROM NDECoreExcel_Math_Grade8 ORDER BY average_scale_score DESC LIMIT 1 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which state performs best on the NAEP 8th grade math test? |
SELECT state FROM NDECoreExcel_Math_Grade8 ORDER BY average_scale_score LIMIT 1 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which federally-funded state performs worst on the NAEP math exam for eighth graders? |
SELECT avg(average_scale_score) FROM NDECoreExcel_Math_Grade8 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the average NAEP math score for all eighth graders in federally-funded states? |
SELECT AwayTeam FROM football_data WHERE HomeTeam = "Omiya Ardija" AND Season LIKE "%2018%" | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the away team against Omiya Ardija in 2018? |
SELECT count(*) FROM football_data WHERE Season LIKE "%2010%" AND Country = "Spain" | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many matches in Spain in 2010? |
SELECT MATCH FROM betfront ORDER BY DRAW_OPENING DESC LIMIT 1 | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which matches has the highest draw opening so far? |
SELECT YEAR FROM betfront GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1 | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which year has most matches? |
SELECT count(*) FROM football_data WHERE PSH != "" AND PSD != "" AND PSA != "" | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many matches did Pinnacle have betting records? |
SELECT count(*) FROM football_data WHERE B365H > PSH | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many matches did Bet365 gives higher home win odds than Pinnacle? |
SELECT count(*) FROM football_data WHERE FTHG + FTAG > 5 | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many games that the total number of goals exceed 5? |
SELECT max(B365A) FROM football_data | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the highest home losing odds in Bet365 ever? |
SELECT count(*) FROM football_data WHERE FTHG = 0 AND FTAG = 0 | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many number of games ended in a 0-0 tie? |
SELECT count(Div) FROM football_data | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many league division does football_data database has? |
SELECT count(League) FROM football_data WHERE Country != "Scotland" and Country != "England" and Referee != "" | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Do other leagues have referee name records outside of Scotland and England? |
SELECT B365D FROM football_data WHERE HomeTeam = "Swindon" and AwayTeam = "Millwall" and Season = "2016/2017" | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What's the odds for draw on Bet365 for the game Swindon v.s. Millwall for 2016/2017 season? |
SELECT T2.state FROM FINREV_FED_KEY_17 as T2 JOIN FINREV_FED_17 as T1 ON T1.state_code = T2.State_Code GROUP BY T1.state_code ORDER BY sum(t_fed_rev) | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What are the top five states in descending order in terms of revenue provided to school districts? |
SELECT T2.state FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 ON T1.state_code = T2.state_code GROUP BY T2.state ORDER BY count(school_district) DESC LIMIT 5 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What are the top five states in descending order in terms of the number of school districts per state? |
SELECT state, max(year) FROM NDECoreExcel_Math_Grade8 GROUP BY state | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. For each state, when was the last time the average score data was collected? |
SELECT t_fed_rev FROM FINREV_FED_17 WHERE school_district = "FAIRFAX CO SCHS" | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How much federal funding did Faifaix County, VA schools receive in all forms? |
SELECT sum(c14) FROM FINREV_FED_17 WHERE yr_data = 17 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How much did the federal government spend in No Child Left Behind funding in 2017? |
SELECT count(*) FROM FINREV_FED_17 WHERE school_district LIKE "%Wisconsin%" | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many Wisconsin school districts receive federal funding? |
SELECT state FROM NDECoreExcel_Math_Grade8 ORDER BY average_scale_score DESC LIMIT 1 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which state performs best on the NAEP 8th grade math test? |
SELECT state FROM NDECoreExcel_Math_Grade8 ORDER BY average_scale_score LIMIT 1 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which federally-funded state performs worst on the NAEP math exam for eighth graders? |
SELECT avg(average_scale_score) FROM NDECoreExcel_Math_Grade8 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the average NAEP math score for all eighth graders in federally-funded states? |
SELECT T1.school_district FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 ON T1.state_code = T2.state_code WHERE T2.state = "Wisconsin" ORDER BY T1.t_fed_rev DESC LIMIT 1 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which school district receive the most of federal revenue through state in Wisconsin? |
SELECT avg(T1.c14) FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 ON T1.state_code = T2.state_code WHERE T2.state = "Virginia" | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the average Title 1 fund in Virginia? |
SELECT T2.state, sum(c14),sum(c25) FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 ON T1.state_code = T2.state_code JOIN NDECoreExcel_Math_Grade8 as T3 ON T2.state = T3.state GROUP BY T2.state ORDER BY T3.average_scale_score DESC LIMIT 10 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What are the top 10 states that have the highest average math score and federal revenue they got through different categories? |
SELECT T1.school_district, max(T1.c14), T3.average_scale_score FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 ON T1.state_code = T2.state_code JOIN NDECoreExcel_Math_Grade8 as T3 ON T2.state = T3.state UNION SELECT T1.school_district, max(T1.c25), T3.average_scale_score FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 ON T1.state_code = T2.state_code JOIN NDECoreExcel_Math_Grade8 as T3 ON T2.state = T3.state | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What are the schools with highest federal revenue in each federal revenue categories and what's their state average scores? |
SELECT state FROM NDECoreExcel_Math_Grade8 ORDER BY average_scale_score DESC LIMIT 1 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. State with highest average math score |
SELECT T1.school_district, max(T1.t_fed_rev / T3.average_scale_score) FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 on T1.state_code = T2.state_code JOIN NDECoreExcel_Math_Grade8 as T3 ON T2.state = T3.state | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. School with highest ratio of total revenue and average scores |
SELECT T2.state, T3.average_scale_score FROM FINREV_FED_KEY_17 as T2 JOIN FINREV_FED_17 as T1 ON T1.state_code = T2.state_code JOIN NDECoreExcel_Math_Grade8 as T3 ON T2.state = T3.state GROUP BY T2.state ORDER BY sum(T1.t_fed_rev) DESC LIMIT 1 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which state spent the most revenue towards schools and whats the state average score |
SELECT T1.school_district, min(T1.t_fed_rev / T3.average_scale_score) FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 on T1.state_code = T2.state_code JOIN NDECoreExcel_Math_Grade8 as T3 ON T2.state = T3.state | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. School with lowest ratio of total revenue and average scores |
SELECT T2.state, T3.average_scale_score FROM FINREV_FED_KEY_17 as T2 JOIN FINREV_FED_17 as T1 ON T1.state_code = T2.state_code JOIN NDECoreExcel_Math_Grade8 as T3 ON T2.state = T3.state GROUP BY T2.state ORDER BY sum(T1.t_fed_rev) LIMIT 1 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which state spent the least revenue towards schools and whats the state average score |
SELECT state FROM NDECoreExcel_Math_Grade8 ORDER BY average_scale_score DESC LIMIT 1 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which state has the highest average score in math exam? |
SELECT average_scale_score FROM NDECoreExcel_Math_Grade8 WHERE state = "California" | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the average match score of CA? |
SELECT count(DISTINCT school_district) FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 ON T1.state_code = T2.state_code WHERE T2.state = "Indiana" | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many unique school districts in Indiana? |
SELECT state_code FROM FINREV_FED_KEY_17 WHERE state = "Virginia" | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the state code of VA? |
SELECT T2.state FROM FINREV_FED_KEY_17 as T2 JOIN FINREV_FED_17 as T1 ON T1.state_code = T2.state_code GROUP BY T2.state ORDER BY sum(t_fed_rev) DESC LIMIT 1 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which state get the highest revenue? |
SELECT sum(T1.c14), sum(T1.c25) FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 ON T1.state_code = T2.state_code WHERE T2.state = "Colorado" | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How much funding does Colorado schools receive from Title 1 and the Child Nutrition program respectively? |
SELECT t_fed_rev FROM FINREV_FED_17 WHERE school_district LIKE "%Pecatonia Area%" | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How much federal funding does Pecatonia Area School district get? |
SELECT average_scale_score FROM NDECoreExcel_Math_Grade8 WHERE state = "North Carolina" UNION SELECT average_scale_score FROM NDECoreExcel_Math_Grade8 WHERE state = "South Carolina" | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What are the student scores on the NAEP math exam for 8th graders in North Carolina and South Carolina? |
SELECT average_scale_score FROM NDECoreExcel_Math_Grade8 WHERE state = "North Carolina" UNION SELECT average_scale_score FROM NDECoreExcel_Math_Grade8 WHERE state = "New York" | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What are the averge score of students in NC and in NY? |
SELECT count(*) FROM FINREV_FED_17 WHERE c25 > c14 | Given the Table finrev fed 17 having columns as state_code has datatype number, idcensus has datatype number, school_district has datatype text, nces_id has datatype text, yr_data has datatype number, t_fed_rev has datatype number, c14 has datatype number, c25 has datatype number which has NO_PRIMARY_KEY and Given the Table ndecoreexcel math grade8 having columns as year has datatype number, state has datatype text, all_students has datatype text, average_scale_score has datatype number which has NO_PRIMARY_KEY and Given the Table finrev fed key 17 having columns as State_Code has datatype number, State has datatype text, #_Records has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many schools get higher revenue via Child Nutrition A than revenue via child left school behind act? |
SELECT PSH FROM football_data WHERE HomeTeam LIKE "%Arsenal%" AND FTR = "H" UNION SELECT PSA FROM football_data WHERE AwayTeam LIKE "%Arsenal%" AND FTR = "A" | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What are the Pinnacle odds for Arsenal winning matches? |
SELECT * FROM football_data WHERE Country = "Spain" AND FTR = "A" | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which matches in Spain did the away team win? |
SELECT * FROM football_data WHERE Season = "2016" AND FTR = "D" AND League = "Premier League" | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which Premier League matches ended in a draw in 2016? |
SELECT * FROM football_data WHERE B365D > 3 | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which matches had draw odds from Bet365 higher than 3? |
SELECT DRAW_CLOSING FROM betfront WHERE MATCH LIKE "%VfB Stuttgart%" | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What were the closing odds for a draw in matches with VfB Stuttgart? |
SELECT * FROM football_data WHERE (FTHG + FTAG) = 0 | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which games had no goals scored at full time? |
SELECT AwayTeam FROM football_data WHERE HomeTeam = "Omiya Ardija" AND Season LIKE "%2018%" | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the away team against Omiya Ardija in 2018? |
SELECT count(*) FROM football_data WHERE Season LIKE "%2010%" AND Country = "Spain" | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many matches in Spain in 2010? |
SELECT MATCH FROM betfront ORDER BY DRAW_OPENING DESC LIMIT 1 | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which matches has the highest draw opening so far? |
SELECT YEAR FROM betfront GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1 | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which year has most matches? |
SELECT count(*) FROM football_data WHERE PSH != "" AND PSD != "" AND PSA != "" | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many matches did Pinnacle have betting records? |
SELECT count(*) FROM football_data WHERE B365H > PSH | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many matches did Bet365 gives higher home win odds than Pinnacle? |
SELECT count(*) FROM football_data WHERE FTHG + FTAG > 5 | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many games that the total number of goals exceed 5? |
SELECT max(B365A) FROM football_data | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the highest home losing odds in Bet365 ever? |
SELECT count(*) FROM football_data WHERE FTHG = 0 AND FTAG = 0 | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many number of games ended in a 0-0 tie? |
SELECT count(Div) FROM football_data | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many league division does football_data database has? |
SELECT count(League) FROM football_data WHERE Country != "Scotland" and Country != "England" and Referee != "" | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Do other leagues have referee name records outside of Scotland and England? |
SELECT B365D FROM football_data WHERE HomeTeam = "Swindon" and AwayTeam = "Millwall" and Season = "2016/2017" | Given the Table betfront having columns as YEAR has datatype number, DATETIME has datatype time, COUNTRY has datatype text, COMPETION has datatype text, MATCH has datatype text, HOME_OPENING has datatype number, DRAW_OPENING has datatype number, AWAY_OPENING has datatype number, HOME_CLOSING has datatype number, DRAW_CLOSING has datatype number, AWAY_CLOSING has datatype number which has NO_PRIMARY_KEY and Given the Table football data having columns as Season has datatype text, Datetime has datatype time, Div has datatype text, Country has datatype text, League has datatype text, Referee has datatype text, HomeTeam has datatype text, AwayTeam has datatype text, FTHG has datatype number, FTAG has datatype number, FTR has datatype text, HTHG has datatype number, HTAG has datatype number, HTR has datatype text, PSH has datatype number, PSD has datatype number, PSA has datatype number, B365H has datatype number, B365D has datatype number, B365A has datatype number, LBH has datatype number, LBD has datatype number, LBA has datatype number, BWH has datatype number, BWD has datatype number, BWA has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What's the odds for draw on Bet365 for the game Swindon v.s. Millwall for 2016/2017 season? |
SELECT votedby FROM hall_of_fame WHERE yearid = "2000" GROUP BY votedby ORDER BY count(*) DESC LIMIT 1 | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. Which is the most popular voting method for Hall of Fame in 2000? |
SELECT count(*) FROM player WHERE weight > 200 | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. How many players weigh over 200 pounds? |
SELECT player_id FROM player_award WHERE year = 2010 AND award_id = "Rookie of the Year" | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. Who is the winner of Rookie of the Year in 2010? |
SELECT player_id FROM salary WHERE year >= 2010 ORDER BY salary DESC LIMIT 1 | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. Who is the highest paid player since 2010? |
SELECT T2.salary FROM salary as T2 JOIN hall_of_fame as T1 ON T1.player_id = T2.player_id WHERE T1.inducted = "Y" | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. What are the salaries of players who have ever enter hall of fame? |
SELECT min(votes), yearid FROM hall_of_fame WHERE inducted = "Y" AND yearid >= 1871 GROUP BY yearid | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. What are the minimum votes needed to enter hall of fame for each year since 1871? |
SELECT salary FROM salary WHERE league_id = "NL" | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. What are the salaries in National League? |
SELECT salary FROM salary WHERE league_id = "AL" | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. What are the salaries in American League? |
SELECT birth_country FROM player as T1 JOIN player_award as T2 ON T1.player_id = T2.player_id GROUP BY T1.birth_country ORDER BY count(*) DESC LIMIT 1 | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. Which birth place has the most player awards? |
SELECT T1.birth_country FROM hall_of_fame as T2 JOIN player as T1 ON T1.player_id = T2.player_id WHERE T2.inducted = "Y" AND T2.yearid >= 1871 | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. What are the birth places of players won on hall of fame since 1871? |
SELECT award_id FROM player_award as T1 JOIN salary as T2 ON T1.player_id = T2.player_id GROUP BY T1.award_id ORDER BY avg(T2.salary) DESC LIMIT 1 | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. Which award has the highest player's salary? |
SELECT DISTINCT yearid FROM hall_of_fame WHERE needed_note != "" | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. What were the years when any special elections happened in hall of fame? |
SELECT T1.birth_country FROM player as T1 JOIN hall_of_fame as T2 ON T1.player_id = T2.player_id WHERE T2.inducted = "Y" GROUP BY T1.birth_country ORDER BY count(*) DESC LIMIT 10 | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. Top 10 countries with the most hall of fame players |
SELECT T1.player_id, T1.award_id , min(T1.year - T2.birth_year) FROM player_award as T1 JOIN player as T2 ON T1.player_id = T2.player_id GROUP BY T1.award_id | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. For every award, who is the youngest winner? |
SELECT T1.player_id, T1.award_id , max(T1.year - T2.birth_year) FROM player_award as T1 JOIN player as T2 ON T1.player_id = T2.player_id GROUP BY T1.award_id | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. For every award, who is the oldest winner? |
SELECT T2.team_id FROM hall_of_fame as T1 JOIN salary as T2 ON T1.player_id = T2.player_id AND T1.yearid = T2.year WHERE T1.inducted = "Y" GROUP BY T2.team_id ORDER BY count(*) DESC LIMIT 10 | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. Top 10 teams with the most hall of fame players |
SELECT avg(T1.death_year - T1.birth_year) FROM player as T1 JOIN hall_of_fame as T2 ON T1.player_id = T2.player_id WHERE T2.inducted = "Y" | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. Average lifespan of hall of fame players |
SELECT avg(T1.weight) FROM player as T1 JOIN player_award as T2 ON T1.player_id = T2.player_id GROUP BY notes | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. For award winners, what's average weight for each position |
SELECT T2.notes FROM hall_of_fame as T1 JOIN player_award as T2 ON T1.player_id = T2.player_id WHERE T1.inducted = "Y" GROUP BY notes ORDER BY count(*) DESC LIMIT 1 | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. For award winners, which position that has the most hall of fame players? |
SELECT player_id FROM player_award_vote WHERE year = "1971" ORDER BY points_won DESC LIMIT 1 | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. Which player get the highest score in 1971? |
SELECT T1.birth_month FROM player as T1 JOIN hall_of_fame as T2 ON T1.player_id = T2.player_id WHERE T2.inducted = "Y" GROUP BY T1.birth_month ORDER BY count(*) DESC LIMIT 1 | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. Which month that players were born has the highest likelihood to be elected as hall of fame? |
SELECT league_id FROM player_award WHERE year = "2006" GROUP BY league_id ORDER BY count(*) DESC LIMIT 1 | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. Which league has the most player awarded in 2006? |
SELECT DISTINCT notes FROM player_award WHERE player_id = "willite01" | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. What defense position the player ID willite01 is? |
SELECT count(*) FROM (SELECT player_id FROM player_award GROUP BY player_id HAVING count(*) > 10) | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. How many players were awarded more than ten times? |
SELECT birth_city FROM player GROUP BY birth_city ORDER BY count(*) DESC LIMIT 1 | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. Which city the most players were born? |
SELECT avg(T1.weight) FROM player as T1 JOIN player_award as T2 ON T1.player_id = T2.player_id WHERE T2.award_id = "TSN All-Star" AND notes = "3B" | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. What is the average weight of players who were awarded third-base man in TSN all-star award? |
SELECT player_id FROM salary WHERE year = "2015" ORDER BY salary DESC LIMIT 1 | Given the Table hall of fame having columns as player_id has datatype text, yearid has datatype number, votedby has datatype text, ballots has datatype text, needed has datatype text, votes has datatype text, inducted has datatype text, category has datatype text, needed_note has datatype text which has player id and Given the Table player award having columns as player_id has datatype text, award_id has datatype text, year has datatype number, league_id has datatype text, tie has datatype text, notes has datatype text which has player id and Given the Table player award vote having columns as award_id has datatype text, year has datatype number, league_id has datatype text, player_id has datatype text, points_won has datatype number, points_max has datatype number, votes_first has datatype text which has player id and Given the Table salary having columns as year has datatype number, team_id has datatype text, league_id has datatype text, player_id has datatype text, salary has datatype number which has player id and Given the Table player having columns as player_id has datatype text, birth_year has datatype text, birth_month has datatype text, birth_day has datatype text, birth_country has datatype text, birth_state has datatype text, birth_city has datatype text, death_year has datatype text, death_month has datatype text, death_day has datatype text, death_country has datatype text, death_state has datatype text, death_city has datatype text, name_first has datatype text, name_last has datatype text, name_given has datatype text, weight has datatype text which has player id. Answer the question by writing the appropriate SQL code. Who is the player had the highest salary in 2015? |
SELECT CrimeTS FROM GreaterManchesterCrime GROUP BY CrimeTS ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. What time do most of the crimes happen? |
SELECT Outcome FROM GreaterManchesterCrime WHERE Location LIKE "%Street%" GROUP BY Outcome ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. What are the most likely outcome of the police investigation if the crime happen on "street"? |
SELECT Type FROM GreaterManchesterCrime WHERE LSOA LIKE "%Salford%" GROUP BY Type ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Which type of crime happen the most in Salford? |
SELECT count(*) FROM GreaterManchesterCrime WHERE Outcome = "Under investigation" | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. How many crimes are under investigation? |
SELECT count(*) FROM GreaterManchesterCrime | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. How many crimes has been conducted? |
SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) DESC LIMIT 3 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. What is the top 3 area of crime conducted? |
SELECT Type FROM GreaterManchesterCrime WHERE Outcome LIKE "%Investigation complete%" GROUP BY Type ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Which type of crime has the highest rate of "Investigation complete"? |
SELECT count(*) FROM GreaterManchesterCrime WHERE Type LIKE "%Drug%" | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. How many crimes were classified as "Drugs"? |
SELECT count(*) FROM GreaterManchesterCrime WHERE Outcome LIke "%Under investigation%" | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. How many crimes are still "Under investigation" to date? |
SELECT Location FROM GreaterManchesterCrime WHERE Type LIke "%Drug%" GROUP BY Location ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Which location has the top amount of "Drugs" crime conducted? |
SELECT Type FROM GreaterManchesterCrime GROUP BY Type ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. What’s the most common type of crime? |
Subsets and Splits