answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT MAX(area__km_2__) FROM table_name_72 WHERE code = 66097 AND region > 6
What is the largest area with a Code of 66097, and a Region larger than 6?
CREATE TABLE table_name_72 (area__km_2__ INTEGER, code VARCHAR, region VARCHAR)
SELECT location FROM table_23308178_6 WHERE record = "20-6-6"
Where was the game played when the record was 20-6-6?
CREATE TABLE table_23308178_6 (location VARCHAR, record VARCHAR)
SELECT latitude FROM table_name_70 WHERE distance = "42.5km"
what is the latitude when the distance is 42.5km?
CREATE TABLE table_name_70 (latitude VARCHAR, distance VARCHAR)
SELECT MIN(crowd) FROM table_name_32 WHERE home_team = "north melbourne"
What was the lowest Crowd Size for the Home Team of North Melbourne?
CREATE TABLE table_name_32 (crowd INTEGER, home_team VARCHAR)
SELECT military_deaths FROM table_name_15 WHERE military_and_or_civilian_wounded = "1,200+"
How many military deaths were there when there were 1,200+ military and/or civilian wounded?
CREATE TABLE table_name_15 (military_deaths VARCHAR, military_and_or_civilian_wounded VARCHAR)
SELECT colours FROM table_name_26 WHERE head_coach = "benedikt guðmundsson"
What are the colours of the team with benedikt guðmundsson as head coach?
CREATE TABLE table_name_26 (colours VARCHAR, head_coach VARCHAR)
SELECT COUNT(number) FROM table_name_10 WHERE builder = "ruston hornsby" AND date = 1961 AND name = "topsy"
What number has the builder ruston hornsby, the date 1961, and the name Topsy?
CREATE TABLE table_name_10 (number VARCHAR, name VARCHAR, builder VARCHAR, date VARCHAR)
SELECT womens_singles FROM table_12104319_1 WHERE mixed_doubles = "Marcus Ellis Gabrielle White"
What is the womens singles of marcus ellis gabrielle white?
CREATE TABLE table_12104319_1 (womens_singles VARCHAR, mixed_doubles VARCHAR)
SELECT loser FROM table_name_98 WHERE winner = "new york jets" AND year < 1994 AND result = "37–13"
What team was the lower when the winner was the new york jets, and a Year earlier than 1994, and a Result of 37–13?
CREATE TABLE table_name_98 (loser VARCHAR, result VARCHAR, winner VARCHAR, year VARCHAR)
SELECT name FROM table_2482547_5 WHERE balls_bowled = 4969
Who are all the players who've bowled more than 4969 balls?
CREATE TABLE table_2482547_5 (name VARCHAR, balls_bowled VARCHAR)
SELECT AVG(total) FROM table_name_56 WHERE player = "craig stadler"
What is the Total of Player Craig Stadler?
CREATE TABLE table_name_56 (total INTEGER, player VARCHAR)
SELECT champion FROM table_name_60 WHERE runner_up = "e.a. lassen"
What player was the champion in the match where E.A. Lassen was the runner-up?
CREATE TABLE table_name_60 (champion VARCHAR, runner_up VARCHAR)
SELECT original_air_date FROM table_23114705_3 WHERE written_by = "Tim Balme"
If the episode was written by Tim Balme, what was the original air date?
CREATE TABLE table_23114705_3 (original_air_date VARCHAR, written_by VARCHAR)
SELECT t1.product_name, t1.typical_buying_price, t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = "yellow"
What are the name and typical buying and selling prices of the products that have color described as "yellow"?
CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR); CREATE TABLE products (product_name VARCHAR, typical_buying_price VARCHAR, typical_selling_price VARCHAR, color_code VARCHAR)
SELECT method FROM table_name_33 WHERE event = "ufc 160"
What was the method for the resolution of the fight at UFC 160?
CREATE TABLE table_name_33 (method VARCHAR, event VARCHAR)
SELECT COUNT(vuelta_wins) FROM table_name_67 WHERE points > 0 AND country = "spain" AND name = "josé pérez-francés"
How many times is vuelta wins when points is more than 0, country is spain and the name is josé pérez-francés?
CREATE TABLE table_name_67 (vuelta_wins VARCHAR, name VARCHAR, points VARCHAR, country VARCHAR)
SELECT product_category_description, unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs"
What is the product category description and unit of measurement of category "Herbs"?
CREATE TABLE ref_product_categories (product_category_description VARCHAR, unit_of_measure VARCHAR, product_category_code VARCHAR)
SELECT AVG(bronze) FROM table_name_96 WHERE nation = "romania" AND silver > 1
How many bronze medals for Romania when the silver count is more than 1?
CREATE TABLE table_name_96 (bronze INTEGER, nation VARCHAR, silver VARCHAR)
SELECT score FROM table_name_94 WHERE to_par = "+7" AND player = "david frost"
For the match in which player David Frost scored a To Par of +7, what was the final score?
CREATE TABLE table_name_94 (score VARCHAR, to_par VARCHAR, player VARCHAR)
SELECT proto_germanic FROM table_name_3 WHERE old_english = "/d/"
What's the Proto-Germanic when the Old English is /d/?
CREATE TABLE table_name_3 (proto_germanic VARCHAR, old_english VARCHAR)
SELECT COUNT(no) FROM table_15827397_1 WHERE name = "City of Birmingham"
How many locomotives have a name of City of Birmingham
CREATE TABLE table_15827397_1 (no VARCHAR, name VARCHAR)
SELECT opponent FROM table_name_19 WHERE record = "37-27"
What opponent had a record of 37-27?
CREATE TABLE table_name_19 (opponent VARCHAR, record VARCHAR)
SELECT venue FROM table_name_46 WHERE away_team = "st kilda"
Where did St KIlda play their away game?
CREATE TABLE table_name_46 (venue VARCHAR, away_team VARCHAR)
SELECT MAX(wins) FROM table_name_74 WHERE goals_against < 51 AND points > 39 AND goal_difference < 13
What is the highest wins entry with fewer than 51 goals, more than 39 points, and a goal difference smaller than 13?
CREATE TABLE table_name_74 (wins INTEGER, goal_difference VARCHAR, goals_against VARCHAR, points VARCHAR)
SELECT MAX(pos) FROM table_18811741_15 WHERE podiums = 1
What is the highest pos for a driver with 1 podium?
CREATE TABLE table_18811741_15 (pos INTEGER, podiums VARCHAR)
SELECT COUNT(week) FROM table_name_87 WHERE attendance = 54 OFFSET 187
How many weeks has 54,187 as the attendance?
CREATE TABLE table_name_87 (week VARCHAR, attendance VARCHAR)
SELECT team_classification FROM table_name_92 WHERE stage = "20"
Name the team classification for stage of 20
CREATE TABLE table_name_92 (team_classification VARCHAR, stage VARCHAR)
SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.source_u_id GROUP BY T2.source_u_id ORDER BY AVG(trust) DESC LIMIT 1
Find the name of the source user with the highest average trust score.
CREATE TABLE useracct (name VARCHAR, u_id VARCHAR); CREATE TABLE trust (source_u_id VARCHAR)
SELECT player FROM table_name_89 WHERE date = "sep. 2008"
Which Player has a Date of sep. 2008?
CREATE TABLE table_name_89 (player VARCHAR, date VARCHAR)
SELECT power FROM table_name_21 WHERE name = "9 nc"
Which Power has a Name of 9 nc?
CREATE TABLE table_name_21 (power VARCHAR, name VARCHAR)
SELECT party FROM table_name_33 WHERE opinion_research_centre__opc_ = "1.5%"
What is Party, when Opinion Research Centre (OPC) is 1.5%?
CREATE TABLE table_name_33 (party VARCHAR, opinion_research_centre__opc_ VARCHAR)
SELECT COUNT(Ends) AS won FROM table_17012578_37 WHERE pa = 39
How many values are in the ends won cell corresponding to a PA of 39?
CREATE TABLE table_17012578_37 (Ends VARCHAR, pa VARCHAR)
SELECT MAX(crowd) FROM table_name_54 WHERE away_team = "carlton"
What was the largest crowd for an away Carlton game?
CREATE TABLE table_name_54 (crowd INTEGER, away_team VARCHAR)
SELECT AVG(total) FROM table_name_39 WHERE player = "ian baker-finch"
count the the average Total of ian baker-finch?
CREATE TABLE table_name_39 (total INTEGER, player VARCHAR)
SELECT race_name FROM table_name_29 WHERE date = "16 september"
What is the name of the race on 16 september?
CREATE TABLE table_name_29 (race_name VARCHAR, date VARCHAR)
SELECT AVG(grid) FROM table_name_33 WHERE constructor = "brm" AND laps < 63
What is the average grid with brm and under 63 laps?
CREATE TABLE table_name_33 (grid INTEGER, constructor VARCHAR, laps VARCHAR)
SELECT original_title FROM table_name_36 WHERE film_title_used_in_nomination = "keep smiling"
What was the original title for the film used in nomination of keep smiling?
CREATE TABLE table_name_36 (original_title VARCHAR, film_title_used_in_nomination VARCHAR)
SELECT outcome FROM table_name_73 WHERE tournament = "rome 2, italy"
What was the outcome for the Rome 2, Italy tournament?
CREATE TABLE table_name_73 (outcome VARCHAR, tournament VARCHAR)
SELECT award FROM table_name_60 WHERE outcome = "nominated" AND name = "anuya bhagvath"
Anuya Bhagvath was nominated for what award?
CREATE TABLE table_name_60 (award VARCHAR, outcome VARCHAR, name VARCHAR)
SELECT date, cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5
What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate.
CREATE TABLE weather (date VARCHAR, cloud_cover VARCHAR)
SELECT home FROM table_name_34 WHERE date = "march 12"
Where is the home on march 12?
CREATE TABLE table_name_34 (home VARCHAR, date VARCHAR)
SELECT record FROM table_name_51 WHERE attendance = "64,053"
Which record has 64,053 as the attendance?
CREATE TABLE table_name_51 (record VARCHAR, attendance VARCHAR)
SELECT director FROM table_25800134_3 WHERE airdate = "May 2, 1959"
Who was the director for the episode on May 2, 1959?
CREATE TABLE table_25800134_3 (director VARCHAR, airdate VARCHAR)
SELECT third FROM table_name_52 WHERE skip = "sandra peterson" AND second = "joan mccusker" AND events = "1995 stoh"
IN EVENTS 1995 STOH, WHO WAS THE THIRD WITH SKIP SANDRA PETERSON AND SECOND JOAN MCCUSKER?
CREATE TABLE table_name_52 (third VARCHAR, events VARCHAR, skip VARCHAR, second VARCHAR)
SELECT country FROM table_26160007_1 WHERE exports = "1,278.13"
In which country are there 1,278.13 exports?
CREATE TABLE table_26160007_1 (country VARCHAR, exports VARCHAR)
SELECT driver FROM table_name_28 WHERE laps < 53 AND grid < 14 AND time_retired = "differential"
What driver has under 53 laps, a grid smaller than 14, and a time/retired of differential?
CREATE TABLE table_name_28 (driver VARCHAR, time_retired VARCHAR, laps VARCHAR, grid VARCHAR)
SELECT COUNT(lost) FROM table_name_65 WHERE goal_difference = "+13" AND drawn > 12
What is the number of games lost when goal difference is +13 and draws are more than 12?
CREATE TABLE table_name_65 (lost VARCHAR, goal_difference VARCHAR, drawn VARCHAR)
SELECT team_1 FROM table_name_1 WHERE agg = "2-5"
Who is team 1 with an agg of 2-5?
CREATE TABLE table_name_1 (team_1 VARCHAR, agg VARCHAR)
SELECT to_par FROM table_name_93 WHERE country = "england"
How many to par in England?
CREATE TABLE table_name_93 (to_par VARCHAR, country VARCHAR)
SELECT trailers FROM table_name_47 WHERE formed_from = "pan/pul/res cars"
Name the trailers for formed from pan/pul/res cars
CREATE TABLE table_name_47 (trailers VARCHAR, formed_from VARCHAR)
SELECT COUNT(director) FROM table_25800134_12 WHERE airdate = "February 5, 1968"
How many people directed the episode that aired on February 5, 1968?
CREATE TABLE table_25800134_12 (director VARCHAR, airdate VARCHAR)
SELECT MAX(rank) FROM table_name_38 WHERE nationality = "belgium" AND react > 0.162
What is the highest rank of an athlete from Belgium with react greater than 0.162?
CREATE TABLE table_name_38 (rank INTEGER, nationality VARCHAR, react VARCHAR)
SELECT enrollment FROM table_262534_2 WHERE location__population_ = "Lebanon, Tennessee (20,235)"
What is the enrollment for the institution that is located in Lebanon, Tennessee (20,235)?
CREATE TABLE table_262534_2 (enrollment VARCHAR, location__population_ VARCHAR)
SELECT time FROM table_name_77 WHERE lane = 7
What was the time of the swimmer in lane 7?
CREATE TABLE table_name_77 (time VARCHAR, lane VARCHAR)
SELECT title FROM table_26952212_1 WHERE no_in_total = "30"
What is the title for episode number 30?
CREATE TABLE table_26952212_1 (title VARCHAR, no_in_total VARCHAR)
SELECT date FROM table_name_56 WHERE record = "84-69"
What was the date of the game when their record was 84-69?
CREATE TABLE table_name_56 (date VARCHAR, record VARCHAR)
SELECT COUNT(provider_iai_) FROM table_11390711_4 WHERE foundation = 1964
How many providers were founded in 1964?
CREATE TABLE table_11390711_4 (provider_iai_ VARCHAR, foundation VARCHAR)
SELECT title FROM table_name_67 WHERE format = "cd" AND artist = "misfits"
What is the title of the Misfits with a CD format?
CREATE TABLE table_name_67 (title VARCHAR, format VARCHAR, artist VARCHAR)
SELECT team FROM table_name_23 WHERE laps = 379
Can you tell me the Team that has the Laps of 379?
CREATE TABLE table_name_23 (team VARCHAR, laps VARCHAR)
SELECT MIN(brisbane) FROM table_24291077_8 WHERE adelaide = 94000
What was the rating for Brisbane the week that Adelaide had 94000?
CREATE TABLE table_24291077_8 (brisbane INTEGER, adelaide VARCHAR)
SELECT province FROM table_name_42 WHERE rank > 24 AND name = "laforge-2"
what is the province when the rank is higher than 24 and the name is laforge-2?
CREATE TABLE table_name_42 (province VARCHAR, rank VARCHAR, name VARCHAR)
SELECT builder FROM table_name_93 WHERE order_year = "2001-02"
What builder has a 2001-02 order year?
CREATE TABLE table_name_93 (builder VARCHAR, order_year VARCHAR)
SELECT results FROM table_1341453_20 WHERE incumbent = "Jim McCrery"
What were the results for incumbent Jim McCrery?
CREATE TABLE table_1341453_20 (results VARCHAR, incumbent VARCHAR)
SELECT worst_dancer_s_ FROM table_name_43 WHERE lowest_score = 14
Which of the Worst dancer(s) has the Lowest score of 14?
CREATE TABLE table_name_43 (worst_dancer_s_ VARCHAR, lowest_score VARCHAR)
SELECT number FROM table_name_14 WHERE party = "socialist party" AND président = "yves krattinger"
What number corresponds to Presidet Yves Krattinger of the Socialist party?
CREATE TABLE table_name_14 (number VARCHAR, party VARCHAR, président VARCHAR)
SELECT call_sign FROM table_name_70 WHERE frequency_mhz = 89.5
Name the call sign with frequency of 89.5
CREATE TABLE table_name_70 (call_sign VARCHAR, frequency_mhz VARCHAR)
SELECT COUNT(series__number) FROM table_25800134_9 WHERE airdate = "December 26, 1964"
what is the number of series where the airdate is december 26, 1964?
CREATE TABLE table_25800134_9 (series__number VARCHAR, airdate VARCHAR)
SELECT chassis FROM table_name_5 WHERE points = 13 AND year = 1975 AND entrant = "scuderia citta del mille"
Can you tell me the Chassis that has the Points of 13, and the Year of 1975, and the Entrant of scuderia citta del mille?
CREATE TABLE table_name_5 (chassis VARCHAR, entrant VARCHAR, points VARCHAR, year VARCHAR)
SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
Show the ids of all employees who have destroyed a document.
CREATE TABLE Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR)
SELECT country FROM table_name_72 WHERE heat_rank < 8 AND overall_rank = "56"
Which country is ranked 56 overall and has a heat rank smaller than 8?
CREATE TABLE table_name_72 (country VARCHAR, heat_rank VARCHAR, overall_rank VARCHAR)
SELECT to_par FROM table_name_14 WHERE player = "mike weir"
What was the to par score for Mike Weir?
CREATE TABLE table_name_14 (to_par VARCHAR, player VARCHAR)
SELECT MIN(gp) FROM table_26176081_29
What is the lowest gp?
CREATE TABLE table_26176081_29 (gp INTEGER)
SELECT MAX(points_1) FROM table_name_39 WHERE goal_difference = "+28" AND lost > 12
What is the most points 1 when the goal difference is +28 and lost is larger than 12?
CREATE TABLE table_name_39 (points_1 INTEGER, goal_difference VARCHAR, lost VARCHAR)
SELECT date FROM table_27713583_2 WHERE high_points = "Toney Douglas (23)"
What is the date the high points was by toney douglas (23)?
CREATE TABLE table_27713583_2 (date VARCHAR, high_points VARCHAR)
SELECT district FROM table_1341690_18 WHERE incumbent = "John Breaux"
In which district is the incumbent John Breaux?
CREATE TABLE table_1341690_18 (district VARCHAR, incumbent VARCHAR)
SELECT i_o_bus FROM table_name_14 WHERE frequency = "1.67 ghz" AND sspec_number = "slbmg(a0)"
What is I/O Bus, when Frequency is 1.67 GHz, and when sSpec Number is SLBMG(A0)?
CREATE TABLE table_name_14 (i_o_bus VARCHAR, frequency VARCHAR, sspec_number VARCHAR)
SELECT host_city FROM table_name_85 WHERE president_in_office = "margaret thatcher" AND year = 1981
In which host city was Margaret Thatcher the President-in-Office in 1981?
CREATE TABLE table_name_85 (host_city VARCHAR, president_in_office VARCHAR, year VARCHAR)
SELECT high_rebounds FROM table_15869204_7 WHERE date = "February 24"
What were the high rebounds on February 24?
CREATE TABLE table_15869204_7 (high_rebounds VARCHAR, date VARCHAR)
SELECT d_41 FROM table_name_33 WHERE r_51 = "r 11"
Tell me the D 41 and R 51 of r 11
CREATE TABLE table_name_33 (d_41 VARCHAR, r_51 VARCHAR)
SELECT builder FROM table_name_49 WHERE ship = "zeehond"
The Zeehond was built by whom?
CREATE TABLE table_name_49 (builder VARCHAR, ship VARCHAR)
SELECT 2010 FROM table_name_33 WHERE 2008 = "1r" AND 2011 = "1r" AND tournament = "us open"
Name the 2010 for 2008 of 1r and tournament of us open
CREATE TABLE table_name_33 (tournament VARCHAR)
SELECT series FROM table_21795846_1 WHERE position = "12th"
If the position is 12th, what was the series?
CREATE TABLE table_21795846_1 (series VARCHAR, position VARCHAR)
SELECT nation FROM table_name_79 WHERE team = "csc"
What is the nation of the person who was from the CSC team?
CREATE TABLE table_name_79 (nation VARCHAR, team VARCHAR)
SELECT COUNT(points_for) FROM table_27293285_4 WHERE "played" = "played"
Name the total number of points for for played
CREATE TABLE table_27293285_4 (points_for VARCHAR)
SELECT home_town FROM table_name_7 WHERE player = "steve zakuani"
From what town was Steve Zakuani?
CREATE TABLE table_name_7 (home_town VARCHAR, player VARCHAR)
SELECT first_name, last_name FROM Teachers ORDER BY last_name
Find the first names and last names of teachers in alphabetical order of last name.
CREATE TABLE Teachers (first_name VARCHAR, last_name VARCHAR)
SELECT stage FROM table_name_71 WHERE mountains_classification = "pascal richard" AND winner = "vladimir poulnikov"
What was the Stage when Pascal Richard had the Mountains classification and Vladimir Poulnikov won?
CREATE TABLE table_name_71 (stage VARCHAR, mountains_classification VARCHAR, winner VARCHAR)
SELECT MAX(to_par) FROM table_name_19 WHERE place = "t2" AND player = "mark brooks"
What is the highest to par of player mark brooks, who has a t2 place?
CREATE TABLE table_name_19 (to_par INTEGER, place VARCHAR, player VARCHAR)
SELECT MAX(grid) FROM table_name_8 WHERE laps > 72
What is the highest Grid with over 72 laps?
CREATE TABLE table_name_8 (grid INTEGER, laps INTEGER)
SELECT weight_at_birth FROM table_name_2 WHERE gender = "girl" AND nickname = "chidi"
How much did the girl, nicknamed Chidi, weigh at birth?
CREATE TABLE table_name_2 (weight_at_birth VARCHAR, gender VARCHAR, nickname VARCHAR)
SELECT league FROM table_name_59 WHERE manager = "lyman lamb / marty berghammer"
Manager of lyman lamb / marty berghammer is in what league?
CREATE TABLE table_name_59 (league VARCHAR, manager VARCHAR)
SELECT miles__km_ FROM table_2175858_1 WHERE average_speed__mph_ = "116.81"
How many miles were driven with the average speed at 116.81?
CREATE TABLE table_2175858_1 (miles__km_ VARCHAR, average_speed__mph_ VARCHAR)
SELECT date FROM table_name_85 WHERE visitor = "st. louis"
What day was St. Louis the visitor?
CREATE TABLE table_name_85 (date VARCHAR, visitor VARCHAR)
SELECT COUNT(points) FROM table_name_93 WHERE artist = "joe o'meara"
How many points did Joe O'Meara have?
CREATE TABLE table_name_93 (points VARCHAR, artist VARCHAR)
SELECT AVG(laps) FROM table_name_37 WHERE grid = 11
What were the average laps on a grid of 11?
CREATE TABLE table_name_37 (laps INTEGER, grid VARCHAR)
SELECT record FROM table_name_68 WHERE visitor = "minnesota"
What was the record when Minnesota was the visiting team?
CREATE TABLE table_name_68 (record VARCHAR, visitor VARCHAR)
SELECT period FROM table_name_67 WHERE year = 1896
What was the period for 1896?
CREATE TABLE table_name_67 (period VARCHAR, year VARCHAR)
SELECT finish FROM table_name_49 WHERE start = "15" AND team = "bahari"
Which Finish has a Start of 15, and a Team of bahari?
CREATE TABLE table_name_49 (finish VARCHAR, start VARCHAR, team VARCHAR)
SELECT record FROM table_name_55 WHERE date = "may 31"
Which Record has a Date of may 31?
CREATE TABLE table_name_55 (record VARCHAR, date VARCHAR)
SELECT track_number FROM table_name_44 WHERE album_title = "文武双全升级版" AND title = "老爸你别装酷"
Which Track number has a Album title of 文武双全升级版, and a Title of 老爸你别装酷?
CREATE TABLE table_name_44 (track_number VARCHAR, album_title VARCHAR, title VARCHAR)