answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT MIN(laps) FROM table_name_46 WHERE time_retired = "+2 laps" AND grid = 20
Tell me the lowest Laps with a time/retired of +2 Laps and Grid of 20
CREATE TABLE table_name_46 (laps INTEGER, time_retired VARCHAR, grid VARCHAR)
SELECT conference_finals FROM table_name_32 WHERE seed = "† denotes division championship"
Which Conference Finals has a Seed of † denotes division championship?
CREATE TABLE table_name_32 (conference_finals VARCHAR, seed VARCHAR)
SELECT MAX(draw) FROM table_name_77 WHERE rank = 14 AND televotes > 908
Name the highest Draw which has a Rank of 14, and a Televotes larger than 908?
CREATE TABLE table_name_77 (draw INTEGER, rank VARCHAR, televotes VARCHAR)
SELECT label FROM table_name_22 WHERE catalog = "rtradcd491" AND date = "september 20, 2008"
What is the Label of the September 20, 2008 release with Catalog number RTRADCD491?
CREATE TABLE table_name_22 (label VARCHAR, catalog VARCHAR, date VARCHAR)
SELECT outcome FROM table_name_68 WHERE tournament = "lugano , switzerland wta virginia slims" AND opponent_in_the_final = "bonnie gadusek"
What was the outcome of the Tournament of lugano , switzerland wta virginia slims, against bonnie gadusek?
CREATE TABLE table_name_68 (outcome VARCHAR, tournament VARCHAR, opponent_in_the_final VARCHAR)
SELECT "inventor" FROM table_name_2 WHERE habit = "spur" AND pattern = "stripe" AND mutated_from = "redsport type 2"
Who's the inventor when it was mutated from Redsport Type 2, has a stripe pattern and a spur habit?
CREATE TABLE table_name_2 (mutated_from VARCHAR, habit VARCHAR, pattern VARCHAR)
SELECT score FROM table_17344582_11 WHERE high_assists = "B. Shaw (5)"
List the all the scores where the high assis is b. shaw (5)
CREATE TABLE table_17344582_11 (score VARCHAR, high_assists VARCHAR)
SELECT english_word FROM table_28136_15 WHERE ukrainian = "Дякую (diakuju)"
How do you say the ukrainian word дякую (diakuju) in English?
CREATE TABLE table_28136_15 (english_word VARCHAR, ukrainian VARCHAR)
SELECT AVG(goals_for) FROM table_name_75 WHERE games_played > 8
What is the average number of goals for games played that total more than 8?
CREATE TABLE table_name_75 (goals_for INTEGER, games_played INTEGER)
SELECT final_position___round FROM table_name_88 WHERE competition = "uefa cup"
What is the final position/round of the UEFA cup?
CREATE TABLE table_name_88 (final_position___round VARCHAR, competition VARCHAR)
SELECT platform_s_ FROM table_name_80 WHERE genre = "rpg"
What's the platform of the genre RPG?
CREATE TABLE table_name_80 (platform_s_ VARCHAR, genre VARCHAR)
SELECT finish FROM table_name_89 WHERE to_par = "+10"
Which Finish had a To par of +10?
CREATE TABLE table_name_89 (finish VARCHAR, to_par VARCHAR)
SELECT manufacturer FROM table_name_68 WHERE type = "2-6-0"
Which manucfaturer's type was 2-6-0?
CREATE TABLE table_name_68 (manufacturer VARCHAR, type VARCHAR)
SELECT high_rebounds FROM table_27700375_11 WHERE location_attendance = "Wells Fargo Center 16,695"
Name the high rebounds for wells fargo center 16,695
CREATE TABLE table_27700375_11 (high_rebounds VARCHAR, location_attendance VARCHAR)
SELECT MAX(long) FROM table_name_40 WHERE name = "thomas clayton" AND gain < 71
When Thomas Clayton had a gain less than 71, what was the highest long value?
CREATE TABLE table_name_40 (long INTEGER, name VARCHAR, gain VARCHAR)
SELECT MIN(league) FROM table_name_42 WHERE total < 284 AND name = "sandro mazzola"
Which league has total smaller than 284, with Sandro Mazzola league?
CREATE TABLE table_name_42 (league INTEGER, total VARCHAR, name VARCHAR)
SELECT floors FROM table_name_89 WHERE location = "tower hill"
Which Floors has a Location of tower hill?
CREATE TABLE table_name_89 (floors VARCHAR, location VARCHAR)
SELECT MAX(silver) FROM table_name_63 WHERE gold < 0
What is the largest silver with less than 0 gold?
CREATE TABLE table_name_63 (silver INTEGER, gold INTEGER)
SELECT score FROM table_name_54 WHERE visitor = "magic" AND home = "clippers"
What was the score when there was a visitor of Magic and at home with the Clippers?
CREATE TABLE table_name_54 (score VARCHAR, visitor VARCHAR, home VARCHAR)
SELECT StuID FROM Has_allergy GROUP BY StuID HAVING COUNT(*) >= 2
Show all student IDs who have at least two allergies.
CREATE TABLE Has_allergy (StuID VARCHAR)
SELECT away_team FROM table_name_42 WHERE home_team = "newcastle united"
What is the Away team with Newcastle United as the Home team?
CREATE TABLE table_name_42 (away_team VARCHAR, home_team VARCHAR)
SELECT student_id FROM student_course_attendance
List the id of students who attended some courses?
CREATE TABLE student_course_attendance (student_id VARCHAR)
SELECT AVG(crowd) FROM table_name_17 WHERE away_team = "north melbourne"
What was the Average crowd when the away team was north melbourne?
CREATE TABLE table_name_17 (crowd INTEGER, away_team VARCHAR)
SELECT MAX(top_5) FROM table_2181798_1 WHERE avg_finish = "27.6"
Name the max top 5 for avg finish being 27.6
CREATE TABLE table_2181798_1 (top_5 INTEGER, avg_finish VARCHAR)
SELECT indication FROM table_name_50 WHERE status = "phase 2b"
What did the phase 2b status target?
CREATE TABLE table_name_50 (indication VARCHAR, status VARCHAR)
SELECT stage FROM table_22713796_14 WHERE mountains_classification = "no award"
Name the stage for no award
CREATE TABLE table_22713796_14 (stage VARCHAR, mountains_classification VARCHAR)
SELECT year FROM table_name_66 WHERE laps > 27 AND qual = "144.683"
Which Year has a Qual of 144.683 and Lap larger than 27?
CREATE TABLE table_name_66 (year VARCHAR, laps VARCHAR, qual VARCHAR)
SELECT captain FROM table_name_28 WHERE coach = "giles white"
Who is the captain of the team coached by Giles White?
CREATE TABLE table_name_28 (captain VARCHAR, coach VARCHAR)
SELECT mountains_classification FROM table_27112708_2 WHERE stage = 3
Which mountains classification is listed under stage 3?
CREATE TABLE table_27112708_2 (mountains_classification VARCHAR, stage VARCHAR)
SELECT competition FROM table_name_62 WHERE venue = "away" AND man_of_the_match = "n/a"
For what competition was the venue away the n/a the man of the match?
CREATE TABLE table_name_62 (competition VARCHAR, venue VARCHAR, man_of_the_match VARCHAR)
SELECT competition FROM table_name_58 WHERE date = "september 10, 2005"
Which competition was held on September 10, 2005?
CREATE TABLE table_name_58 (competition VARCHAR, date VARCHAR)
SELECT MIN(pick__number) FROM table_1965650_2 WHERE player = "Colin Campbell"
Name the least pick number for colin campbell
CREATE TABLE table_1965650_2 (pick__number INTEGER, player VARCHAR)
SELECT type FROM table_name_63 WHERE transfer_fee = "free" AND name = "kapetanos"
Which Type has a Transfer fee of free, and a Name of kapetanos?
CREATE TABLE table_name_63 (type VARCHAR, transfer_fee VARCHAR, name VARCHAR)
SELECT TYPE, COUNT(*) FROM operate_company GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1
What is the most common company type, and how many are there?
CREATE TABLE operate_company (TYPE VARCHAR)
SELECT constructor FROM table_name_2 WHERE year < 1937 AND driver = "achille varzi"
What was the constructor of the car that Achille Varzi drove before 1937?
CREATE TABLE table_name_2 (constructor VARCHAR, year VARCHAR, driver VARCHAR)
SELECT COUNT(DISTINCT gtype) FROM Video_games
How many video game types exist?
CREATE TABLE Video_games (gtype VARCHAR)
SELECT original_air_date FROM table_25716399_1 WHERE written_by = "Daniel Dratch"
What is the original air date for the episode written by daniel dratch?
CREATE TABLE table_25716399_1 (original_air_date VARCHAR, written_by VARCHAR)
SELECT score FROM table_name_36 WHERE record = "22–46"
What was the score of the game when the record was 22–46?
CREATE TABLE table_name_36 (score VARCHAR, record VARCHAR)
SELECT title FROM table_2468961_2 WHERE original_air_date = "October 18, 1991"
What is the name of the episode that aired originally on October 18, 1991?
CREATE TABLE table_2468961_2 (title VARCHAR, original_air_date VARCHAR)
SELECT date_of_vacancy FROM table_17115950_2 WHERE replaced_by = "Viorel Moldovan"
What was the date of vacancy when Viorel Moldovan replaced a manager?
CREATE TABLE table_17115950_2 (date_of_vacancy VARCHAR, replaced_by VARCHAR)
SELECT prize FROM table_22050544_1 WHERE elapsed_time = "10 h 10 min"
What is the prize for the elapsed time of 10 h 10 min?
CREATE TABLE table_22050544_1 (prize VARCHAR, elapsed_time VARCHAR)
SELECT minister FROM table_name_12 WHERE end_date = "31 july 2004"
Name the minister for end date of 31 july 2004
CREATE TABLE table_name_12 (minister VARCHAR, end_date VARCHAR)
SELECT presidential_majority_2000_2004 FROM table_14700336_1 WHERE presidential_majority_2012 = "Non-voting"
What was the recorded result under presidential majority 2000/2004 when the presiditial majority in 2012 was non-voting?
CREATE TABLE table_14700336_1 (presidential_majority_2000_2004 VARCHAR, presidential_majority_2012 VARCHAR)
SELECT MAX(year_signed) FROM table_name_79 WHERE reason_for_separation = "†" AND year_separated = "1997"
What is the most current year signed for separation of † and a separation year of 1997?
CREATE TABLE table_name_79 (year_signed INTEGER, reason_for_separation VARCHAR, year_separated VARCHAR)
SELECT 2012 FROM table_name_43 WHERE 2010 = "2r"
Which 2012 tournament had 2r in 2010?
CREATE TABLE table_name_43 (Id VARCHAR)
SELECT written_by FROM table_2226817_4 WHERE original_air_date = "April 9, 1989"
Name who wrote the episode that aired april 9, 1989
CREATE TABLE table_2226817_4 (written_by VARCHAR, original_air_date VARCHAR)
SELECT AVG(laps) FROM table_name_70 WHERE constructor = "brm" AND grid = 12
How many average laps did brm complete in grids larger than 12?
CREATE TABLE table_name_70 (laps INTEGER, constructor VARCHAR, grid VARCHAR)
SELECT name, Level_of_membership FROM visitor WHERE Level_of_membership > 4 ORDER BY age DESC
Find the name and membership level of the visitors whose membership level is higher than 4, and sort by their age from old to young.
CREATE TABLE visitor (name VARCHAR, Level_of_membership INTEGER, age VARCHAR)
SELECT country FROM table_name_43 WHERE score = 70 - 69 = 139
What is the country that the player with a score of 70-69=139 from?
CREATE TABLE table_name_43 (country VARCHAR, score VARCHAR)
SELECT prom__m_ FROM table_name_20 WHERE class = "hewitt" AND height__m_ = 715
What is the prom with Hewitt class and a Height (m) of 715?
CREATE TABLE table_name_20 (prom__m_ VARCHAR, class VARCHAR, height__m_ VARCHAR)
SELECT winning_driver FROM table_name_15 WHERE winning_team = "a.z.k./roc-compétition a.z.k./roc-compétition" AND date = "2 june"
Who is the winning driver of the race on 2 June with a.z.k./roc-compétition a.z.k./roc-compétition as the winning team?
CREATE TABLE table_name_15 (winning_driver VARCHAR, winning_team VARCHAR, date VARCHAR)
SELECT nationality FROM table_name_47 WHERE player = "daryn fersovich"
What nationality is Daryn Fersovich?
CREATE TABLE table_name_47 (nationality VARCHAR, player VARCHAR)
SELECT AVG(places) FROM table_name_71 WHERE nation = "united states" AND rank = 8
What is the Places amount of the United States Ranking 8?
CREATE TABLE table_name_71 (places INTEGER, nation VARCHAR, rank VARCHAR)
SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3
what are the top 3 highest support rates?
CREATE TABLE candidate (support_rate VARCHAR)
SELECT visitor FROM table_name_66 WHERE date = "december 3"
Who is the visitor on december 3?
CREATE TABLE table_name_66 (visitor VARCHAR, date VARCHAR)
SELECT opponent FROM table_name_38 WHERE attendance = "54,136"
Who was the opponent for the game played with 54,136 people in attendance?
CREATE TABLE table_name_38 (opponent VARCHAR, attendance VARCHAR)
SELECT T3.Name, T2.Date, T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Negative = T3.People_ID ORDER BY T3.Name
Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name.
CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE debate (Date VARCHAR, Venue VARCHAR, Debate_ID VARCHAR); CREATE TABLE debate_people (Debate_ID VARCHAR, Negative VARCHAR)
SELECT loss FROM table_name_56 WHERE opponent = "chinatrust whales" AND save = "miguel saladin"
What's the loss of who has a Save of Miguel Saladin and played against Chinatrust Whales?
CREATE TABLE table_name_56 (loss VARCHAR, opponent VARCHAR, save VARCHAR)
SELECT k_themistokleous FROM table_name_65 WHERE i_kasoulidis = "30.1%"
What was the percentage for K. Themistokleous when I. Kasoulidis was 30.1%?
CREATE TABLE table_name_65 (k_themistokleous VARCHAR, i_kasoulidis VARCHAR)
SELECT AVG(viewers__millions_) FROM table_name_28 WHERE episode__number < 11 AND share = "4"
What is the average number of million viewers that watched an episode before episode 11 with a share of 4?
CREATE TABLE table_name_28 (viewers__millions_ INTEGER, episode__number VARCHAR, share VARCHAR)
SELECT COUNT(episode) FROM table_15187735_10 WHERE segment_a = "s Fire Extinguisher"
Name the total number of episodes for s fire extinguisher
CREATE TABLE table_15187735_10 (episode VARCHAR, segment_a VARCHAR)
SELECT iata FROM table_name_89 WHERE city = "sapporo"
What shows for IATA for the City of sapporo?
CREATE TABLE table_name_89 (iata VARCHAR, city VARCHAR)
SELECT directed_by FROM table_28212888_2 WHERE no_in_series = 116
Who was the director of the episode with series number 116?
CREATE TABLE table_28212888_2 (directed_by VARCHAR, no_in_series VARCHAR)
SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.job = 'student'
Find the name of the person who has no student friends.
CREATE TABLE Person (name VARCHAR, job VARCHAR); CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR); CREATE TABLE person (name VARCHAR)
SELECT year FROM table_name_3 WHERE outcome = "runner-up" AND opponent = "lleyton hewitt"
What year was the match were xavier malisse was the runner-up against lleyton hewitt?
CREATE TABLE table_name_3 (year VARCHAR, outcome VARCHAR, opponent VARCHAR)
SELECT rank FROM table_name_96 WHERE final = "5:18.85"
Which rank has final with 5:18.85?
CREATE TABLE table_name_96 (rank VARCHAR, final VARCHAR)
SELECT COUNT(binibining_pilipinas_international) FROM table_1825751_4 WHERE miss_universe_philippines = "Nina Ricci Alagao"
How many winners of Binibining Pilipinas-International when Nina Ricci Alagao?
CREATE TABLE table_1825751_4 (binibining_pilipinas_international VARCHAR, miss_universe_philippines VARCHAR)
SELECT COUNT(division_five) FROM table_24575253_4 WHERE division_one = "Westcott"
When westcott is in division one how many leagues are in division 5?
CREATE TABLE table_24575253_4 (division_five VARCHAR, division_one VARCHAR)
SELECT american_labor_ticket FROM table_name_3 WHERE liberal_ticket = "henry epstein"
What is the American Labor ticket when Henry Epstein is the liberal ticket?
CREATE TABLE table_name_3 (american_labor_ticket VARCHAR, liberal_ticket VARCHAR)
SELECT AVG(laps) FROM table_name_93 WHERE constructor = "ferrari" AND time_retired = "fuel pressure"
What is the mean number of laps for the constructor Ferrari when the time/retired was fuel pressure?
CREATE TABLE table_name_93 (laps INTEGER, constructor VARCHAR, time_retired VARCHAR)
SELECT AVG(grid) FROM table_name_64 WHERE laps = 14
What Grid had 14 laps completed?
CREATE TABLE table_name_64 (grid INTEGER, laps VARCHAR)
SELECT opponents FROM table_16741821_9 WHERE against = "Slovakia"
Who are all the opponents of Slovakia?
CREATE TABLE table_16741821_9 (opponents VARCHAR, against VARCHAR)
SELECT number_of_households FROM table_name_15 WHERE median_family_income = "$60,400"
How many households have a median family income of $60,400?
CREATE TABLE table_name_15 (number_of_households VARCHAR, median_family_income VARCHAR)
SELECT engine FROM table_name_89 WHERE year = 1987
Which engine was used in 1987?
CREATE TABLE table_name_89 (engine VARCHAR, year VARCHAR)
SELECT capital FROM table_name_21 WHERE hangul = "양주"
What is the capital of the province with 양주 in Hangul?
CREATE TABLE table_name_21 (capital VARCHAR, hangul VARCHAR)
SELECT opponent FROM table_name_98 WHERE week = 13
In Week 13, who was the opponent?
CREATE TABLE table_name_98 (opponent VARCHAR, week VARCHAR)
SELECT 2011 FROM table_name_92 WHERE 2012 = "a" AND 2010 = "1r" AND 2008 = "2r"
Name the 2011 for 2012 of a and 2010 of 1r with 2008 of 2r
CREATE TABLE table_name_92 (Id VARCHAR)
SELECT rank FROM table_name_89 WHERE bronze = 1 AND nation = "lithuania"
Which Rank has a Bronze of 1, and a Nation of lithuania?
CREATE TABLE table_name_89 (rank VARCHAR, bronze VARCHAR, nation VARCHAR)
SELECT result FROM table_21350934_2 WHERE round = "QF"
What is the result of the qf round?
CREATE TABLE table_21350934_2 (result VARCHAR, round VARCHAR)
SELECT starts FROM table_19864214_3 WHERE seasons = "1977"
what is the number of starts in 1977
CREATE TABLE table_19864214_3 (starts VARCHAR, seasons VARCHAR)
SELECT laps FROM table_name_79 WHERE fin_pos = "17"
How many laps did the car do that had a final position of 17?
CREATE TABLE table_name_79 (laps VARCHAR, fin_pos VARCHAR)
SELECT party FROM table_2668420_17 WHERE result = "Re-elected" AND district = "Virginia 12"
What party was re-elected to Virginia 12?
CREATE TABLE table_2668420_17 (party VARCHAR, result VARCHAR, district VARCHAR)
SELECT COUNT(tries_for) FROM table_12828723_4 WHERE points_for = "473"
How many tries for are for 473 points for?
CREATE TABLE table_12828723_4 (tries_for VARCHAR, points_for VARCHAR)
SELECT nation FROM table_name_35 WHERE world_rank = "2" AND birth_date = "1976-12-20"
what is the nation when the world rank is 2 and the birth date is 1976-12-20?
CREATE TABLE table_name_35 (nation VARCHAR, world_rank VARCHAR, birth_date VARCHAR)
SELECT dutch FROM table_name_48 WHERE crimean_gothic = "apel"
What's the Dutch word for Apel?
CREATE TABLE table_name_48 (dutch VARCHAR, crimean_gothic VARCHAR)
SELECT fastest_lap FROM table_1132588_3 WHERE grand_prix = "European grand_prix"
What is the fastest lap for the european grand prix?
CREATE TABLE table_1132588_3 (fastest_lap VARCHAR, grand_prix VARCHAR)
SELECT SUM(grid) FROM table_name_19 WHERE time_retired = "+0.785" AND laps > 29
How much Grid has a Time/Retired of +0.785, and Laps larger than 29?
CREATE TABLE table_name_19 (grid INTEGER, time_retired VARCHAR, laps VARCHAR)
SELECT score FROM table_name_30 WHERE venue = "pro player stadium" AND winning_team = "devil rays" AND date = "june 14"
on June 14, what was the winning score by the Devil rays in pro player stadium?
CREATE TABLE table_name_30 (score VARCHAR, date VARCHAR, venue VARCHAR, winning_team VARCHAR)
SELECT guest FROM table_25691838_8 WHERE original_airdate = "August 16"
Who were the guests on the episode that first aired August 16?
CREATE TABLE table_25691838_8 (guest VARCHAR, original_airdate VARCHAR)
SELECT nationality FROM table_name_94 WHERE round = 3 AND college = "mercer"
For the draft pick from round 3 out of Mercer College what is the nationality?
CREATE TABLE table_name_94 (nationality VARCHAR, round VARCHAR, college VARCHAR)
SELECT surface FROM table_name_5 WHERE opponent_in_the_final = "daniella dominikovic"
Which Surface has an Opponent in the final of daniella dominikovic?
CREATE TABLE table_name_5 (surface VARCHAR, opponent_in_the_final VARCHAR)
SELECT COUNT(earnings___) AS $__ FROM table_name_43 WHERE events < 28 AND rank < 3
How much money did the player ranked above 3 with under 28 events earn?
CREATE TABLE table_name_43 (earnings___ VARCHAR, events VARCHAR, rank VARCHAR)
SELECT verbal_noun FROM table_12784134_1 WHERE participle = "e-duki"
What is the verbal noun connected to the participle e-duki?
CREATE TABLE table_12784134_1 (verbal_noun VARCHAR, participle VARCHAR)
SELECT manner_of_departure FROM table_27666856_3 WHERE outgoing_manager = "Luis Enrique"
Name the manner of departure for luis enrique
CREATE TABLE table_27666856_3 (manner_of_departure VARCHAR, outgoing_manager VARCHAR)
SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "APG" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = "CVO"
Find all airlines that have flights from both airports 'APG' and 'CVO'.
CREATE TABLE AIRLINES (Airline VARCHAR, uid VARCHAR); CREATE TABLE FLIGHTS (Airline VARCHAR, SourceAirport VARCHAR)
SELECT date_of_appointment FROM table_24162080_3 WHERE team = "1. FC Köln"
When 1. fc köln is the team what is the date of appointment?
CREATE TABLE table_24162080_3 (date_of_appointment VARCHAR, team VARCHAR)
SELECT COUNT(original_air_date) FROM table_25740548_3 WHERE production_code = "CA210"
How many original air dates are there for the episode with code CA210?
CREATE TABLE table_25740548_3 (original_air_date VARCHAR, production_code VARCHAR)
SELECT dar FROM table_15887683_10 WHERE television_service = "MTV Rocks"
Name the dar for mtv rocks
CREATE TABLE table_15887683_10 (dar VARCHAR, television_service VARCHAR)
SELECT name FROM table_name_39 WHERE time = "26.11"
Who had a time of 26.11?
CREATE TABLE table_name_39 (name VARCHAR, time VARCHAR)
SELECT tournament_name FROM table_name_65 WHERE score = "5–7, 6–4, 6–4"
What tournament had a score of 5–7, 6–4, 6–4?
CREATE TABLE table_name_65 (tournament_name VARCHAR, score VARCHAR)