answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT AVG(wins) FROM table_name_86 WHERE draws < 4 AND goals_for < 15
What is the average win total associated with under 4 draws, and under 15 goals?
CREATE TABLE table_name_86 (wins INTEGER, draws VARCHAR, goals_for VARCHAR)
SELECT score FROM table_name_46 WHERE away_team = "west ham united"
What score has west ham united as the away team?
CREATE TABLE table_name_46 (score VARCHAR, away_team VARCHAR)
SELECT COUNT(rank) FROM table_name_44 WHERE team = "250cc honda" AND time = "1:27.57.28"
What ranking did Team 250cc Honda end up in when it finished a race with a time of 1:27.57.28?
CREATE TABLE table_name_44 (rank VARCHAR, team VARCHAR, time VARCHAR)
SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code
Show the property type descriptions of properties belonging to that code.
CREATE TABLE Properties (property_type_code VARCHAR); CREATE TABLE Ref_Property_Types (property_type_description VARCHAR, property_type_code VARCHAR)
SELECT COUNT(total__number) FROM table_27155243_3 WHERE written_by = "Sheri Elwood" AND directed_by = "Jim Allodi"
How many different episode numbers does the episode written by Sheri Elwood and directed by Jim Allodi have?
CREATE TABLE table_27155243_3 (total__number VARCHAR, written_by VARCHAR, directed_by VARCHAR)
SELECT MIN(episode) FROM table_29135051_3 WHERE guest_s_ = "Sarah Millican and Grayson Perry"
which episode did sarah millican and grayson perry appear in
CREATE TABLE table_29135051_3 (episode INTEGER, guest_s_ VARCHAR)
SELECT COUNT(october) FROM table_name_41 WHERE september < 2.48 AND year > 2002 AND june > 1.42 AND february < 7.44
What is the total number in October with less than 2.48 in September, after 2002, more than 1.42 in June, and smaller than 7.44 in February?
CREATE TABLE table_name_41 (october VARCHAR, february VARCHAR, june VARCHAR, september VARCHAR, year VARCHAR)
SELECT to_par FROM table_name_56 WHERE runner_up = "ken duke"
What was the to par of the tournament that had Ken Duke as a runner-up?
CREATE TABLE table_name_56 (to_par VARCHAR, runner_up VARCHAR)
SELECT date FROM table_name_30 WHERE race_title = "grand prix de trois-rivières"
What day is the grand prix de trois-rivières?
CREATE TABLE table_name_30 (date VARCHAR, race_title VARCHAR)
SELECT replaced_by FROM table_17039232_3 WHERE outgoing_manager = "Kent Nielsen"
Name the replaced by when outgoing manager is kent nielsen
CREATE TABLE table_17039232_3 (replaced_by VARCHAR, outgoing_manager VARCHAR)
SELECT 2012 FROM table_name_62 WHERE tournament = "us open"
What was the 2012 finish in the US Open?
CREATE TABLE table_name_62 (tournament VARCHAR)
SELECT opponent FROM table_name_63 WHERE site = "war memorial stadium • little rock, ar" AND result = "l6–7"
What Opponent has a Site of war memorial stadium • little rock, ar, and a Result of l6–7?
CREATE TABLE table_name_63 (opponent VARCHAR, site VARCHAR, result VARCHAR)
SELECT surface FROM table_name_15 WHERE date = "july 26, 2010"
what is the surface on july 26, 2010?
CREATE TABLE table_name_15 (surface VARCHAR, date VARCHAR)
SELECT MIN(attendance) FROM table_name_1 WHERE date = "may 6"
Name the least attendance for may 6
CREATE TABLE table_name_1 (attendance INTEGER, date VARCHAR)
SELECT COUNT(DISTINCT school_id) FROM basketball_match
How many schools are in the basketball match?
CREATE TABLE basketball_match (school_id VARCHAR)
SELECT uk_broadcast_date FROM table_name_72 WHERE presenter = "chris bonington"
What is the UK broadcast date of the episode where Chris Bonington was the presenter?
CREATE TABLE table_name_72 (uk_broadcast_date VARCHAR, presenter VARCHAR)
SELECT crowd FROM table_name_57 WHERE away_team = "geelong"
What is the crowd size when Geelong is the away team?
CREATE TABLE table_name_57 (crowd VARCHAR, away_team VARCHAR)
SELECT date FROM table_27721131_6 WHERE high_assists = "John Wall (11)"
What is the date where john wall (11) had the high assists?
CREATE TABLE table_27721131_6 (date VARCHAR, high_assists VARCHAR)
SELECT dec___j2000__ FROM table_name_31 WHERE redshift__km__s__ = "1331 ± 3"
Which Dec. (J2000) has a Redshift (km/ s) of 1331 ± 3?
CREATE TABLE table_name_31 (dec___j2000__ VARCHAR, redshift__km__s__ VARCHAR)
SELECT pos FROM table_name_41 WHERE name = "elise norwood"
What is Elise Norwood's Pos.?
CREATE TABLE table_name_41 (pos VARCHAR, name VARCHAR)
SELECT name FROM table_name_61 WHERE position = "g" AND team = "petron blaze boosters" AND year_retired = "2000"
Who was the player in Position G on the Petron Blaze Boosters and retired in 2000?
CREATE TABLE table_name_61 (name VARCHAR, year_retired VARCHAR, position VARCHAR, team VARCHAR)
SELECT record FROM table_27882867_4 WHERE location_attendance = "Oakland-Alameda County Coliseum Arena 15,025"
Name the record for oakland-alameda county coliseum arena 15,025
CREATE TABLE table_27882867_4 (record VARCHAR, location_attendance VARCHAR)
SELECT candidates FROM table_1341690_43 WHERE district = "Texas 1"
Name the candidates for texas 1
CREATE TABLE table_1341690_43 (candidates VARCHAR, district VARCHAR)
SELECT episode_title FROM table_name_1 WHERE original_airdate = "march 31, 2008"
What is the title of the episode that originally aired on March 31, 2008?
CREATE TABLE table_name_1 (episode_title VARCHAR, original_airdate VARCHAR)
SELECT date FROM table_name_66 WHERE partner = "daniella dominikovic"
Which Date has a Partner of daniella dominikovic?
CREATE TABLE table_name_66 (date VARCHAR, partner VARCHAR)
SELECT SUM(withdrawn) FROM table_name_78 WHERE builder = "ac cars" AND introduced < 1958
when was the building withdrawn when the builder was ac cars and was introduced before 1958?
CREATE TABLE table_name_78 (withdrawn INTEGER, builder VARCHAR, introduced VARCHAR)
SELECT MIN(game) FROM table_name_96 WHERE record = "16–4–3"
What was the earliest game with a record of 16–4–3?
CREATE TABLE table_name_96 (game INTEGER, record VARCHAR)
SELECT wheelbase__mm_inch_ FROM table_20866024_3 WHERE model_designation = "97G00"
What's the wheelbase (in mm/inch) of the model with model designation 97G00?
CREATE TABLE table_20866024_3 (wheelbase__mm_inch_ VARCHAR, model_designation VARCHAR)
SELECT COUNT(week) FROM table_name_83 WHERE date = "december 5, 2005"
Tell me the number of weeks for december 5, 2005
CREATE TABLE table_name_83 (week VARCHAR, date VARCHAR)
SELECT SUM(total) FROM table_name_9 WHERE nation = "netherlands"
How many total medals for the netherlands?
CREATE TABLE table_name_9 (total INTEGER, nation VARCHAR)
SELECT label FROM table_name_45 WHERE date = "15 december 1992"
which Label is in 15 december 1992?
CREATE TABLE table_name_45 (label VARCHAR, date VARCHAR)
SELECT AVG(runs) FROM table_name_70 WHERE innings = 40 AND not_outs > 6
What's the average amount of Runs that has 40 innings, and Not outs larger than 6?
CREATE TABLE table_name_70 (runs INTEGER, innings VARCHAR, not_outs VARCHAR)
SELECT COUNT(score) FROM table_23308178_5 WHERE record = "10-3-4"
How many different scores are there for the game with 10-3-4 record?
CREATE TABLE table_23308178_5 (score VARCHAR, record VARCHAR)
SELECT home FROM table_name_14 WHERE country = "sweden"
Where in Sweden is the home of the Swedish team?
CREATE TABLE table_name_14 (home VARCHAR, country VARCHAR)
SELECT young_rider_classification FROM table_28538368_2 WHERE winner = "Alessandro Petacchi"
Who was the young rider classification when Alessandro Petacchi won?
CREATE TABLE table_28538368_2 (young_rider_classification VARCHAR, winner VARCHAR)
SELECT score FROM table_17058116_7 WHERE game = 46
What is the score of game 46
CREATE TABLE table_17058116_7 (score VARCHAR, game VARCHAR)
SELECT denomination FROM table_name_88 WHERE date_of_issue = "12 april 2005"
What's the Denomination listed for the Date of Issue 12 April 2005?
CREATE TABLE table_name_88 (denomination VARCHAR, date_of_issue VARCHAR)
SELECT COUNT(share) FROM table_17525955_2 WHERE rating / SHARE(18 AS –49) = 2.6 / 8
How many share values are listed for the episode with a rating/share value of 2.6/8?
CREATE TABLE table_17525955_2 (share VARCHAR, rating VARCHAR)
SELECT time FROM table_name_40 WHERE grid > 2 AND laps = 20 AND rider = "max biaggi"
What is the time of Max Biaggi with more than 2 grids, 20 laps?
CREATE TABLE table_name_40 (time VARCHAR, rider VARCHAR, grid VARCHAR, laps VARCHAR)
SELECT laps FROM table_name_3 WHERE driver = "fernando alonso"
How many laps did Fernando Alonso do?
CREATE TABLE table_name_3 (laps VARCHAR, driver VARCHAR)
SELECT COUNT(total) FROM table_name_73 WHERE silver = 0 AND bronze = 1 AND rank < 3
How many total show when silver is 0, bronze is 1, and the rank is less than 3?
CREATE TABLE table_name_73 (total VARCHAR, rank VARCHAR, silver VARCHAR, bronze VARCHAR)
SELECT COUNT(wins) FROM table_10420426_1 WHERE series = "GP2 series" AND team = "Racing Engineering"
What is the number of wins for gp2 series for racing engineering?
CREATE TABLE table_10420426_1 (wins VARCHAR, series VARCHAR, team VARCHAR)
SELECT year__ceremony_ FROM table_name_26 WHERE category = "best actress" AND actor_actress = "sigourney weaver"
What is the year when sigourney weaver was nominated for best actress?
CREATE TABLE table_name_26 (year__ceremony_ VARCHAR, category VARCHAR, actor_actress VARCHAR)
SELECT COUNT(tries_against) FROM table_name_48 WHERE team = "dinamo bucureşti" AND tries_for < 19
How many Tries against have a Team of dinamo bucureşti, and Tries for smaller than 19?
CREATE TABLE table_name_48 (tries_against VARCHAR, team VARCHAR, tries_for VARCHAR)
SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students
Find the common login name of course authors and students.
CREATE TABLE Course_Authors_and_Tutors (login_name VARCHAR); CREATE TABLE Students (login_name VARCHAR)
SELECT date_stored FROM All_documents WHERE Document_name = "Marry CV"
What is the date when the document "Marry CV" was stored?
CREATE TABLE All_documents (date_stored VARCHAR, Document_name VARCHAR)
SELECT COUNT(district) FROM table_1341884_20 WHERE incumbent = "Edwin E. Willis"
How many districts represented Edwin E. Willis?
CREATE TABLE table_1341884_20 (district VARCHAR, incumbent VARCHAR)
SELECT planet FROM table_name_31 WHERE sanskrit_word = "budha"
Which Planet has a Sanskrit word of budha?
CREATE TABLE table_name_31 (planet VARCHAR, sanskrit_word VARCHAR)
SELECT death FROM table_name_69 WHERE birth = "1309"
What is the date of death of the Countess of Flanders who was born in 1309?
CREATE TABLE table_name_69 (death VARCHAR, birth VARCHAR)
SELECT w_m² FROM table_name_60 WHERE η___percentage_ > 16.5 AND technology = "mj"
What is W/m², when η (%) is greater than 16.5, and when Technology is MJ?
CREATE TABLE table_name_60 (w_m² VARCHAR, η___percentage_ VARCHAR, technology VARCHAR)
SELECT COUNT(august_21_22) FROM table_25235489_2 WHERE march_27_29 = "139"
How many numbers are there for August when March is 139?
CREATE TABLE table_25235489_2 (august_21_22 VARCHAR, march_27_29 VARCHAR)
SELECT score FROM table_name_9 WHERE opponent = "@ new york knicks"
What is Score, when Opponent is "@ New York Knicks"?
CREATE TABLE table_name_9 (score VARCHAR, opponent VARCHAR)
SELECT comments FROM table_name_30 WHERE model = "18sq"
Which Comments has a Model of 18sq?
CREATE TABLE table_name_30 (comments VARCHAR, model VARCHAR)
SELECT date FROM table_name_56 WHERE city = "salford"
What day did they play in salford?
CREATE TABLE table_name_56 (date VARCHAR, city VARCHAR)
SELECT fastest_lap FROM table_26920192_5 WHERE winning_driver = "Kristian Ghedina"
Who had the fastest lap when the winning driver was kristian ghedina?
CREATE TABLE table_26920192_5 (fastest_lap VARCHAR, winning_driver VARCHAR)
SELECT week FROM table_name_48 WHERE attendance = "33,057"
Which week's game was attended by 33,057 people?
CREATE TABLE table_name_48 (week VARCHAR, attendance VARCHAR)
SELECT SUM(round) FROM table_name_40 WHERE college_junior_club_team = "brandon wheat kings ( whl )" AND player = "mike perovich (d)" AND pick < 23
What is Sum of Round, when College/Junior/Club Team is Brandon Wheat Kings ( WHL ), when Player is Mike Perovich (D), and when Pick is less than 23?
CREATE TABLE table_name_40 (round INTEGER, pick VARCHAR, college_junior_club_team VARCHAR, player VARCHAR)
SELECT film FROM table_name_18 WHERE award = "£5,380"
What is the name of the film with an award of £5,380?
CREATE TABLE table_name_18 (film VARCHAR, award VARCHAR)
SELECT entrant FROM table_name_92 WHERE year > 1991 AND chassis = "lotus 109"
Name the entrant for year more than 1991 and chassis of lotus 109
CREATE TABLE table_name_92 (entrant VARCHAR, year VARCHAR, chassis VARCHAR)
SELECT grand_finalist FROM table_1139835_3 WHERE winners = "Collingwood"
what's the grand finalist where winners is collingwood
CREATE TABLE table_1139835_3 (grand_finalist VARCHAR, winners VARCHAR)
SELECT COUNT(election_date) FROM table_26362472_1 WHERE left_office = "1850-11-15"
What is the election date for those politicians who left office on 1850-11-15?
CREATE TABLE table_26362472_1 (election_date VARCHAR, left_office VARCHAR)
SELECT manner_of_departure FROM table_18522916_5 WHERE date_of_vacancy = "25 August 2008"
Name the manner of departure for date of vacancy 25 august 2008
CREATE TABLE table_18522916_5 (manner_of_departure VARCHAR, date_of_vacancy VARCHAR)
SELECT date FROM table_name_51 WHERE status = "tour match" AND against = 22
What day was the against 22 and the status tour match?
CREATE TABLE table_name_51 (date VARCHAR, status VARCHAR, against VARCHAR)
SELECT AVG(2008) FROM table_name_56 WHERE city = "durban"
Which 2008 has a City of durban?
CREATE TABLE table_name_56 (city VARCHAR)
SELECT year FROM table_name_64 WHERE rank = "25"
Which Year has a Rank of 25?
CREATE TABLE table_name_64 (year VARCHAR, rank VARCHAR)
SELECT ihsaa_class FROM table_name_8 WHERE county = "55 morgan" AND school = "mooresville"
Name the IHSAA Class of 55 morgan and a School of mooresville?
CREATE TABLE table_name_8 (ihsaa_class VARCHAR, county VARCHAR, school VARCHAR)
SELECT premiere FROM table_28962227_1 WHERE runners_up = "Holly Bell"
What is the premiere of the season where Holly Bell was the runner-up?
CREATE TABLE table_28962227_1 (premiere VARCHAR, runners_up VARCHAR)
SELECT system FROM table_name_80 WHERE name = "mess"
Which system is named mess?
CREATE TABLE table_name_80 (system VARCHAR, name VARCHAR)
SELECT 3 AS rd_place FROM table_25058269_1 WHERE season = "2005–06"
In season 2005–06, who is 3rd place?
CREATE TABLE table_25058269_1 (season VARCHAR)
SELECT n° FROM table_15887683_8 WHERE television_service = "Fox News Channel"
Name the number for fox news channel
CREATE TABLE table_15887683_8 (n° VARCHAR, television_service VARCHAR)
SELECT part_3 FROM table_name_97 WHERE class = "7b"
Which part 3 has class 7b?
CREATE TABLE table_name_97 (part_3 VARCHAR, class VARCHAR)
SELECT runs FROM table_name_64 WHERE opponent = "west indies"
What were the runs for the opponent from the West Indies?
CREATE TABLE table_name_64 (runs VARCHAR, opponent VARCHAR)
SELECT class FROM table_name_48 WHERE wheel_arrangement = "2-8-2" AND quantity_made = "25"
What is the locomotive class that has a wheel arrangement of 2-8-2 and a quantity made of 25?
CREATE TABLE table_name_48 (class VARCHAR, wheel_arrangement VARCHAR, quantity_made VARCHAR)
SELECT date FROM table_name_93 WHERE catalog = "ft 507"
On what date was the Catalog FT 507?
CREATE TABLE table_name_93 (date VARCHAR, catalog VARCHAR)
SELECT MAX(series) FROM table_name_94 WHERE premiere = "29 october 1990" AND episodes > 6
Which season premiered on 29 October 1990 and had more than 6 episodes?
CREATE TABLE table_name_94 (series INTEGER, premiere VARCHAR, episodes VARCHAR)
SELECT DISTINCT location_code FROM Document_locations
What are the different location codes for documents?
CREATE TABLE Document_locations (location_code VARCHAR)
SELECT score FROM table_name_82 WHERE date = "6 june 2010"
what was the score on 6 june 2010?
CREATE TABLE table_name_82 (score VARCHAR, date VARCHAR)
SELECT COUNT(result) FROM table_1341395_22 WHERE incumbent = "Mike Capuano"
How many times was the incumbent mike capuano
CREATE TABLE table_1341395_22 (result VARCHAR, incumbent VARCHAR)
SELECT game FROM table_name_33 WHERE platform_s_ = "playstation 3" AND genre = "platform game"
What game has a platform(s) of playstation 3, when the genre is platform game?
CREATE TABLE table_name_33 (game VARCHAR, platform_s_ VARCHAR, genre VARCHAR)
SELECT total_points FROM table_27496841_3 WHERE place = 2
Name the total points for 2
CREATE TABLE table_27496841_3 (total_points VARCHAR, place VARCHAR)
SELECT launch_date FROM table_name_80 WHERE cospar_id = "1967-042a"
When was the satellite that has a COSPAR ID of 1967-042a launched?
CREATE TABLE table_name_80 (launch_date VARCHAR, cospar_id VARCHAR)
SELECT episode__number FROM table_10269427_3 WHERE production_code = 227
what is the episode # for production code 227
CREATE TABLE table_10269427_3 (episode__number VARCHAR, production_code VARCHAR)
SELECT area FROM table_name_67 WHERE decile = 4 AND name = "spring creek school"
What was Spring Creek School's area when the decile was 4?
CREATE TABLE table_name_67 (area VARCHAR, decile VARCHAR, name VARCHAR)
SELECT class_a FROM table_name_59 WHERE school_year = "2004-05"
Name the class A with school year of 2004-05
CREATE TABLE table_name_59 (class_a VARCHAR, school_year VARCHAR)
SELECT SUM(worst_score) FROM table_name_23 WHERE best_dancer = "apolo anton ohno" AND best_score > 30
What is the worst score for the dance that has Apolo Anton Ohno as the best dancer, and where his best score is larger than 30?
CREATE TABLE table_name_23 (worst_score INTEGER, best_dancer VARCHAR, best_score VARCHAR)
SELECT position FROM table_name_34 WHERE school_club_team = "mcmaster"
What is Position, when School/Club Team is McMaster?
CREATE TABLE table_name_34 (position VARCHAR, school_club_team VARCHAR)
SELECT date FROM table_name_9 WHERE home_team = "essendon"
What was the date when the home team was Essendon?
CREATE TABLE table_name_9 (date VARCHAR, home_team VARCHAR)
SELECT COUNT(democratic_votes) FROM table_name_21 WHERE other_votes < 18 AND _percentage_of_r_votes = "52.63% ANd_votes_since_1856 < 38"
Name the total number of democratic votes when the other votes are less than 18 and the percentage of R votes are 52.63% and votes since 1856 less than 38
CREATE TABLE table_name_21 (democratic_votes VARCHAR, other_votes VARCHAR, _percentage_of_r_votes VARCHAR)
SELECT AVG(silver) FROM table_name_62 WHERE bronze > 1
What is the average number of silvers for nations with over 1 bronze medal?
CREATE TABLE table_name_62 (silver INTEGER, bronze INTEGER)
SELECT date FROM table_11621915_1 WHERE tournament = "Ford Senior Players Championship"
what's the date with tournament value of ford senior players championship
CREATE TABLE table_11621915_1 (date VARCHAR, tournament VARCHAR)
SELECT seat_of_administration FROM table_16278602_1 WHERE largest_city = "Roskilde"
In the region where Roskilde is the largest city, what is the seat of administration?
CREATE TABLE table_16278602_1 (seat_of_administration VARCHAR, largest_city VARCHAR)
SELECT icao FROM table_name_54 WHERE city = "ningbo"
What is the ICAO for the airport in Ningbo?
CREATE TABLE table_name_54 (icao VARCHAR, city VARCHAR)
SELECT MIN(nanquan) FROM table_name_40 WHERE rank > 2 AND total < 18.36 AND nangun < 8.85
WHAT IS THE LOWEST NANQUAN WITH A RANK BIGGER THAN 2, TOTAL LESS THAN 18.36 AND SMALLER THAN 8.85?
CREATE TABLE table_name_40 (nanquan INTEGER, nangun VARCHAR, rank VARCHAR, total VARCHAR)
SELECT MAX(ratio) FROM table_name_85 WHERE ordinary_value = "84 zolotnik"
What is the largest ration with an ordinary value of 84 zolotnik?
CREATE TABLE table_name_85 (ratio INTEGER, ordinary_value VARCHAR)
SELECT COUNT(finale) FROM table_19210674_1 WHERE english_title = "Beyond the Realm of Conscience"
How many different finales had the English title "Beyond the Realm of Conscience"?
CREATE TABLE table_19210674_1 (finale VARCHAR, english_title VARCHAR)
SELECT AVG(innhabitants) FROM table_name_51 WHERE party = "krf"
How many people does the KRF Party preside over?
CREATE TABLE table_name_51 (innhabitants INTEGER, party VARCHAR)
SELECT COUNT(*) FROM railway
How many railways are there?
CREATE TABLE railway (Id VARCHAR)
SELECT directed_by FROM table_2468961_7 WHERE no_in_series = 123
When 123 is the number in series who is the director?
CREATE TABLE table_2468961_7 (directed_by VARCHAR, no_in_series VARCHAR)
SELECT finish FROM table_name_8 WHERE wins = "28"
What is the Finish of 28 Wins?
CREATE TABLE table_name_8 (finish VARCHAR, wins VARCHAR)
SELECT title FROM table_name_37 WHERE winner = "suntory sungoliath" AND season = "2011-12 details"
What is the Title when the winner was suntory sungoliath, and a Season of 2011-12 details?
CREATE TABLE table_name_37 (title VARCHAR, winner VARCHAR, season VARCHAR)