answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT base FROM table_name_67 WHERE play = "thesmophoriazusae"
what is the base when the play is thesmophoriazusae?
CREATE TABLE table_name_67 (base VARCHAR, play VARCHAR)
SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING COUNT(*) > 3
Find the accreditation level that more than 3 phones use.
CREATE TABLE phone (Accreditation_level VARCHAR)
SELECT AVG(laps) FROM table_name_50 WHERE driver = "piero taruffi"
What is the average number of laps for the driver Piero Taruffi?
CREATE TABLE table_name_50 (laps INTEGER, driver VARCHAR)
SELECT MAX(games_played) FROM table_22824199_1 WHERE three_pointers = 5
Of the players who scored 5 three pointers, what is the highest number of games played?
CREATE TABLE table_22824199_1 (games_played INTEGER, three_pointers VARCHAR)
SELECT driver FROM table_name_65 WHERE entrant = "scuderia ambrosiana"
Who is the drive for an Entrant of Scuderia Ambrosiana?
CREATE TABLE table_name_65 (driver VARCHAR, entrant VARCHAR)
SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = "Open"
What is the description of the claim status "Open"?
CREATE TABLE claims_processing_stages (claim_status_description VARCHAR, claim_status_name VARCHAR)
SELECT COUNT(std_saps) FROM table_name_55 WHERE opt_saps = "0-11"
What is the total number of Std SAPs with 0-11 Opt SAPS?
CREATE TABLE table_name_55 (std_saps VARCHAR, opt_saps VARCHAR)
SELECT outcome FROM table_name_11 WHERE event = "wd" AND year = "1983"
What was the Outcome in 1983 of the WD Event?
CREATE TABLE table_name_11 (outcome VARCHAR, event VARCHAR, year VARCHAR)
SELECT COUNT(artist) FROM table_21378339_5 WHERE panel_points = 5
Name the number of artists for panel points being 5
CREATE TABLE table_21378339_5 (artist VARCHAR, panel_points VARCHAR)
SELECT opponent FROM table_name_15 WHERE date = "august 31, 1997"
What was the Opponent on August 31, 1997?
CREATE TABLE table_name_15 (opponent VARCHAR, date VARCHAR)
SELECT geust FROM table_name_45 WHERE result = "0:9"
What is Geust, when Result is 0:9?
CREATE TABLE table_name_45 (geust VARCHAR, result VARCHAR)
SELECT partner FROM table_name_15 WHERE opponents_in_the_final = "anamika bhargava sylvia krywacz"
Tell me the partner for opponents of anamika bhargava sylvia krywacz
CREATE TABLE table_name_15 (partner VARCHAR, opponents_in_the_final VARCHAR)
SELECT season FROM table_name_18 WHERE agg = "4–1" AND opponent = "rapid wien"
Which Season has an Agg of 4–1, and an Opponent of rapid wien?
CREATE TABLE table_name_18 (season VARCHAR, agg VARCHAR, opponent VARCHAR)
SELECT music_label FROM table_name_36 WHERE catalogue_number = "enocd 10"
What is the music label with the catalogue number enocd 10?
CREATE TABLE table_name_36 (music_label VARCHAR, catalogue_number VARCHAR)
SELECT AVG(laps) FROM table_name_5 WHERE time = "+23.002" AND grid < 11
Which Laps have a Time of +23.002, and a Grid smaller than 11?
CREATE TABLE table_name_5 (laps INTEGER, time VARCHAR, grid VARCHAR)
SELECT opponent FROM table_name_64 WHERE round = "second round"
Who was the opponent during the second round?
CREATE TABLE table_name_64 (opponent VARCHAR, round VARCHAR)
SELECT title FROM table_name_91 WHERE attendance = "n/a" AND runner_up = "waseda" AND season = "1995-6 details"
What was the title for the game with an attendance of n/a with the runner-up being Waseda, and a season of 1995-6 details?
CREATE TABLE table_name_91 (title VARCHAR, season VARCHAR, attendance VARCHAR, runner_up VARCHAR)
SELECT candidates FROM table_1342370_41 WHERE district = "Tennessee 9"
Who were the candidates in the election in the Tennessee 9 district?
CREATE TABLE table_1342370_41 (candidates VARCHAR, district VARCHAR)
SELECT years FROM table_name_97 WHERE model = "250"
What are the years for the 250 model?
CREATE TABLE table_name_97 (years VARCHAR, model VARCHAR)
SELECT gold_coast FROM table_name_58 WHERE auckland = "cancelled" AND adelaide = "yes"
What Gold Coast has Auckland cancelled, and Adelaide yes?
CREATE TABLE table_name_58 (gold_coast VARCHAR, auckland VARCHAR, adelaide VARCHAR)
SELECT MAX(lane) FROM table_name_48 WHERE name = "johan wissman" AND react < 0.242
what is the highest lane number for johan wissman when the react is less than 0.242?
CREATE TABLE table_name_48 (lane INTEGER, name VARCHAR, react VARCHAR)
SELECT MAX(total) FROM table_name_86 WHERE silver < 40 AND rank = 3
How many total medals does rank 3 with less than 40 silver medals?
CREATE TABLE table_name_86 (total INTEGER, silver VARCHAR, rank VARCHAR)
SELECT coefficient FROM table_30083499_1 WHERE tournament = "2010 Clausura"
the 2010 clausura tournament?
CREATE TABLE table_30083499_1 (coefficient VARCHAR, tournament VARCHAR)
SELECT lost FROM table_name_20 WHERE tied = "0" AND drawn = "47"
Tell me the lost with tie of 0 and drawn of 47
CREATE TABLE table_name_20 (lost VARCHAR, tied VARCHAR, drawn VARCHAR)
SELECT catalogue FROM table_name_82 WHERE time = "2:10"
What catalogue has a length of 2:10?
CREATE TABLE table_name_82 (catalogue VARCHAR, time VARCHAR)
SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id WHERE Circulation_History.document_id = 1
List all employees in the circulation history of the document with id 1. List the employee's name.
CREATE TABLE Circulation_History (Id VARCHAR); CREATE TABLE Employees (Id VARCHAR)
SELECT points FROM table_26124171_1 WHERE team = "Pole Services"
How many points were scored on pole services?
CREATE TABLE table_26124171_1 (points VARCHAR, team VARCHAR)
SELECT ipsos_3_14_09 FROM table_name_33 WHERE ifop_11_12_08 = "7%" AND opinionway_4_17_09 = "5%"
Name the lpsos 3/14/09 for opinionway of 4/17/09 of 5% and lfof 11/12/08 of 7%
CREATE TABLE table_name_33 (ipsos_3_14_09 VARCHAR, ifop_11_12_08 VARCHAR, opinionway_4_17_09 VARCHAR)
SELECT award FROM table_name_62 WHERE year < 2005
What award did they win before 2005?
CREATE TABLE table_name_62 (award VARCHAR, year INTEGER)
SELECT COUNT(builder) FROM table_22481967_1 WHERE withdrawn = "1951" AND number = "42"
List the number of builders where the withdrawn is 1951 and number is 42.
CREATE TABLE table_22481967_1 (builder VARCHAR, withdrawn VARCHAR, number VARCHAR)
SELECT maximum_ceiling_temperature FROM table_1538516_1 WHERE temperature_classification = "Intermediate"
Name the most ceiling temperature for intermediate
CREATE TABLE table_1538516_1 (maximum_ceiling_temperature VARCHAR, temperature_classification VARCHAR)
SELECT make FROM table_name_24 WHERE drivers = "hisashi wada"
What is the make of the vehicle for driver Hisashi Wada?
CREATE TABLE table_name_24 (make VARCHAR, drivers VARCHAR)
SELECT title FROM table_27823058_1 WHERE written_by = "Katie Palmer"
Which episodes did Katie Palmer write?
CREATE TABLE table_27823058_1 (title VARCHAR, written_by VARCHAR)
SELECT type FROM table_name_62 WHERE location = "nova scotia" AND disaster = "rms atlantic"
What type of disaster is rms atlantic categorized in that was located in Nova Scotia?
CREATE TABLE table_name_62 (type VARCHAR, location VARCHAR, disaster VARCHAR)
SELECT score_in_final FROM table_23197088_4 WHERE championship = "Moscow"
such as are entire the rating of closing where championship is moscow
CREATE TABLE table_23197088_4 (score_in_final VARCHAR, championship VARCHAR)
SELECT date FROM table_name_92 WHERE potts__i_ = "9%"
On which date did Potts (I) poll at 9%?
CREATE TABLE table_name_92 (date VARCHAR, potts__i_ VARCHAR)
SELECT SUM(capacity__mw_) FROM table_name_72 WHERE state_province = "gansu"
What is the total capacity (MW) of the windfarm located in the state/province of Gansu?
CREATE TABLE table_name_72 (capacity__mw_ INTEGER, state_province 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 away_team AS score FROM table_name_58 WHERE venue = "corio oval"
What did the away team score at corio oval?
CREATE TABLE table_name_58 (away_team VARCHAR, venue VARCHAR)
SELECT MIN(population__2011_) FROM table_2562572_11
What is the smallest population listed?
CREATE TABLE table_2562572_11 (population__2011_ INTEGER)
SELECT digital FROM table_name_91 WHERE tuner = "thomson dtt75105"
Tell me the digital for tuner of thomson dtt75105
CREATE TABLE table_name_91 (digital VARCHAR, tuner VARCHAR)
SELECT 1 AS st_round FROM table_name_73 WHERE team_2 = "usl dunkerque (d2)"
what is the 1st round when team 2 is usl dunkerque (d2)?
CREATE TABLE table_name_73 (team_2 VARCHAR)
SELECT location FROM table_name_69 WHERE court_surface = "hard" AND country = "china"
Which location was in China, and played on a hard court?
CREATE TABLE table_name_69 (location VARCHAR, court_surface VARCHAR, country VARCHAR)
SELECT club FROM table_18018248_2 WHERE draws = 9
Which clubs had draws of 9?
CREATE TABLE table_18018248_2 (club VARCHAR, draws VARCHAR)
SELECT SUM(purse__) AS $__ FROM table_name_5 WHERE tournament = "royal caribbean golf classic"
What is the purse total for the royal caribbean golf classic?
CREATE TABLE table_name_5 (purse__ INTEGER, tournament VARCHAR)
SELECT attendance FROM table_name_60 WHERE points > 90
Which Attendance has more than 90 points?
CREATE TABLE table_name_60 (attendance VARCHAR, points INTEGER)
SELECT four FROM table_name_23 WHERE date = "6 march 1801"
Name the four for 6 march 1801
CREATE TABLE table_name_23 (four VARCHAR, date VARCHAR)
SELECT date FROM table_name_54 WHERE record = "66-38"
What was the date of the game when the record was 66-38?
CREATE TABLE table_name_54 (date VARCHAR, record VARCHAR)
SELECT driver FROM table_name_38 WHERE grid > 3 AND time_retired = "+62.6 secs"
Which driver has a grid bigger than 3 and a time of +62.6 secs?
CREATE TABLE table_name_38 (driver VARCHAR, grid VARCHAR, time_retired VARCHAR)
SELECT to_par FROM table_name_33 WHERE player = "scott hoch"
What is Scott Hoch's to par?
CREATE TABLE table_name_33 (to_par VARCHAR, player VARCHAR)
SELECT licence_award_date FROM table_10712301_5 WHERE region = "North East England"
What is the license award date for North East England?
CREATE TABLE table_10712301_5 (licence_award_date VARCHAR, region VARCHAR)
SELECT nominee FROM table_name_81 WHERE award = "drama desk award" AND result = "won" AND category = "outstanding choreography"
Which nominee won the Drama Desk Award for outstanding choreography?
CREATE TABLE table_name_81 (nominee VARCHAR, category VARCHAR, award VARCHAR, result VARCHAR)
SELECT grade FROM table_name_54 WHERE chin_up__reps_ = "9-10"
Which grade did the chin-up (reps) 9-10 receive?
CREATE TABLE table_name_54 (grade VARCHAR, chin_up__reps_ VARCHAR)
SELECT MAX(capacity) FROM table_name_80 WHERE stadium = "stadio marcello torre"
What is the highest capacity that has stadio marcello torre as the stadium?
CREATE TABLE table_name_80 (capacity INTEGER, stadium VARCHAR)
SELECT laps FROM table_name_51 WHERE rank = "14"
How many laps did Dick Rathmann complete when he ranked 14?
CREATE TABLE table_name_51 (laps VARCHAR, rank VARCHAR)
SELECT opponents_in_the_final FROM table_name_4 WHERE date = "june 23, 2003"
Who were the opponents of the final on June 23, 2003?
CREATE TABLE table_name_4 (opponents_in_the_final VARCHAR, date VARCHAR)
SELECT country FROM table_name_61 WHERE network = "nelonen"
Which Country has a Network of nelonen?
CREATE TABLE table_name_61 (country VARCHAR, network VARCHAR)
SELECT ground FROM table_name_17 WHERE round = "33"
Which ground's round was 33?
CREATE TABLE table_name_17 (ground VARCHAR, round VARCHAR)
SELECT opponent FROM table_name_19 WHERE date = "april 28"
Which Opponent is on april 28?
CREATE TABLE table_name_19 (opponent VARCHAR, date VARCHAR)
SELECT region_4__australia_ FROM table_240936_2 WHERE region_1__us_ = "January 16, 2007"
What is the region 4 (Aus) date associated with a region 1 (US) date of January 16, 2007?
CREATE TABLE table_240936_2 (region_4__australia_ VARCHAR, region_1__us_ VARCHAR)
SELECT stage FROM table_28853064_15 WHERE team_classification = "EPM-UNE" AND mountains_classification = "Oscar Solis" AND winner = "Jaime Vergara"
In what stage did Jaime Vergara won, Team Classification was given to EPM-Une and Mountain Classification winner was Oscar Solis?
CREATE TABLE table_28853064_15 (stage VARCHAR, winner VARCHAR, team_classification VARCHAR, mountains_classification VARCHAR)
SELECT COUNT(attendance) FROM table_name_43 WHERE date = "october 20, 1946" AND week < 4
Name the total number of attendance for october 20, 1946 with week less than 4
CREATE TABLE table_name_43 (attendance VARCHAR, date VARCHAR, week VARCHAR)
SELECT AVG(age) FROM Person
What is the average age for all person?
CREATE TABLE Person (age INTEGER)
SELECT location FROM table_name_34 WHERE record = "50-19"
Where is the location with a record of 50-19?
CREATE TABLE table_name_34 (location VARCHAR, record VARCHAR)
SELECT SUM(year) FROM table_name_43 WHERE engine_s_ = "brm p202 3.0 v12 brm p200 3.0 v12"
Name the sum of year for engine of brm p202 3.0 v12 brm p200 3.0 v12
CREATE TABLE table_name_43 (year INTEGER, engine_s_ VARCHAR)
SELECT t1.name FROM train AS t1 JOIN route AS t2 ON t1.id = t2.train_id GROUP BY t2.train_id ORDER BY COUNT(*) DESC LIMIT 1
Find the name of the train whose route runs through greatest number of stations.
CREATE TABLE route (train_id VARCHAR); CREATE TABLE train (name VARCHAR, id VARCHAR)
SELECT YEAR, book_title, publisher FROM book_club ORDER BY YEAR DESC
Show the years, book titles, and publishers for all books, in descending order by year.
CREATE TABLE book_club (YEAR VARCHAR, book_title VARCHAR, publisher VARCHAR)
SELECT school FROM table_name_68 WHERE round = 8
what is the school for round 8?
CREATE TABLE table_name_68 (school VARCHAR, round VARCHAR)
SELECT date FROM table_29127804_3 WHERE location = "Bangalore , Karnataka, India"
what is the date of the game played in the bangalore , karnataka, india location
CREATE TABLE table_29127804_3 (date VARCHAR, location VARCHAR)
SELECT MAX(debut_in_europe) FROM table_name_57 WHERE player = "henrik larsson" AND games < 108
When was the latest debut in Europe for Henrik Larsson, with less than 108 games?
CREATE TABLE table_name_57 (debut_in_europe INTEGER, player VARCHAR, games VARCHAR)
SELECT english_name FROM table_name_54 WHERE color = "green"
Which English name has a Color of green?
CREATE TABLE table_name_54 (english_name VARCHAR, color VARCHAR)
SELECT AVG(events) FROM table_name_84 WHERE top_25 < 0
What is the event average for a top-25 smaller than 0?
CREATE TABLE table_name_84 (events INTEGER, top_25 INTEGER)
SELECT country FROM table_name_27 WHERE series_premiere = "unknown" AND tv_network_s_ = "mbc action"
What country has a series premier of unknown and mbc action as their TV network?
CREATE TABLE table_name_27 (country VARCHAR, series_premiere VARCHAR, tv_network_s_ VARCHAR)
SELECT 2004 FROM table_name_41 WHERE tournament = "french open"
Which 2004 has a Tournament of french open?
CREATE TABLE table_name_41 (tournament VARCHAR)
SELECT city FROM addresses WHERE zip_postcode = 255
Find the city with post code 255.
CREATE TABLE addresses (city VARCHAR, zip_postcode VARCHAR)
SELECT MAX(total) FROM table_name_14 WHERE to_par > 16
Name the most total with to par more than 16
CREATE TABLE table_name_14 (total INTEGER, to_par INTEGER)
SELECT round FROM table_name_51 WHERE surface = "hard" AND opponent = "jelena simic"
What's Round has a Surface of hard and Opponent of Jelena Simic?
CREATE TABLE table_name_51 (round VARCHAR, surface VARCHAR, opponent VARCHAR)
SELECT region FROM table_name_52 WHERE home_venue = "giuseppe sivori"
What region has giuseppe sivori as a home venue?
CREATE TABLE table_name_52 (region VARCHAR, home_venue VARCHAR)
SELECT player_api_id FROM Player WHERE height >= 180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating > 85
List all of the player ids with a height of at least 180cm and an overall rating higher than 85.
CREATE TABLE Player_Attributes (player_api_id VARCHAR, height VARCHAR, overall_rating INTEGER); CREATE TABLE Player (player_api_id VARCHAR, height VARCHAR, overall_rating INTEGER)
SELECT COUNT(rank) FROM table_name_54 WHERE team = "348cc petty manx"
Name the total number of rank for 348cc petty manx
CREATE TABLE table_name_54 (rank VARCHAR, team VARCHAR)
SELECT player FROM table_11545282_19 WHERE no = 6
Which player wears the number 6?
CREATE TABLE table_11545282_19 (player VARCHAR, no VARCHAR)
SELECT nickname FROM table_16432543_1 WHERE established = 1773
Nickname of the school established in 1773
CREATE TABLE table_16432543_1 (nickname VARCHAR, established VARCHAR)
SELECT COUNT(college_junior_club_team) FROM table_1473672_4 WHERE nhl_team = "Philadelphia Flyers"
Name the number of teams for college/junior club for philadelphia flyers
CREATE TABLE table_1473672_4 (college_junior_club_team VARCHAR, nhl_team VARCHAR)
SELECT opponent FROM table_name_74 WHERE attendance = "68,264"
Tell me the opponent for attendance of 68,264
CREATE TABLE table_name_74 (opponent VARCHAR, attendance VARCHAR)
SELECT MIN(draw) FROM table_name_22 WHERE points > 43 AND rank = "6th"
What is the lowest draw number for the song ranked 6th with more than 43 points?
CREATE TABLE table_name_22 (draw INTEGER, points VARCHAR, rank VARCHAR)
SELECT release_date FROM table_name_92 WHERE director = "tom palmer" AND production_num > 5956
Which Release date has a Director of tom palmer, and a Production Num larger than 5956?
CREATE TABLE table_name_92 (release_date VARCHAR, director VARCHAR, production_num VARCHAR)
SELECT others_percentage FROM table_1733457_1 WHERE county = "Johnson"
Name the others % for johnson
CREATE TABLE table_1733457_1 (others_percentage VARCHAR, county VARCHAR)
SELECT MIN(free) FROM table_name_87 WHERE athlete = "apolline dreyfuss & lila meesseman-bakir" AND total > 90.333
What is the free of Apolline Dreyfuss & Lila Meesseman-Bakir, when the total was larger than 90.333?
CREATE TABLE table_name_87 (free INTEGER, athlete VARCHAR, total VARCHAR)
SELECT category FROM table_name_60 WHERE year < 2009 AND role_episode = "libby goldstein and junie lowry-johnson"
Which Category was from before 2009 with a Role/Episode of Libby Goldstein and Junie Lowry-Johnson?
CREATE TABLE table_name_60 (category VARCHAR, year VARCHAR, role_episode VARCHAR)
SELECT SUM(rank) FROM table_name_45 WHERE nation = "west germany" AND bronze > 0
What is the sum of a rank whose nation is West Germany and has bronze larger than 0?
CREATE TABLE table_name_45 (rank INTEGER, nation VARCHAR, bronze VARCHAR)
SELECT SUM(year) FROM table_name_25 WHERE film = "klondike annie"
What is the Year of the Film Klondike Annie?
CREATE TABLE table_name_25 (year INTEGER, film VARCHAR)
SELECT lost FROM table_name_24 WHERE points_difference = "-25"
What is the number of losses for the team with a points difference of -25?
CREATE TABLE table_name_24 (lost VARCHAR, points_difference VARCHAR)
SELECT config_core_1 FROM table_25005714_3 WHERE code_name = "Redwood" AND core_clock___mhz__ = "500"
What is the value for congi core 1 if the code name is Redwood and core clock(mhz) is 500?
CREATE TABLE table_25005714_3 (config_core_1 VARCHAR, code_name VARCHAR, core_clock___mhz__ VARCHAR)
SELECT AVG(year) FROM table_name_74 WHERE engine = "cosworth ca2006 2.4 v8 4 series"
What year was the cosworth ca2006 2.4 v8 4 series used?
CREATE TABLE table_name_74 (year INTEGER, engine VARCHAR)
SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) DESC LIMIT 1
What is the name of the customer that has purchased the most items?
CREATE TABLE order_items (order_id VARCHAR, order_quantity INTEGER); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)
SELECT MIN(obama_number) FROM table_20799587_1 WHERE mccain_percentage = "72.75%"
How many people voted for Obama in the county where McCain got 72.75% of the votes?
CREATE TABLE table_20799587_1 (obama_number INTEGER, mccain_percentage VARCHAR)
SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = "Democratic"
Return all the committees that have delegates from Democratic party.
CREATE TABLE election (Committee VARCHAR, Party VARCHAR); CREATE TABLE party (Party_ID VARCHAR, Party VARCHAR)
SELECT city FROM table_name_93 WHERE stadium = "estádio cidade de barcelos"
What city is the Stadium estádio cidade de barcelos in?
CREATE TABLE table_name_93 (city VARCHAR, stadium VARCHAR)
SELECT baltimore_group FROM table_name_85 WHERE envelopment = "non-enveloped" AND family = "papillomaviridae"
Which Baltimore group is non-enveloped and is of the papillomaviridae family?
CREATE TABLE table_name_85 (baltimore_group VARCHAR, envelopment VARCHAR, family VARCHAR)
SELECT cores FROM table_name_28 WHERE release_price___usd__ = "$426"
How many cores does the processor with a release price of $426 have?
CREATE TABLE table_name_28 (cores VARCHAR, release_price___usd__ VARCHAR)