answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT AVG(ties) FROM table_name_41 WHERE goals_against < 56 AND team = "ottawa hockey club" AND goals_for > 47
What is the average number of ties when goals against is less than 56 for Ottawa Hockey Club and the goals for is more than 47?
CREATE TABLE table_name_41 (ties INTEGER, goals_for VARCHAR, goals_against VARCHAR, team VARCHAR)
SELECT author FROM table_name_87 WHERE first_issue = "september 2010"
What is the Author of the Title with a First Issue of September 2010?
CREATE TABLE table_name_87 (author VARCHAR, first_issue VARCHAR)
SELECT district FROM table_name_71 WHERE former_local_authority = "south cambridgeshire rural district"
What district is the parish who had the South Cambridgeshire rural district as the former local authority?
CREATE TABLE table_name_71 (district VARCHAR, former_local_authority VARCHAR)
SELECT austria FROM table_name_13 WHERE croatia = "ireland"
What is shown for Austria when Croatia shows Ireland?
CREATE TABLE table_name_13 (austria VARCHAR, croatia VARCHAR)
SELECT model_name FROM table_1147701_4 WHERE engine_code = "B5204 T5"
what's the model name with engine code being b5204 t5
CREATE TABLE table_1147701_4 (model_name VARCHAR, engine_code VARCHAR)
SELECT year_s__won FROM table_name_45 WHERE player = "mike weir"
What year(s) did Mike Weir win player of the year?
CREATE TABLE table_name_45 (year_s__won VARCHAR, player VARCHAR)
SELECT round FROM table_name_87 WHERE opponent = "bobby rehman"
How many rounds was the bout against bobby rehman?
CREATE TABLE table_name_87 (round VARCHAR, opponent VARCHAR)
SELECT SUM(average) FROM table_name_26 WHERE state = "hawaii" AND interview > 9.636
What is the sum of the average of Hawaii, with an interviewer larger than 9.636?
CREATE TABLE table_name_26 (average INTEGER, state VARCHAR, interview VARCHAR)
SELECT player FROM table_name_39 WHERE college_country_team = "connecticut"
What Player is from Connecticut?
CREATE TABLE table_name_39 (player VARCHAR, college_country_team VARCHAR)
SELECT COUNT(frequency__per_hour_) FROM table_1612760_1 WHERE service_pattern = "Next station"
How many frequency figures are given for next station service pattern?
CREATE TABLE table_1612760_1 (frequency__per_hour_ VARCHAR, service_pattern VARCHAR)
SELECT score FROM table_name_66 WHERE home_team = "bolton wanderers"
What is the final score of the game home team Bolton Wanderers played?
CREATE TABLE table_name_66 (score VARCHAR, home_team VARCHAR)
SELECT number_of_episodes FROM table_name_86 WHERE status = "2001 - 2003, 2005 - 2009"
What is Number Of Episodes, when Status is "2001 - 2003, 2005 - 2009"?
CREATE TABLE table_name_86 (number_of_episodes VARCHAR, status VARCHAR)
SELECT heir FROM table_26460435_5 WHERE monarch = "Wareru"
Who was the heir when the monarch was Wareru?
CREATE TABLE table_26460435_5 (heir VARCHAR, monarch VARCHAR)
SELECT name FROM table_name_78 WHERE winning_constructor = "bugatti" AND winning_driver = "louis chiron"
What Name has a Winning constructor of bugatti, and a Winning driver of louis chiron?
CREATE TABLE table_name_78 (name VARCHAR, winning_constructor VARCHAR, winning_driver VARCHAR)
SELECT region FROM table_name_63 WHERE districts = 3 AND capital = "chepén"
What is the region for Chepén with 3 districts?
CREATE TABLE table_name_63 (region VARCHAR, districts VARCHAR, capital VARCHAR)
SELECT stuffit AS X FROM table_name_26 WHERE stuffit = "unknown" AND lha_lzh = "yes" AND iso_cd_image = "unknown"
What is the StuffitX value that has a Stuffit of unknown, LHA/LZH of yes, and unknown ISO/CD image?
CREATE TABLE table_name_26 (stuffit VARCHAR, iso_cd_image VARCHAR, lha_lzh VARCHAR)
SELECT COUNT(diameter__km_) FROM table_name_71 WHERE latitude < 14 AND name = "xenia" AND longitude > 249.4
What in Xenia's Diameter in km, with a latitude of 14 and a longitude of 249.4?
CREATE TABLE table_name_71 (diameter__km_ VARCHAR, longitude VARCHAR, latitude VARCHAR, name VARCHAR)
SELECT host FROM table_name_12 WHERE year > 1989 AND state = "california" AND venue = "staples center"
What is the host in a year greater than 1989 and when the venue is the Staples Center located in California?
CREATE TABLE table_name_12 (host VARCHAR, venue VARCHAR, year VARCHAR, state VARCHAR)
SELECT position FROM table_name_23 WHERE round > 5 AND college = "nevada"
What was the position of the player from the college of Nevada with a round over 5?
CREATE TABLE table_name_23 (position VARCHAR, round VARCHAR, college VARCHAR)
SELECT skip FROM table_name_31 WHERE nation = "wales"
What is the skip in Wales?
CREATE TABLE table_name_31 (skip VARCHAR, nation VARCHAR)
SELECT pick FROM table_name_56 WHERE year > 1983 AND player_name = "brian jozwiak"
Which Pick has a Year larger than 1983, and a Player name of brian jozwiak?
CREATE TABLE table_name_56 (pick VARCHAR, year VARCHAR, player_name VARCHAR)
SELECT other FROM table_11381701_3 WHERE symbian___series_40 = "0.40%"
When Symbian/Series 40 is 0.40%, what is the percentage of "other"?
CREATE TABLE table_11381701_3 (other VARCHAR, symbian___series_40 VARCHAR)
SELECT prefixes FROM table_10408617_5 WHERE scheme = "Pence per minute, fixed at all times" AND approx_premium = "3p/min"
What prefixes are priced at pence per minute, fixed at all times with a premium of 3p/min?
CREATE TABLE table_10408617_5 (prefixes VARCHAR, scheme VARCHAR, approx_premium VARCHAR)
SELECT survivor_count FROM table_21304131_2 WHERE directed_by = "Gwyneth Horder-Payton"
What was the survivor count for the episode directed by Gwyneth Horder-Payton?
CREATE TABLE table_21304131_2 (survivor_count VARCHAR, directed_by VARCHAR)
SELECT AVG(wins) FROM table_name_42 WHERE podiums = 3
What's the average wins of those games with 3 podiums?
CREATE TABLE table_name_42 (wins INTEGER, podiums VARCHAR)
SELECT COUNT(date) FROM table_30049462_3 WHERE game = 2
in how many dates the game was 2
CREATE TABLE table_30049462_3 (date VARCHAR, game VARCHAR)
SELECT school_club_team FROM table_name_16 WHERE round > 16
Which School/Club Team has a Round larger than 16?
CREATE TABLE table_name_16 (school_club_team VARCHAR, round INTEGER)
SELECT winner FROM table_14395920_2 WHERE stage = 18
Who won stage 18?
CREATE TABLE table_14395920_2 (winner VARCHAR, stage VARCHAR)
SELECT meter_200, meter_300 FROM swimmer WHERE nationality = 'Australia'
Find all 200 meter and 300 meter results of swimmers with nationality "Australia".
CREATE TABLE swimmer (meter_200 VARCHAR, meter_300 VARCHAR, nationality VARCHAR)
SELECT production_code FROM table_26259391_1 WHERE written_by = "Andrew Goldberg"
which production codes were written by andrew goldberg
CREATE TABLE table_26259391_1 (production_code VARCHAR, written_by VARCHAR)
SELECT position FROM table_name_62 WHERE venue = "tampere, finland"
What is the position of the competition in Tampere, Finland?
CREATE TABLE table_name_62 (position VARCHAR, venue VARCHAR)
SELECT MAX(_number_of_total_votes) FROM table_name_31 WHERE _percentage_of_popular_vote = "32.41%" AND _number_of_seats_won > 95
Name the most # of total votes with % of popular vote of 32.41% and # of seats won more than 95
CREATE TABLE table_name_31 (_number_of_total_votes INTEGER, _percentage_of_popular_vote VARCHAR, _number_of_seats_won VARCHAR)
SELECT SUM(game) FROM table_name_41 WHERE points < 30
What is the sum of the game numbers for games with less than 30 points?
CREATE TABLE table_name_41 (game INTEGER, points INTEGER)
SELECT location___state FROM table_name_84 WHERE team = "glenn seton racing" AND circuit = "lakeside international raceway"
The team Glenn Seton Racing has a circuit at the lakeside international raceway, what is the location and state?
CREATE TABLE table_name_84 (location___state VARCHAR, team VARCHAR, circuit VARCHAR)
SELECT name, furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1
Return the name and id of the furniture with the highest market rate.
CREATE TABLE furniture (name VARCHAR, furniture_id VARCHAR, market_rate VARCHAR)
SELECT opponent FROM table_24561550_1 WHERE record = "4-4"
List all opponents from the 4-4 scoring game.
CREATE TABLE table_24561550_1 (opponent VARCHAR, record VARCHAR)
SELECT revising_convention_s_ FROM table_2001348_1 WHERE denunciations__september_2011_ = 21
What were the revising conventions commentary with a denunciation of 21?
CREATE TABLE table_2001348_1 (revising_convention_s_ VARCHAR, denunciations__september_2011_ VARCHAR)
SELECT city FROM table_name_15 WHERE sep = "83 °f / 28.3 °c"
Name the city with september of 83 °f / 28.3 °c
CREATE TABLE table_name_15 (city VARCHAR, sep VARCHAR)
SELECT stadium FROM table_name_92 WHERE score = "66-20"
For the match ending in a score of 66-20, what was the stadium?
CREATE TABLE table_name_92 (stadium VARCHAR, score VARCHAR)
SELECT date FROM table_name_16 WHERE visitor = "chicago black hawks" AND record = "0-2"
What day was the visitor Chicago Black Hawks and the record 0-2?
CREATE TABLE table_name_16 (date VARCHAR, visitor VARCHAR, record VARCHAR)
SELECT MAX(track) FROM table_name_87 WHERE song_title = "rip it up"
What is the highest track for the song Rip it Up?
CREATE TABLE table_name_87 (track INTEGER, song_title VARCHAR)
SELECT surface FROM table_name_41 WHERE score_in_the_final = "6–2, 6–3"
What type of surface was used where the final score was 6–2, 6–3?
CREATE TABLE table_name_41 (surface VARCHAR, score_in_the_final VARCHAR)
SELECT platform FROM table_name_26 WHERE departure = "18:00"
At what Platform is the Departure 18:00?
CREATE TABLE table_name_26 (platform VARCHAR, departure VARCHAR)
SELECT COUNT(*) FROM AIRLINES
How many airlines do we have?
CREATE TABLE AIRLINES (Id VARCHAR)
SELECT decision FROM table_name_53 WHERE visitor = "carolina"
What was the Decision when the Visitor was Carolina?
CREATE TABLE table_name_53 (decision VARCHAR, visitor VARCHAR)
SELECT avg_finish FROM table_1875157_2 WHERE winnings = "$1,400"
What is the average finish for winnings of $1,400?
CREATE TABLE table_1875157_2 (avg_finish VARCHAR, winnings VARCHAR)
SELECT college FROM table_name_53 WHERE overall = 171
Which College had an Overall pick of 171?
CREATE TABLE table_name_53 (college VARCHAR, overall VARCHAR)
SELECT race FROM table_name_12 WHERE distance = "10f" AND winner_or_2nd = "mollison"
What is the race with a 10f distance and mollison as the winner or 2nd?
CREATE TABLE table_name_12 (race VARCHAR, distance VARCHAR, winner_or_2nd VARCHAR)
SELECT week_12 FROM table_name_35 WHERE week_4 = "gerard ewelina"
Who is the week 12 for the week 4 of Gerard Ewelina?
CREATE TABLE table_name_35 (week_12 VARCHAR, week_4 VARCHAR)
SELECT category FROM table_name_20 WHERE year > 2005 AND for_the_show = "kasautii zindagii kay"
What category was Kasautii Zindagii Kay nominated for after 2005?
CREATE TABLE table_name_20 (category VARCHAR, year VARCHAR, for_the_show VARCHAR)
SELECT COUNT(*) FROM park WHERE state = 'NY'
How many parks are there in the state of NY?
CREATE TABLE park (state VARCHAR)
SELECT COUNT(heat) FROM table_name_88 WHERE name = "smiljana marinović"
What is the Heat for Smiljana Marinović?
CREATE TABLE table_name_88 (heat VARCHAR, name VARCHAR)
SELECT AVG(points) FROM table_name_86 WHERE drawn < 1 AND name = "ev aich" AND lost > 11
What is the average number of points with less than 1 draw and more than 11 losses for Ev Aich?
CREATE TABLE table_name_86 (points INTEGER, lost VARCHAR, drawn VARCHAR, name VARCHAR)
SELECT SUM(rank) FROM table_name_60 WHERE publication = "rolling stone" AND year = 2008
Where did Day & Age rank in the Rolling Stone in 2008?
CREATE TABLE table_name_60 (rank INTEGER, publication VARCHAR, year VARCHAR)
SELECT constructor FROM table_name_47 WHERE laps < 28 AND time_retired = "out of fuel"
Who built the car that ran out of fuel before 28 laps?
CREATE TABLE table_name_47 (constructor VARCHAR, laps VARCHAR, time_retired VARCHAR)
SELECT 3 AS rd_couple FROM table_25664518_4 WHERE viewers__millions_ = "4.89"
Who were the 3rd couple that were viewed by 4.89 million viewers?
CREATE TABLE table_25664518_4 (viewers__millions_ VARCHAR)
SELECT date FROM table_name_20 WHERE record = "74-84"
Name the date for record of 74-84
CREATE TABLE table_name_20 (date VARCHAR, record VARCHAR)
SELECT MAX(week) FROM table_17927935_1 WHERE opponent = "New York Jets"
What was the week number when the opponent was the New York Jets?
CREATE TABLE table_17927935_1 (week INTEGER, opponent VARCHAR)
SELECT score FROM table_name_69 WHERE record = "80-61"
What is the score of the game that holds a record of 80-61?
CREATE TABLE table_name_69 (score VARCHAR, record VARCHAR)
SELECT record FROM table_name_52 WHERE date = "december 2, 2001"
What is the Record for the game held on December 2, 2001?
CREATE TABLE table_name_52 (record VARCHAR, date VARCHAR)
SELECT competition FROM table_name_89 WHERE position = "1st" AND year = 2009
Which competition held the 1st position in 2009?
CREATE TABLE table_name_89 (competition VARCHAR, position VARCHAR, year VARCHAR)
SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2
Show the headquarters shared by more than two companies.
CREATE TABLE Companies (Headquarters VARCHAR)
SELECT brand__from_ FROM table_name_5 WHERE pick__number = 3
Pick # 3 works for which brand?
CREATE TABLE table_name_5 (brand__from_ VARCHAR, pick__number VARCHAR)
SELECT COUNT(result) FROM table_20850527_1 WHERE record = "3-0"
How many wins or losses were there when the record was 3-0?
CREATE TABLE table_20850527_1 (result VARCHAR, record VARCHAR)
SELECT finish FROM table_name_62 WHERE engine = "buick" AND start = "16th"
What was Andretti's finish the year he started 16th with a Buick engine?
CREATE TABLE table_name_62 (finish VARCHAR, engine VARCHAR, start VARCHAR)
SELECT attribute FROM table_name_15 WHERE cancelable = "yes" AND bubbles = "yes"
Which of the attributes has is cancelable and an answer of yes for bubbles?
CREATE TABLE table_name_15 (attribute VARCHAR, cancelable VARCHAR, bubbles VARCHAR)
SELECT end_date FROM table_name_99 WHERE to_club = "celtic"
A player was moved to celtic had an end of what date?
CREATE TABLE table_name_99 (end_date VARCHAR, to_club VARCHAR)
SELECT MIN(score) FROM table_name_96 WHERE drop_goals > 0 AND penalties = 52 AND number > 5
drop goals larger than 0, and a Penalties of 52, and a Number larger than 5 had what lowest score?
CREATE TABLE table_name_96 (score INTEGER, number VARCHAR, drop_goals VARCHAR, penalties VARCHAR)
SELECT COUNT(moroccan_population) FROM table_name_30 WHERE name = "sebt saiss" AND population__2004_ > 11212
What is the number for the Moroccan population when the name is Sebt Saiss and the 2004 population is more than 11212?
CREATE TABLE table_name_30 (moroccan_population VARCHAR, name VARCHAR, population__2004_ VARCHAR)
SELECT studio_s_ FROM table_name_71 WHERE director = "philip frank messina"
What studio has the director Philip Frank Messina?
CREATE TABLE table_name_71 (studio_s_ VARCHAR, director VARCHAR)
SELECT MAX(ties) FROM table_name_72 WHERE losses < 8
What is the highest value for Ties, when Losses is less than 8?
CREATE TABLE table_name_72 (ties INTEGER, losses INTEGER)
SELECT uk_viewers__million_ FROM table_29574579_1 WHERE share___percentage_ = "10.8"
How many millions of viewers are listed when the share is 10.8?
CREATE TABLE table_29574579_1 (uk_viewers__million_ VARCHAR, share___percentage_ VARCHAR)
SELECT COUNT(1957) FROM table_name_71 WHERE 1955 < 0.63 AND 1952 > 0.22
What is the 1957 number when the 1955 is smaller than 0.63, and 1952 is larger than 0.22?
CREATE TABLE table_name_71 (Id VARCHAR)
SELECT COUNT(roll) FROM table_name_95 WHERE area = "aranga"
Can you tell me the total number of Roll that has the Area of aranga?
CREATE TABLE table_name_95 (roll VARCHAR, area VARCHAR)
SELECT MAX(no_in_series) FROM table_25997153_1 WHERE us_viewers__million_ = "16.17"
what is the latest episode in the series that had 16.17 million u.s. viewers?
CREATE TABLE table_25997153_1 (no_in_series INTEGER, us_viewers__million_ VARCHAR)
SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = "Bosco"
Find the ids of the problems that are reported by the staff whose last name is Bosco.
CREATE TABLE problems (problem_id VARCHAR, reported_by_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_last_name VARCHAR)
SELECT MAX(laps) FROM table_name_37 WHERE time_retired = "engine" AND grid = 5
Name the highest laps for time/retired of engine and grid of 5
CREATE TABLE table_name_37 (laps INTEGER, time_retired VARCHAR, grid VARCHAR)
SELECT mult FROM table_name_85 WHERE model_number = "pentium ii 450"
What is Mult, when Model Number is Pentium II 450?
CREATE TABLE table_name_85 (mult VARCHAR, model_number VARCHAR)
SELECT celebrity FROM table_name_91 WHERE finished = "7th"
Who was the celebrity who finished in 7th place?
CREATE TABLE table_name_91 (celebrity VARCHAR, finished VARCHAR)
SELECT opponent FROM table_name_60 WHERE date = "april 14, 2007"
Who was the opponent on the game on April 14, 2007?
CREATE TABLE table_name_60 (opponent VARCHAR, date VARCHAR)
SELECT last_10_meetings FROM table_name_32 WHERE last_meeting = "11/26/1988"
What is the last 10 meetings that have 11/26/1988 as the lasr meeting?
CREATE TABLE table_name_32 (last_10_meetings VARCHAR, last_meeting VARCHAR)
SELECT order_id, customer_id FROM orders ORDER BY date_order_placed LIMIT 1
what are the order id and customer id of the oldest order?
CREATE TABLE orders (order_id VARCHAR, customer_id VARCHAR, date_order_placed VARCHAR)
SELECT car_s_ FROM table_name_24 WHERE rounds < 12 AND owner_s_ = "scott deware"
What car does Scott Deware own that has rounds under 12?
CREATE TABLE table_name_24 (car_s_ VARCHAR, rounds VARCHAR, owner_s_ VARCHAR)
SELECT type FROM table_name_19 WHERE bldr = "mcw&f" AND year < 1927 AND lt_nos = "9820-9821"
Bldr of mcw&f, and a Year smaller than 1927, and a LT Nos of 9820-9821 has what type?
CREATE TABLE table_name_19 (type VARCHAR, lt_nos VARCHAR, bldr VARCHAR, year VARCHAR)
SELECT competition FROM table_name_42 WHERE score = "3-0"
Name the competition for score of 3-0
CREATE TABLE table_name_42 (competition VARCHAR, score VARCHAR)
SELECT team FROM table_2241841_1 WHERE race_time = "3:15:43"
What team set a 3:15:43 winning time?
CREATE TABLE table_2241841_1 (team VARCHAR, race_time VARCHAR)
SELECT rank FROM table_name_29 WHERE bronze = "source: maltese olympic committee"
What rank is the nation that has a bronze of source: Maltese Olympic Committee?
CREATE TABLE table_name_29 (rank VARCHAR, bronze VARCHAR)
SELECT score FROM table_name_15 WHERE date = "9 may 2001"
Tell me the score for 9 may 2001
CREATE TABLE table_name_15 (score VARCHAR, date VARCHAR)
SELECT xenon FROM table_name_29 WHERE helium = "5.1"
Which Xenon has a Helium of 5.1?
CREATE TABLE table_name_29 (xenon VARCHAR, helium VARCHAR)
SELECT Local AS mission FROM table_name_41 WHERE local_location = "none" AND local_position = "high commissioner" AND resident_country = "fiji" AND mission = "tonga"
What is the local mission that has none as a local location, high commissioner as a local position, fiji as a resident county, and a mission of tonga?
CREATE TABLE table_name_41 (Local VARCHAR, mission VARCHAR, resident_country VARCHAR, local_location VARCHAR, local_position VARCHAR)
SELECT location FROM table_13759592_1 WHERE nickname = "Vikings"
Which location has a team that is nicknamed the Vikings?
CREATE TABLE table_13759592_1 (location VARCHAR, nickname VARCHAR)
SELECT sport FROM table_name_9 WHERE name = "gustav larsson"
What is the Sport with a Name that is gustav larsson?
CREATE TABLE table_name_9 (sport VARCHAR, name VARCHAR)
SELECT time_retired FROM table_name_30 WHERE laps < 75 AND grid < 15 AND driver = "ronnie peterson"
What is the time/retired for ronnie peterson with under 75 laps and a grid under 15?
CREATE TABLE table_name_30 (time_retired VARCHAR, driver VARCHAR, laps VARCHAR, grid VARCHAR)
SELECT time FROM table_26842217_10 WHERE visiting_team = "Georgia"
Name the time for georgia
CREATE TABLE table_26842217_10 (time VARCHAR, visiting_team VARCHAR)
SELECT notes FROM table_name_40 WHERE year < 2013 AND language = "mandarin chinese" AND network = "ctv"
What are the notes for the Mandarin Chinese program on CTV earlier than 2013?
CREATE TABLE table_name_40 (notes VARCHAR, network VARCHAR, year VARCHAR, language VARCHAR)
SELECT area_in_1000km²__1930_ FROM table_11654169_1 WHERE voivodeship_separate_city = "lubelskie"
List all areas within 1000 km in the city of Lubelskie?
CREATE TABLE table_11654169_1 (area_in_1000km²__1930_ VARCHAR, voivodeship_separate_city VARCHAR)
SELECT SUM(game) FROM table_name_43 WHERE record = "8–2–0" AND points > 16
Which Game has a Record of 8–2–0, and Points larger than 16?
CREATE TABLE table_name_43 (game INTEGER, record VARCHAR, points VARCHAR)
SELECT COUNT(*), customer_id FROM Accounts GROUP BY customer_id
How many accounts does each customer have? List the number and customer id.
CREATE TABLE Accounts (customer_id VARCHAR)
SELECT frequency FROM table_24096813_15 WHERE part_number_s_ = "TT80503300"
What's the frequency of the model with part number TT80503300?
CREATE TABLE table_24096813_15 (frequency VARCHAR, part_number_s_ VARCHAR)
SELECT title FROM table_name_70 WHERE year = "2012"
What is the title of the TV series in 2012?
CREATE TABLE table_name_70 (title VARCHAR, year VARCHAR)