answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT COUNT(capacity) FROM table_name_8 WHERE venue = "nop aquatic centre" AND established > 1929
What is the capacity at the nop aquatic centre, established after 1929?
CREATE TABLE table_name_8 (capacity VARCHAR, venue VARCHAR, established VARCHAR)
SELECT largest_city FROM table_17416221_1 WHERE province = "Eastern Cape"
what is the largest city where the province is eastern cape?
CREATE TABLE table_17416221_1 (largest_city VARCHAR, province VARCHAR)
SELECT MIN(first_elected) FROM table_name_53 WHERE district = "south carolina 2"
Which First elected has a District of south carolina 2?
CREATE TABLE table_name_53 (first_elected INTEGER, district VARCHAR)
SELECT Party, COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1
What is the party that has the largest number of representatives?
CREATE TABLE representative (Party VARCHAR)
SELECT AVG(total) FROM table_name_95 WHERE silver = 1 AND gold < 0
What's the total when the gold is less than 0 and silver is less than 1?
CREATE TABLE table_name_95 (total INTEGER, silver VARCHAR, gold VARCHAR)
SELECT rider FROM table_name_57 WHERE rank < 10 AND time = "1:26.31.20"
Who is the rider who has a rank lower than 10, and a time of 1:26.31.20?
CREATE TABLE table_name_57 (rider VARCHAR, rank VARCHAR, time VARCHAR)
SELECT COUNT(viewers__millions_) FROM table_24689168_5 WHERE episode = 8
How many records for number of viewers is listed for episode number 8?
CREATE TABLE table_24689168_5 (viewers__millions_ VARCHAR, episode VARCHAR)
SELECT joined_acc FROM table_28744929_1 WHERE location = "Chapel Hill, North Carolina"
when did the institution at chapel hill, North carolina join acc?
CREATE TABLE table_28744929_1 (joined_acc VARCHAR, location VARCHAR)
SELECT tv_season FROM table_27553627_2 WHERE viewers__in_millions_ = "14.54"
What tv season year had 14.54 million viewers?
CREATE TABLE table_27553627_2 (tv_season VARCHAR, viewers__in_millions_ VARCHAR)
SELECT artist FROM table_name_31 WHERE year = 2007 AND composer = "hayko"
What artist shows 2007 and composer of Hayko?
CREATE TABLE table_name_31 (artist VARCHAR, year VARCHAR, composer VARCHAR)
SELECT AVG(game) FROM table_name_47 WHERE date = "october 1"
Date of October 1 has what average game?
CREATE TABLE table_name_47 (game INTEGER, date VARCHAR)
SELECT date_of_appointment FROM table_name_79 WHERE manner_of_departure = "contract expired" AND team = "lecce"
What was the date of appointment for the manager of lecce when the previous manager's contract expired?
CREATE TABLE table_name_79 (date_of_appointment VARCHAR, manner_of_departure VARCHAR, team VARCHAR)
SELECT result FROM table_name_89 WHERE field = "texas stadium"
what is the result from texas stadium?
CREATE TABLE table_name_89 (result VARCHAR, field VARCHAR)
SELECT winner FROM table_name_43 WHERE date = "5 sep"
What is Winner, when Date is 5 Sep?
CREATE TABLE table_name_43 (winner VARCHAR, date VARCHAR)
SELECT name FROM teacher WHERE hometown <> "little lever urban district"
List the name of teachers whose hometown is not `` Little Lever Urban District '' .
CREATE TABLE teacher (name VARCHAR, hometown VARCHAR)
SELECT team_name FROM table_name_84 WHERE schools = "cisne fairfield"
What is the name of the team from cisne fairfield school?
CREATE TABLE table_name_84 (team_name VARCHAR, schools VARCHAR)
SELECT date FROM table_name_32 WHERE attendance = "73,405"
On what Date was the Attendance 73,405?
CREATE TABLE table_name_32 (date VARCHAR, attendance VARCHAR)
SELECT ResTypeName FROM Restaurant_Type
List all restaurant types.
CREATE TABLE Restaurant_Type (ResTypeName VARCHAR)
SELECT erp_w FROM table_name_54 WHERE frequency_mhz > 89.1 AND city_of_license = "de queen, arkansas"
Which ERP W has a Frequency MHz larger than 89.1, and a City of license of de queen, arkansas?
CREATE TABLE table_name_54 (erp_w VARCHAR, frequency_mhz VARCHAR, city_of_license VARCHAR)
SELECT democratic_ticket FROM table_name_14 WHERE office = "comptroller"
What is the kind of Democratic ticket has a Office of comptroller?
CREATE TABLE table_name_14 (democratic_ticket VARCHAR, office VARCHAR)
SELECT COUNT(primary_conference) FROM table_10082596_1 WHERE location = "Ames, IA"
How many of the schools listed are in Ames, IA?
CREATE TABLE table_10082596_1 (primary_conference VARCHAR, location VARCHAR)
SELECT date FROM table_name_63 WHERE attendance = "30,612"
Which Date has an Attendance of 30,612?
CREATE TABLE table_name_63 (date VARCHAR, attendance VARCHAR)
SELECT result FROM table_name_79 WHERE week = 3
What was week 3 score?
CREATE TABLE table_name_79 (result VARCHAR, week VARCHAR)
SELECT incumbent FROM table_1341663_44 WHERE district = "Texas 19"
What was the incumbent for texas 19?
CREATE TABLE table_1341663_44 (incumbent VARCHAR, district VARCHAR)
SELECT time_retired FROM table_name_19 WHERE grid = 3
What is the time/retired for grid 3?
CREATE TABLE table_name_19 (time_retired VARCHAR, grid VARCHAR)
SELECT premiere FROM table_29633639_1 WHERE peak = 34
what is the number of the premiere for the 34 peak
CREATE TABLE table_29633639_1 (premiere VARCHAR, peak VARCHAR)
SELECT original_artist FROM table_28715942_6 WHERE vocal_percussionist = "Benjamin Holder"
Who is the artist where the vocal percussionist is Benjamin Holder?
CREATE TABLE table_28715942_6 (original_artist VARCHAR, vocal_percussionist VARCHAR)
SELECT score FROM table_name_42 WHERE opponent = "saint-amant" AND result = "lost"
What is the score where Saint-Amant lost the match?
CREATE TABLE table_name_42 (score VARCHAR, opponent VARCHAR, result VARCHAR)
SELECT COUNT(poor_law_union) FROM table_30120559_1 WHERE area__acres__ = 332
Name the poor law union for area being 332
CREATE TABLE table_30120559_1 (poor_law_union VARCHAR, area__acres__ VARCHAR)
SELECT bowling_style FROM table_name_49 WHERE player = "damien martyn"
What is Damien Martyn's bowling style?
CREATE TABLE table_name_49 (bowling_style VARCHAR, player VARCHAR)
SELECT finalist FROM table_19651669_1 WHERE mvp = "Romain Sato"
Who was the finalist when the MVP was Romain Sato?
CREATE TABLE table_19651669_1 (finalist VARCHAR, mvp VARCHAR)
SELECT MAX(silver) FROM table_name_72 WHERE gold < 12 AND total < 8
What is the maximum number of silvers for a country with fewer than 12 golds and a total less than 8?
CREATE TABLE table_name_72 (silver INTEGER, gold VARCHAR, total VARCHAR)
SELECT COUNT(division) FROM table_1243601_1 WHERE year = "2006"
How many divisions were listed in 2006?
CREATE TABLE table_1243601_1 (division VARCHAR, year VARCHAR)
SELECT votes FROM table_name_55 WHERE gender = "♂" AND religion = "☪" AND candidate_name = "khalil chawka"
Khalil chawka has a gender of ♂, a religion of ☪, and how many votes?
CREATE TABLE table_name_55 (votes VARCHAR, candidate_name VARCHAR, gender VARCHAR, religion VARCHAR)
SELECT location_attendance FROM table_17325580_6 WHERE date = "December 12"
What is every location attendance on the date December 12?
CREATE TABLE table_17325580_6 (location_attendance VARCHAR, date VARCHAR)
SELECT location FROM table_name_41 WHERE record = "2-0"
What was the location when he had a 2-0 record?
CREATE TABLE table_name_41 (location VARCHAR, record VARCHAR)
SELECT T1.owner_id, T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY COUNT(*) DESC LIMIT 1
Which owner has paid for the most treatments on his or her dogs? List the owner id and last name.
CREATE TABLE Owners (owner_id VARCHAR, last_name VARCHAR); CREATE TABLE Dogs (owner_id VARCHAR, dog_id VARCHAR); CREATE TABLE Treatments (dog_id VARCHAR)
SELECT conference_titles FROM table_name_23 WHERE win__percentage = ".667"
What is Conference Titles, when Win % is .667?
CREATE TABLE table_name_23 (conference_titles VARCHAR, win__percentage VARCHAR)
SELECT name FROM table_name_92 WHERE moving_to = "union" AND country = "cmr"
What is the union moving name and is from cmr?
CREATE TABLE table_name_92 (name VARCHAR, moving_to VARCHAR, country VARCHAR)
SELECT record FROM table_name_90 WHERE game < 79
What is the record for a game lower than 79?
CREATE TABLE table_name_90 (record VARCHAR, game INTEGER)
SELECT tournament FROM table_name_93 WHERE partner = "julian knowle"
Which tournament features the partner julian knowle?
CREATE TABLE table_name_93 (tournament VARCHAR, partner VARCHAR)
SELECT to_par FROM table_name_2 WHERE player = "k. j. choi"
What's k. j. choi's to par?
CREATE TABLE table_name_2 (to_par VARCHAR, player VARCHAR)
SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1
What is the phone number of the customer who has filed the most recent complaint?
CREATE TABLE customers (phone_number VARCHAR, customer_id VARCHAR); CREATE TABLE complaints (customer_id VARCHAR, date_complaint_raised VARCHAR)
SELECT AVG(year) FROM table_name_34 WHERE pts > 0 AND entrant = "ecurie bleue"
What year did Ecurie Bleue score more than 0 points?
CREATE TABLE table_name_34 (year INTEGER, pts VARCHAR, entrant VARCHAR)
SELECT player FROM table_name_61 WHERE school_club_team = "western kentucky"
Which player played for Western Kentucky?
CREATE TABLE table_name_61 (player VARCHAR, school_club_team VARCHAR)
SELECT venue FROM table_name_62 WHERE home_team = "fitzroy"
What venue featured fitzroy as the home squad?
CREATE TABLE table_name_62 (venue VARCHAR, home_team VARCHAR)
SELECT home FROM table_name_5 WHERE aggregate = "2-3"
Tell me the home of 2-3
CREATE TABLE table_name_5 (home VARCHAR, aggregate VARCHAR)
SELECT comedians FROM table_23122988_1 WHERE episode = "1x03"
Who were the comedians on episode 1x03?
CREATE TABLE table_23122988_1 (comedians VARCHAR, episode VARCHAR)
SELECT no FROM table_11545282_17 WHERE years_for_jazz = "1987-89"
What is the number of players that played 1987-89?
CREATE TABLE table_11545282_17 (no VARCHAR, years_for_jazz VARCHAR)
SELECT raw_bandwidth__mbit_s_ FROM table_name_8 WHERE name = "sas 300"
What is the Raw bandwidth (Mbit/s) for the SAS 300?
CREATE TABLE table_name_8 (raw_bandwidth__mbit_s_ VARCHAR, name VARCHAR)
SELECT MIN(touchdowns) FROM table_name_14 WHERE player = "andrew glover" AND yards > 281
What is the lowest Touchdowns, when Player is Andrew Glover, and when Yards is greater than 281?
CREATE TABLE table_name_14 (touchdowns INTEGER, player VARCHAR, yards VARCHAR)
SELECT college FROM table_name_86 WHERE pick = 11
What college has a pick of 11?
CREATE TABLE table_name_86 (college VARCHAR, pick VARCHAR)
SELECT MAX(first) FROM table_name_5 WHERE total > 0 AND gold > 0
What is the latest first year with 0 total medals and over 0 golds?
CREATE TABLE table_name_5 (first INTEGER, total VARCHAR, gold VARCHAR)
SELECT MAX(crowd) FROM table_name_88 WHERE venue = "princes park"
What is the largest crowd at princes park?
CREATE TABLE table_name_88 (crowd INTEGER, venue VARCHAR)
SELECT rider FROM table_25220821_4 WHERE rank = 2
Who is ranked 2?
CREATE TABLE table_25220821_4 (rider VARCHAR, rank VARCHAR)
SELECT week_4 FROM table_name_8 WHERE week_5 = "[month ended]" AND week_2 = "april ireland"
Who is in week 4 if week 5 is [month ended] and week 2 is April Ireland?
CREATE TABLE table_name_8 (week_4 VARCHAR, week_5 VARCHAR, week_2 VARCHAR)
SELECT 454 AS _gs_flx FROM table_127511_1 WHERE pacbio = "100-500 Mb"
What is 454 gs flx when pacbio is 100-500 mb?
CREATE TABLE table_127511_1 (pacbio VARCHAR)
SELECT AVG(top_25) FROM table_name_45 WHERE events = 20 AND wins > 2
What is the Top-25 with an Events of 20, and a Wins larger than 2?
CREATE TABLE table_name_45 (top_25 INTEGER, events VARCHAR, wins VARCHAR)
SELECT MIN(round) FROM table_1137704_2 WHERE grand_prix = "German grand_prix"
whatthe minimum round where grand prix is german grand prix
CREATE TABLE table_1137704_2 (round INTEGER, grand_prix VARCHAR)
SELECT silver FROM table_name_54 WHERE gold > 12 AND bronze = 11
How many silver medals were won by the participant(s) that had more than 12 gold medals and 11 bronze medals?
CREATE TABLE table_name_54 (silver VARCHAR, gold VARCHAR, bronze VARCHAR)
SELECT score FROM table_27756314_11 WHERE high_points = "Michael Beasley (26)"
What was the score in the game in which Michael Beasley (26) did the high points?
CREATE TABLE table_27756314_11 (score VARCHAR, high_points VARCHAR)
SELECT heat_points FROM table_name_11 WHERE game < 80 AND date = "april 26 (first round)"
What is Heat Points, when Game is less than 80, and when Date is "April 26 (First Round)"?
CREATE TABLE table_name_11 (heat_points VARCHAR, game VARCHAR, date VARCHAR)
SELECT points_classification FROM table_name_7 WHERE general_classification = "bernard hinault" AND trofeo_fast_team = "bianchi" AND winner = "urs freuler" AND stage = "4"
Which points classification shares a general classification of Bernard Hinault, a Trofeo Fast Tem of Bianchi, was won by Urs Freuler, and was stage 4?
CREATE TABLE table_name_7 (points_classification VARCHAR, stage VARCHAR, winner VARCHAR, general_classification VARCHAR, trofeo_fast_team VARCHAR)
SELECT english_day_name_meaning FROM table_2624098_1 WHERE old_english_day_name = "Sæturnesdæg"
what is the English meaning of the old English name "sæturnesdæg"?
CREATE TABLE table_2624098_1 (english_day_name_meaning VARCHAR, old_english_day_name VARCHAR)
SELECT won FROM table_20396710_1 WHERE points_for = "83"
how many won 83 points for?
CREATE TABLE table_20396710_1 (won VARCHAR, points_for VARCHAR)
SELECT title FROM table_28582091_2 WHERE production_code = "2J5515"
What was the title of the episode with production code 2J5515?
CREATE TABLE table_28582091_2 (title VARCHAR, production_code VARCHAR)
SELECT label FROM table_name_67 WHERE region = "united states" AND format = "lp album"
Which Label has a Region of united states, and a Format of lp album?
CREATE TABLE table_name_67 (label VARCHAR, region VARCHAR, format VARCHAR)
SELECT division FROM table_name_60 WHERE season < 2004
What is the division for the season earlier than 2004?
CREATE TABLE table_name_60 (division VARCHAR, season INTEGER)
SELECT MIN(cuchumuela_municipality) FROM table_2509112_3
What is the Cuchumela Municipality minimum?
CREATE TABLE table_2509112_3 (cuchumuela_municipality INTEGER)
SELECT COUNT(laps) FROM table_name_32 WHERE driver = "antônio pizzonia"
How many laps did antônio pizzonia do?
CREATE TABLE table_name_32 (laps VARCHAR, driver VARCHAR)
SELECT week FROM table_name_37 WHERE date = "september 5, 1993"
What was the Week on September 5, 1993?
CREATE TABLE table_name_37 (week VARCHAR, date VARCHAR)
SELECT COUNT(points) FROM table_name_75 WHERE against = 753 AND points_diff > -114
I want the total number of points for against of 753 and points diff more than -114
CREATE TABLE table_name_75 (points VARCHAR, against VARCHAR, points_diff VARCHAR)
SELECT COUNT(land___sqmi__) FROM table_18600760_1 WHERE township = "Ada"
Name the land for ada
CREATE TABLE table_18600760_1 (land___sqmi__ VARCHAR, township VARCHAR)
SELECT written_by FROM table_15938543_1 WHERE directed_by = "Dennie Gordon"
Who wrote the episode that was directed by Dennie Gordon
CREATE TABLE table_15938543_1 (written_by VARCHAR, directed_by VARCHAR)
SELECT T1.organisation_type, T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1
What is the organisation type and id of the organisation which has the most number of research staff?
CREATE TABLE Research_Staff (employer_organisation_id VARCHAR); CREATE TABLE Organisations (organisation_type VARCHAR, organisation_id VARCHAR)
SELECT name FROM table_name_91 WHERE home_town = "charlotte, nc"
What is the Name of the Player from Charlotte, NC?
CREATE TABLE table_name_91 (name VARCHAR, home_town VARCHAR)
SELECT MIN(no_in_series) FROM table_2468961_2 WHERE original_air_date = "February 28, 1992"
What episode number in the series originally aired on February 28, 1992?
CREATE TABLE table_2468961_2 (no_in_series INTEGER, original_air_date VARCHAR)
SELECT region FROM table_name_70 WHERE date = "2002" AND catalog = "dos 195"
What region has a 2002 date, and a Catalog dos 195?
CREATE TABLE table_name_70 (region VARCHAR, date VARCHAR, catalog VARCHAR)
SELECT score FROM table_name_46 WHERE year = "1929"
What is the score in 1929?
CREATE TABLE table_name_46 (score VARCHAR, year VARCHAR)
SELECT date_of_vacancy FROM table_17275810_7 WHERE replaced_by = "Fabio Brini"
Name the date of vacancy for fabio brini
CREATE TABLE table_17275810_7 (date_of_vacancy VARCHAR, replaced_by VARCHAR)
SELECT stage FROM table_name_67 WHERE points_classification = "danilo di luca" AND mountains_classification = "josé rujano" AND general_classification = "danilo di luca"
What is the Stage when the points classification is Danilo Di Luca, Mountains classification is José Rujano, and general classification is Danilo Di Luca?
CREATE TABLE table_name_67 (stage VARCHAR, general_classification VARCHAR, points_classification VARCHAR, mountains_classification VARCHAR)
SELECT tail_number FROM table_229917_2 WHERE brief_description = "Crashed"
What's the tail number of the airplane involved in the accident described as crashed?
CREATE TABLE table_229917_2 (tail_number VARCHAR, brief_description VARCHAR)
SELECT rank FROM table_name_86 WHERE rider = "tom silver"
What was Tom Silver's rank?
CREATE TABLE table_name_86 (rank VARCHAR, rider VARCHAR)
SELECT ihsaa_class FROM table_name_64 WHERE year_joined < 2012 AND mascot = "panthers"
Which ISHAA school joined in 2012 and has a mascot of the panthers?
CREATE TABLE table_name_64 (ihsaa_class VARCHAR, year_joined VARCHAR, mascot VARCHAR)
SELECT home_team AS score FROM table_name_97 WHERE away_team = "geelong"
When the away team was Geelong, what was the home team score?
CREATE TABLE table_name_97 (home_team VARCHAR, away_team VARCHAR)
SELECT secondary_military_speciality FROM table_name_21 WHERE real_name = "gareth morgan"
What is Gareth Morgan's Secondary Military Specialty?
CREATE TABLE table_name_21 (secondary_military_speciality VARCHAR, real_name VARCHAR)
SELECT country FROM table_name_33 WHERE base = "athens" AND company = "attis theatre"
What is the country of the play based in Athens at the Attis Theatre company?
CREATE TABLE table_name_33 (country VARCHAR, base VARCHAR, company VARCHAR)
SELECT MIN(electorate) FROM table_name_45 WHERE quota = "78,076" AND candidates < 13
What is the smallest electorate with 78,076 quota and less than 13 candidates?
CREATE TABLE table_name_45 (electorate INTEGER, quota VARCHAR, candidates VARCHAR)
SELECT nebraska FROM table_name_25 WHERE year = "2004"
Which Nebraska has 2004 year?
CREATE TABLE table_name_25 (nebraska VARCHAR, year VARCHAR)
SELECT MIN(attendance) FROM table_name_7 WHERE date = "november 29, 1959"
Date of november 29, 1959 had what lowest attendance?
CREATE TABLE table_name_7 (attendance INTEGER, date VARCHAR)
SELECT MIN(population__2011_) FROM table_1610301_1 WHERE district = "Prakasam"
What was the minimum population in 2011 of the district of Prakasam?
CREATE TABLE table_1610301_1 (population__2011_ INTEGER, district VARCHAR)
SELECT category FROM table_name_15 WHERE year = "2013"
Name the category for 2013
CREATE TABLE table_name_15 (category VARCHAR, year VARCHAR)
SELECT SUM(gold) FROM table_name_19 WHERE rank = "19"
What is the number of gold for the country ranked 19?
CREATE TABLE table_name_19 (gold INTEGER, rank VARCHAR)
SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines
Which cmi cross reference id is not related to any parking taxes?
CREATE TABLE parking_fines (cmi_cross_ref_id VARCHAR); CREATE TABLE cmi_cross_references (cmi_cross_ref_id VARCHAR)
SELECT men’s_nickname FROM table_10577579_3 WHERE women’s_nickname = "Lady Wildcats"
What is the men's nickname at the school that has the lady wildcats women's nickname?
CREATE TABLE table_10577579_3 (men’s_nickname VARCHAR, women’s_nickname VARCHAR)
SELECT tries_against FROM table_name_1 WHERE played = "22" AND points_against = "784"
WHAT IS THE TRIES AGAINST WITH PLAYED 22, POINTS AGAINST 784?
CREATE TABLE table_name_1 (tries_against VARCHAR, played VARCHAR, points_against VARCHAR)
SELECT COUNT(position) FROM table_21321804_1 WHERE college = "Utah"
How many total positions are there for utah college?
CREATE TABLE table_21321804_1 (position VARCHAR, college VARCHAR)
SELECT tie_no FROM table_name_27 WHERE date = "17/11/1990" AND score = "5–0" AND away_team = "carlisle united"
What is the Tie no of the Carlisle United Away game on 17/11/1990 with a Score of 5–0?
CREATE TABLE table_name_27 (tie_no VARCHAR, away_team VARCHAR, date VARCHAR, score VARCHAR)
SELECT seats_won FROM table_20728138_1 WHERE seats_contested = 48
How many seats were won, when the seats contested was 48?
CREATE TABLE table_20728138_1 (seats_won VARCHAR, seats_contested VARCHAR)
SELECT MIN(us_cham_rank) FROM table_name_94 WHERE next_highest_spender = "national assn of realtors" AND year < 2012
Which US Cham Rank is the lowest one that has a Next Highest Spender of national assn of realtors, and a Year smaller than 2012?
CREATE TABLE table_name_94 (us_cham_rank INTEGER, next_highest_spender VARCHAR, year VARCHAR)