answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT SUM(Enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation
Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.
CREATE TABLE university (affiliation VARCHAR, Enrollment INTEGER, founded INTEGER)
SELECT state FROM table_name_3 WHERE electorate = "cunningham"
What state shows for Cunningham?
CREATE TABLE table_name_3 (state VARCHAR, electorate VARCHAR)
SELECT COUNT(singles_w_l) FROM table_10294071_1 WHERE doubles_w_l = "11–14"
what is the total number of singles w–l where doubles w–l is 11–14
CREATE TABLE table_10294071_1 (singles_w_l VARCHAR, doubles_w_l VARCHAR)
SELECT COUNT(round) FROM table_name_83 WHERE college_junior_club_team__league_ = "kelowna rockets ( whl )"
What is the total number of Round, when College/Junior/Club Team (League) is "Kelowna Rockets ( WHL )"?
CREATE TABLE table_name_83 (round VARCHAR, college_junior_club_team__league_ VARCHAR)
SELECT location FROM table_11044765_1 WHERE mascot = "Miners"
What city and state are the miners located in?
CREATE TABLE table_11044765_1 (location VARCHAR, mascot VARCHAR)
SELECT season FROM table_15463188_16 WHERE number = "9"
Name the season when the number is 9
CREATE TABLE table_15463188_16 (season VARCHAR, number VARCHAR)
SELECT record FROM table_name_94 WHERE date = "may 1" AND loss = "speier (1–3)"
What was the record at the game held on May 1st with a loss of Speier (1–3)?
CREATE TABLE table_name_94 (record VARCHAR, date VARCHAR, loss VARCHAR)
SELECT MIN(erp_w) FROM table_name_47 WHERE call_sign = "w233be"
Which ERP W is the lowest one that has a Call sign of w233be?
CREATE TABLE table_name_47 (erp_w INTEGER, call_sign VARCHAR)
SELECT competition FROM table_name_64 WHERE nationality___opponent = "rosario"
Name the Nationality / Opponent of rosario?
CREATE TABLE table_name_64 (competition VARCHAR, nationality___opponent VARCHAR)
SELECT SUM(league_cup) FROM table_name_36 WHERE championship < 10 AND total < 3
How many league cups associated with under 10 championships and a total of under 3?
CREATE TABLE table_name_36 (league_cup INTEGER, championship VARCHAR, total VARCHAR)
SELECT ihsaa_class AS Football FROM table_name_15 WHERE year_joined = 1968
What is the IHSAA Class for football for the team joining in 1968?
CREATE TABLE table_name_15 (ihsaa_class VARCHAR, year_joined VARCHAR)
SELECT country FROM table_name_68 WHERE time = "1:29.43.60"
What is Country, when Time is 1:29.43.60?
CREATE TABLE table_name_68 (country VARCHAR, time VARCHAR)
SELECT played FROM table_name_77 WHERE points_for = "310"
What is the number Played that has 310 Points for?
CREATE TABLE table_name_77 (played VARCHAR, points_for VARCHAR)
SELECT tournament FROM table_name_64 WHERE date = "20 december 2010"
What Tournament has a Date of 20 december 2010?
CREATE TABLE table_name_64 (tournament VARCHAR, date VARCHAR)
SELECT written_by FROM table_13477468_3 WHERE us_viewers__millions_ = "1.83"
Who wrote the episode that received 1.83 million U.S. viewers?
CREATE TABLE table_13477468_3 (written_by VARCHAR, us_viewers__millions_ VARCHAR)
SELECT surface FROM table_23235767_4 WHERE championship = "Philadelphia"
Name the surface for philadelphia
CREATE TABLE table_23235767_4 (surface VARCHAR, championship VARCHAR)
SELECT no_votes FROM table_256286_63 WHERE description = "Partial public funding of election campaigns"
How many no votes were there in the partial public funding of election campaigns legislation?
CREATE TABLE table_256286_63 (no_votes VARCHAR, description VARCHAR)
SELECT class FROM table_name_57 WHERE weight = 203
Which Class has a Weight of 203?
CREATE TABLE table_name_57 (class VARCHAR, weight VARCHAR)
SELECT season FROM table_10748727_1 WHERE points = "9"
What year had a score of 9?
CREATE TABLE table_10748727_1 (season VARCHAR, points VARCHAR)
SELECT MAX(grid) FROM table_name_75 WHERE driver = "jean alesi" AND laps < 24
When Jean Alesi had laps less than 24, what was his highest grid?
CREATE TABLE table_name_75 (grid INTEGER, driver VARCHAR, laps VARCHAR)
SELECT 3 AS _credits FROM table_name_34 WHERE hand = "theoretical return"
What does a hand of Theoretical return have as a 3 credit?
CREATE TABLE table_name_34 (hand VARCHAR)
SELECT location FROM table_name_56 WHERE opponent = "hiroyuki abe"
What location had the opponent Hiroyuki Abe?
CREATE TABLE table_name_56 (location VARCHAR, opponent VARCHAR)
SELECT the_mole FROM table_13036251_1 WHERE airdate = "8 January 2009"
what's the mole with airdate being 8 january 2009
CREATE TABLE table_13036251_1 (the_mole VARCHAR, airdate VARCHAR)
SELECT Name FROM Projects WHERE NOT Code IN (SELECT Project FROM AssignedTo)
Select the project names which are not assigned yet.
CREATE TABLE Projects (Name VARCHAR, Code VARCHAR, Project VARCHAR); CREATE TABLE AssignedTo (Name VARCHAR, Code VARCHAR, Project VARCHAR)
SELECT MIN(draws) FROM table_16034882_4 WHERE club = "Švyturys Klaipėda"
How many draws did švyturys Klaipėda have?
CREATE TABLE table_16034882_4 (draws INTEGER, club VARCHAR)
SELECT SUM(lane) FROM table_name_36 WHERE time > 13.59 AND rank > 8
How many Lanes have a Time larger than 13.59, and a Rank larger than 8?
CREATE TABLE table_name_36 (lane INTEGER, time VARCHAR, rank VARCHAR)
SELECT team_2 FROM table_name_52 WHERE team_1 = "joe public"
Which Team 2 had a Team 1of joe public?
CREATE TABLE table_name_52 (team_2 VARCHAR, team_1 VARCHAR)
SELECT MAX(goals_against) FROM table_name_4 WHERE position = 15
What is the highest goals against that has 15 as position?
CREATE TABLE table_name_4 (goals_against INTEGER, position VARCHAR)
SELECT opponent FROM table_name_86 WHERE field = "homewood field"
Who was the opponent of the game at Homewood field?
CREATE TABLE table_name_86 (opponent VARCHAR, field VARCHAR)
SELECT MIN(league_cup) FROM table_name_65 WHERE fa_cup < 0
What is the lowest number of league cups associated with 0 FA cups?
CREATE TABLE table_name_65 (league_cup INTEGER, fa_cup INTEGER)
SELECT label FROM table_name_28 WHERE format = "cd" AND release = "we are the rage"
What is the label of release we are the rage with a cd format?
CREATE TABLE table_name_28 (label VARCHAR, format VARCHAR, release VARCHAR)
SELECT format FROM table_name_3 WHERE label = "geffen" AND region = "united states"
Tell me the format for geffen of the united states
CREATE TABLE table_name_3 (format VARCHAR, label VARCHAR, region VARCHAR)
SELECT runner_up FROM table_2429942_2 WHERE season = "2008-09"
Who is the runner-up for the season 2008-09?
CREATE TABLE table_2429942_2 (runner_up VARCHAR, season VARCHAR)
SELECT call_sign FROM table_name_83 WHERE frequency_mhz > 90.1 AND erp_w = 1
Tell me the call sign which has a frequency Mhz more than 90.1 and ERP W of 1
CREATE TABLE table_name_83 (call_sign VARCHAR, frequency_mhz VARCHAR, erp_w VARCHAR)
SELECT replaced_by FROM table_29414946_3 WHERE team = "Santos"
Who was the new Santos manager?
CREATE TABLE table_29414946_3 (replaced_by VARCHAR, team VARCHAR)
SELECT distance FROM table_name_59 WHERE date = "saturday, august 23"
What was the distance of the race on saturday, august 23?
CREATE TABLE table_name_59 (distance VARCHAR, date VARCHAR)
SELECT average_attendance FROM table_name_75 WHERE total_attendance = "2268508"
What's the average attendance of the league with a total attendance of 2268508?
CREATE TABLE table_name_75 (average_attendance VARCHAR, total_attendance VARCHAR)
SELECT MAX(population) FROM table_22815568_6
What is the population maximum?
CREATE TABLE table_22815568_6 (population INTEGER)
SELECT lead FROM table_name_25 WHERE left_bloc = "8.4%"
Name the lead with left bloc of 8.4%
CREATE TABLE table_name_25 (lead VARCHAR, left_bloc VARCHAR)
SELECT COUNT(modified_torque__lb_ft_) FROM table_19704392_1 WHERE standard_hp = "n/a"
What is the modified torque (lb/ft) when the standard hp n/a?
CREATE TABLE table_19704392_1 (modified_torque__lb_ft_ VARCHAR, standard_hp VARCHAR)
SELECT SUM(draws) FROM table_name_83 WHERE wins > 7 AND wimmera_fl = "nhill" AND losses > 8
How many Draws have Wins larger than 7, and a Wimmera FL of nhill, and Losses larger than 8?
CREATE TABLE table_name_83 (draws INTEGER, losses VARCHAR, wins VARCHAR, wimmera_fl VARCHAR)
SELECT tournament FROM table_name_93 WHERE 2007 = "2r" AND 2011 = "2r"
Which tournament has a 2007 of 2r, and a 2011 of 2r?
CREATE TABLE table_name_93 (tournament VARCHAR)
SELECT high_assists FROM table_name_46 WHERE team = "orlando"
Tell me the high assists for orlando
CREATE TABLE table_name_46 (high_assists VARCHAR, team VARCHAR)
SELECT candidates FROM table_1341423_40 WHERE incumbent = "Lindsey Graham"
who are the candidates when the incumbent is lindsey graham?
CREATE TABLE table_1341423_40 (candidates VARCHAR, incumbent VARCHAR)
SELECT MIN(silver) FROM table_name_73 WHERE rank = "12" AND bronze > 0
What is the lowest number of silvers for countries in rank 12 with more than 0 bronze?
CREATE TABLE table_name_73 (silver INTEGER, rank VARCHAR, bronze VARCHAR)
SELECT translation FROM table_name_15 WHERE sign = "aquarius"
What is the translation of the sign of Aquarius?
CREATE TABLE table_name_15 (translation VARCHAR, sign VARCHAR)
SELECT martin FROM table_name_42 WHERE lanier = "6%"
What martin has a lanier of 6%?
CREATE TABLE table_name_42 (martin VARCHAR, lanier VARCHAR)
SELECT market_rank FROM table_10333757_1 WHERE calls = "WCRN"
Which Market/Rank is associated with WCRN calls?
CREATE TABLE table_10333757_1 (market_rank VARCHAR, calls VARCHAR)
SELECT affiliation FROM table_name_37 WHERE founded < 1965 AND high_school = "issaquah"
What is the affiliation of a high school in Issaquah that was founded in less than 1965?
CREATE TABLE table_name_37 (affiliation VARCHAR, founded VARCHAR, high_school VARCHAR)
SELECT COUNT(seats_2006) FROM table_21132404_1 WHERE _percentage_1997 = "38.9"
How many seats in 2006 has a % 1997 rating of 38.9?
CREATE TABLE table_21132404_1 (seats_2006 VARCHAR, _percentage_1997 VARCHAR)
SELECT MAX(rank) FROM table_name_38 WHERE country = "hungary"
What is Hungary's highest Rank?
CREATE TABLE table_name_38 (rank INTEGER, country VARCHAR)
SELECT home FROM table_name_32 WHERE date = "october 8"
what team played on october 8
CREATE TABLE table_name_32 (home VARCHAR, date VARCHAR)
SELECT numbers FROM table_name_34 WHERE model = "lc" AND year_built = 2009
What are the numbers for lc models built in 2009?
CREATE TABLE table_name_34 (numbers VARCHAR, model VARCHAR, year_built VARCHAR)
SELECT SUM(cup_goals) FROM table_name_78 WHERE league_apps > 5 AND cup_apps = 1 AND league_goals < 4
How many cup goals in the season with more than 5 league apps, 1 cup apps and fewer than 4 league goals?
CREATE TABLE table_name_78 (cup_goals INTEGER, league_goals VARCHAR, league_apps VARCHAR, cup_apps VARCHAR)
SELECT date FROM table_name_80 WHERE venue = "lake oval"
What date was the game played at Lake Oval?
CREATE TABLE table_name_80 (date VARCHAR, venue VARCHAR)
SELECT 17 AS th_c FROM table_name_68 WHERE british = "əʊ"
What is the 17th c. pronunciation when the british is əʊ?
CREATE TABLE table_name_68 (british VARCHAR)
SELECT T1.name, T1.city, T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid ORDER BY COUNT(*) DESC LIMIT 1
Find the name and city of the airport which is the source for the most number of flight routes.
CREATE TABLE airports (name VARCHAR, city VARCHAR, apid VARCHAR); CREATE TABLE routes (src_apid VARCHAR)
SELECT SUM(year) FROM table_name_41 WHERE outcome = "runner-up" AND championship = "world darts championship"
Tell me the sum of Year for outcome of runner-up for world darts championship
CREATE TABLE table_name_41 (year INTEGER, outcome VARCHAR, championship VARCHAR)
SELECT entrant FROM table_name_72 WHERE engine = "renault rs8 3.0 v10" AND driver = "damon hill"
Who is the entrant with a driver Damon Hill and a Renault RS8 3.0 V10 engine?
CREATE TABLE table_name_72 (entrant VARCHAR, engine VARCHAR, driver VARCHAR)
SELECT record FROM table_27734286_1 WHERE high_points = "C. J. Miles (20)"
What record has c. j. miles (20) in the high points?
CREATE TABLE table_27734286_1 (record VARCHAR, high_points VARCHAR)
SELECT opponent FROM table_name_70 WHERE week > 4 AND date = "sun. nov. 17"
Who is the opponent of the game after week 4 on Sun. Nov. 17?
CREATE TABLE table_name_70 (opponent VARCHAR, week VARCHAR, date VARCHAR)
SELECT us_original_airdate FROM table_29475589_5 WHERE _number = 9
When the # is 9 what is the U.S original airdate?
CREATE TABLE table_29475589_5 (us_original_airdate VARCHAR, _number VARCHAR)
SELECT AVG(attendance) FROM table_name_24 WHERE record = "12-4" AND average < 10 OFFSET 027
What's the mean attendance number when the record is 12-4 and the average is less than 10,027?
CREATE TABLE table_name_24 (attendance INTEGER, record VARCHAR, average VARCHAR)
SELECT COUNT(career_caps) FROM table_name_78 WHERE position = "full back" AND tour_apps < 29
What is the number of career caps for a full back, when tour Apps is smaller than 29?
CREATE TABLE table_name_78 (career_caps VARCHAR, position VARCHAR, tour_apps VARCHAR)
SELECT AVG(events) FROM table_name_84 WHERE tournament = "masters tournament" AND top_25 > 0
What is the average number of events the Masters tournament, which has more than 0 top-25, has?
CREATE TABLE table_name_84 (events INTEGER, tournament VARCHAR, top_25 VARCHAR)
SELECT episode_title FROM table_name_83 WHERE doctor_who_episode = "episodes 1–12"
Which Episode title has a Doctor Who episode of episodes 1–12?
CREATE TABLE table_name_83 (episode_title VARCHAR, doctor_who_episode VARCHAR)
SELECT 20 AS _questions FROM table_1566852_4 WHERE date = "4-03"
Who was featured in 20 questions on 4-03?
CREATE TABLE table_1566852_4 (date VARCHAR)
SELECT T1.teacher_id, T2.last_name FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T1.detention_type_code = "AFTER" GROUP BY T1.teacher_id ORDER BY COUNT(*) DESC LIMIT 1
Find the id and last name of the teacher that has the most detentions with detention type code "AFTER"?
CREATE TABLE Detention (teacher_id VARCHAR, detention_type_code VARCHAR); CREATE TABLE Teachers (last_name VARCHAR, teacher_id VARCHAR)
SELECT winning_score FROM table_name_39 WHERE margin = "3 strokes"
What is the winning score of the match with a margin of 3 strokes?
CREATE TABLE table_name_39 (winning_score VARCHAR, margin VARCHAR)
SELECT viewers__millions_ FROM table_23397386_2 WHERE airdate = "March 28, 2010"
How many million viewers watched the episode that aired on March 28, 2010?
CREATE TABLE table_23397386_2 (viewers__millions_ VARCHAR, airdate VARCHAR)
SELECT visitor FROM table_name_9 WHERE date = "march 27"
Who was the visitor on March 27?
CREATE TABLE table_name_9 (visitor VARCHAR, date VARCHAR)
SELECT date FROM table_name_52 WHERE home_team = "north melbourne"
What day did North Melbourne play as the home team?
CREATE TABLE table_name_52 (date VARCHAR, home_team VARCHAR)
SELECT COUNT(grid) FROM table_name_87 WHERE time_retired = "+1.837"
How many grids are associated with a Time/Retired of +1.837?
CREATE TABLE table_name_87 (grid VARCHAR, time_retired VARCHAR)
SELECT MIN(wins) FROM table_name_51 WHERE poles = 3 AND season = "2010"
What is the fewest number of wins when he has 3 poles in 2010?
CREATE TABLE table_name_51 (wins INTEGER, poles VARCHAR, season VARCHAR)
SELECT location FROM table_name_84 WHERE event = "november reign"
What is the location when the event was November reign?
CREATE TABLE table_name_84 (location VARCHAR, event VARCHAR)
SELECT location_attendance FROM table_11964154_9 WHERE record = "14–39"
what's the location attendance where record is 14–39
CREATE TABLE table_11964154_9 (location_attendance VARCHAR, record VARCHAR)
SELECT team FROM table_name_8 WHERE make = "buick regal" AND driver = "bobby hillin jr. (r)"
What team does bobby hillin jr. (r) drive a buick regal for?
CREATE TABLE table_name_8 (team VARCHAR, make VARCHAR, driver VARCHAR)
SELECT poles FROM table_name_90 WHERE season = 2009 AND points = "test driver"
Which pole has a Season of 2009 and points of test driver?
CREATE TABLE table_name_90 (poles VARCHAR, season VARCHAR, points VARCHAR)
SELECT MAX(attendance) FROM table_name_62 WHERE week > 11 AND opponent = "washington redskins"
What was the attendance during the match that took place after week 11 against the washington redskins?
CREATE TABLE table_name_62 (attendance INTEGER, week VARCHAR, opponent VARCHAR)
SELECT location FROM table_name_16 WHERE event = "extreme challenge 63" AND time = "2:00"
Where was Extreme Challenge 63 with a time of 2:00 held?
CREATE TABLE table_name_16 (location VARCHAR, event VARCHAR, time VARCHAR)
SELECT womens_singles FROM table_12104319_1 WHERE womens_doubles = "Naoko Fukuman Kurumi Yonao"
What are the womens singles of naoko fukuman kurumi yonao?
CREATE TABLE table_12104319_1 (womens_singles VARCHAR, womens_doubles VARCHAR)
SELECT score FROM table_name_66 WHERE attendance = "349"
What is Score, when Attendance is "349"?
CREATE TABLE table_name_66 (score VARCHAR, attendance VARCHAR)
SELECT driver FROM table_name_77 WHERE position = "2nd" AND season = 2001
What is Driver, when Position is 2nd, and when Season is 2001?
CREATE TABLE table_name_77 (driver VARCHAR, position VARCHAR, season VARCHAR)
SELECT college FROM table_name_44 WHERE pick__number = "268"
What college is pick number 268 from?
CREATE TABLE table_name_44 (college VARCHAR, pick__number VARCHAR)
SELECT gold FROM table_name_71 WHERE total < 4 AND silver = "1" AND bronze = "1"
What is Gold, when Total is less than 4, when Silver is 1, and when Bronze is 1?
CREATE TABLE table_name_71 (gold VARCHAR, bronze VARCHAR, total VARCHAR, silver VARCHAR)
SELECT 2002 FROM table_name_65 WHERE 2006 = "grand slam tournaments"
What shows for 2002 when 2006 is Grand Slam Tournaments?
CREATE TABLE table_name_65 (Id VARCHAR)
SELECT new_hampshire FROM table_13011547_1 WHERE year = 2009
What is the new hampshire in 2009?
CREATE TABLE table_13011547_1 (new_hampshire VARCHAR, year VARCHAR)
SELECT opponent FROM table_name_82 WHERE attendance = "34,063"
Who did the Chiefs play at the game attended by 34,063?
CREATE TABLE table_name_82 (opponent VARCHAR, attendance VARCHAR)
SELECT date FROM table_name_18 WHERE result = "l 25-13"
Which date has a Result of l 25-13?
CREATE TABLE table_name_18 (date VARCHAR, result VARCHAR)
SELECT us_viewers__million_ FROM table_22347090_4 WHERE no_in_season = 2
How many viewers tuned in for season 2?
CREATE TABLE table_22347090_4 (us_viewers__million_ VARCHAR, no_in_season VARCHAR)
SELECT final FROM table_name_60 WHERE run_3 = "1:57.41"
What is Final, when Run 3 is 1:57.41?
CREATE TABLE table_name_60 (final VARCHAR, run_3 VARCHAR)
SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500
Show the status shared by cities with population bigger than 1500 and smaller than 500.
CREATE TABLE city (Status VARCHAR, Population INTEGER)
SELECT nationality, COUNT(*) FROM swimmer GROUP BY nationality HAVING COUNT(*) > 1
List countries that have more than one swimmer.
CREATE TABLE swimmer (nationality VARCHAR)
SELECT venue FROM table_name_51 WHERE extra = "long race" AND result = "13th"
Which venue led to a result of 13th and had an extra of Long Race?
CREATE TABLE table_name_51 (venue VARCHAR, extra VARCHAR, result VARCHAR)
SELECT season FROM table_name_4 WHERE opponent = "hibernians"
Which Season has an Opponent of hibernians?
CREATE TABLE table_name_4 (season VARCHAR, opponent VARCHAR)
SELECT drivers FROM table_name_28 WHERE engine = "mercedes ic 108e" AND races = "8-10"
Who drove a race car with a Mercedes IC 108e engine and has an 8-10 record?
CREATE TABLE table_name_28 (drivers VARCHAR, engine VARCHAR, races VARCHAR)
SELECT DISTINCT product_name FROM products ORDER BY product_name
List the names of all distinct products in alphabetical order.
CREATE TABLE products (product_name VARCHAR)
SELECT title FROM table_name_61 WHERE remark = "#21 us [riaa certified gold january 3, 1990]"
What title had a remark of #21 us [riaa certified gold january 3, 1990]?
CREATE TABLE table_name_61 (title VARCHAR, remark VARCHAR)
SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country
Show the season, the player, and the name of the country that player belongs to.
CREATE TABLE match_season (Season VARCHAR, Player VARCHAR, Country VARCHAR); CREATE TABLE country (Country_name VARCHAR, Country_id VARCHAR)
SELECT director FROM table_name_8 WHERE language = "dutch"
Who is the Director that speaks dutch?
CREATE TABLE table_name_8 (director VARCHAR, language VARCHAR)