answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT product_category, COUNT(*) FROM mailshot_campaigns GROUP BY product_category
Show all distinct product categories along with the number of mailshots in each category.
CREATE TABLE mailshot_campaigns (product_category VARCHAR)
SELECT AVG(change) FROM table_name_31 WHERE centre = "buenos aires" AND rank < 46
Which Change is the average one that has a Centre of buenos aires, and a Rank smaller than 46?
CREATE TABLE table_name_31 (change INTEGER, centre VARCHAR, rank VARCHAR)
SELECT COUNT(vault) FROM table_18662026_1 WHERE rings = "60.000"
If the rings number is 60.000, what is the number for the vault?
CREATE TABLE table_18662026_1 (vault VARCHAR, rings VARCHAR)
SELECT player FROM table_name_77 WHERE position = "wide receiver" AND round = 7
Which player is a wide receiver picked in round 7?
CREATE TABLE table_name_77 (player VARCHAR, position VARCHAR, round VARCHAR)
SELECT listed FROM table_name_93 WHERE borough = "valdez-cordova (census area)"
What are the listings in the Valdez-cordova (census area) Borough?
CREATE TABLE table_name_93 (listed VARCHAR, borough VARCHAR)
SELECT state FROM table_name_43 WHERE team = "mumbai"
What is the state of the team who plays in Mumbai?
CREATE TABLE table_name_43 (state VARCHAR, team VARCHAR)
SELECT leading_lady FROM table_name_10 WHERE title = "a yank in the r.a.f."
Who is the leading lady in a yank in the r.a.f.?
CREATE TABLE table_name_10 (leading_lady VARCHAR, title VARCHAR)
SELECT primary_sponsor_s_ FROM table_1529793_1 WHERE driver_s_ = "Jason Leffler"
Who is Jason Leffler's primary sponsor?
CREATE TABLE table_1529793_1 (primary_sponsor_s_ VARCHAR, driver_s_ VARCHAR)
SELECT assist_pass FROM table_name_85 WHERE score = "1-0" AND goal = "5"
Which Assist/pass has a Score of 1-0, and a Goal of 5?
CREATE TABLE table_name_85 (assist_pass VARCHAR, score VARCHAR, goal VARCHAR)
SELECT vehicle FROM table_name_87 WHERE class = "car" AND year > 2009 AND stages_won = "0" AND position = "5"
Which vehicle had a class of car in years after 2009 with 0 stages won and position of 5?
CREATE TABLE table_name_87 (vehicle VARCHAR, position VARCHAR, stages_won VARCHAR, class VARCHAR, year VARCHAR)
SELECT language FROM table_1930857_1 WHERE grades = "4-12"
What's the language in the school teaching grades 4-12?
CREATE TABLE table_1930857_1 (language VARCHAR, grades VARCHAR)
SELECT _percentage_buddhist FROM table_name_39 WHERE population = "~2.6 million (2.6million)"
What is the percentage of Buddhist when the Population is ~2.6 million (2.6million)?
CREATE TABLE table_name_39 (_percentage_buddhist VARCHAR, population VARCHAR)
SELECT payment FROM table_name_31 WHERE type = "2d" AND release_date = "january 2003"
Which Payment has a Type of 2d, and a Release date of january 2003?
CREATE TABLE table_name_31 (payment VARCHAR, type VARCHAR, release_date VARCHAR)
SELECT COUNT(population__hervey_bay_) FROM table_name_94 WHERE population__woocoo_ < 640 AND population__maryborough_ < 19 OFFSET 257
Name the total number of population hervey bay with population woocoo less than 640 and population of maryborough less than 19,257
CREATE TABLE table_name_94 (population__hervey_bay_ VARCHAR, population__woocoo_ VARCHAR, population__maryborough_ VARCHAR)
SELECT result FROM table_1342249_42 WHERE incumbent = "Jere Cooper"
How many results have Jere Cooper as incumbent?
CREATE TABLE table_1342249_42 (result VARCHAR, incumbent VARCHAR)
SELECT methyl_red FROM table_name_77 WHERE species = "proteus mirabilis"
What is the methyl red reading for proteus mirabilis?
CREATE TABLE table_name_77 (methyl_red VARCHAR, species VARCHAR)
SELECT venue FROM table_name_38 WHERE date = "2001-05-05"
What is the Venue of the Competition on 2001-05-05?
CREATE TABLE table_name_38 (venue VARCHAR, date VARCHAR)
SELECT league FROM table_15475116_1 WHERE nickname = "Cavaliers"
What league does the team with the nickname Cavaliers belong to
CREATE TABLE table_15475116_1 (league VARCHAR, nickname VARCHAR)
SELECT player FROM table_name_16 WHERE position = "lock" AND caps = 1
What player is a lock with 1 cap?
CREATE TABLE table_name_16 (player VARCHAR, position VARCHAR, caps VARCHAR)
SELECT AVG(attendance) FROM table_name_39 WHERE opponent = "at atlanta falcons"
What was the average attendance for games played at Atlanta Falcons?
CREATE TABLE table_name_39 (attendance INTEGER, opponent VARCHAR)
SELECT title FROM table_name_65 WHERE original_airdate = "february 2, 2008"
What is the title of the episode originally aired on February 2, 2008?
CREATE TABLE table_name_65 (title VARCHAR, original_airdate VARCHAR)
SELECT race_2 FROM table_name_2 WHERE driver = "john faulkner"
What is Race 2, when Driver is John Faulkner?
CREATE TABLE table_name_2 (race_2 VARCHAR, driver VARCHAR)
SELECT home_team AS score FROM table_name_71 WHERE away_team = "melbourne"
Which home team score has an Away team of melbourne?
CREATE TABLE table_name_71 (home_team VARCHAR, away_team VARCHAR)
SELECT opponent FROM table_name_94 WHERE event = "sengoku 1"
Which Opponent has the Event of Sengoku 1?
CREATE TABLE table_name_94 (opponent VARCHAR, event VARCHAR)
SELECT Injured FROM perpetrator ORDER BY Injured
List the number of people injured by perpetrators in ascending order.
CREATE TABLE perpetrator (Injured VARCHAR)
SELECT date FROM table_name_65 WHERE away_team = "carlton"
What was the date when the away team was Carlton?
CREATE TABLE table_name_65 (date VARCHAR, away_team VARCHAR)
SELECT minor_version FROM table_24257833_4 WHERE release_date = "April 16, 2008"
What was the minor version released on April 16, 2008?
CREATE TABLE table_24257833_4 (minor_version VARCHAR, release_date VARCHAR)
SELECT tonnage__grt_ FROM table_name_15 WHERE name = "eldena"
What is the tonnage of the Eldena?
CREATE TABLE table_name_15 (tonnage__grt_ VARCHAR, name VARCHAR)
SELECT poor_law_union FROM table_30121046_1 WHERE townland = "Kilmaloda"
What is the poor law union of the Kilmaloda townland?
CREATE TABLE table_30121046_1 (poor_law_union VARCHAR, townland VARCHAR)
SELECT AVG(year) FROM table_name_92 WHERE returned_on = "march 10, 2013"
Which Year has a Returned On of march 10, 2013?
CREATE TABLE table_name_92 (year INTEGER, returned_on VARCHAR)
SELECT mens_singles FROM table_14903491_1 WHERE mixed_doubles = "Jeliazko Valkov Dobrinka Peneva"
Name the mens singles for jeliazko valkov dobrinka peneva
CREATE TABLE table_14903491_1 (mens_singles VARCHAR, mixed_doubles VARCHAR)
SELECT actor_in_moscow, _2007 FROM table_name_91 WHERE voyage = "varenka bakunin"
Who was the 2007 actor from Moscow for the voyage of Varenka Bakunin?
CREATE TABLE table_name_91 (actor_in_moscow VARCHAR, _2007 VARCHAR, voyage VARCHAR)
SELECT reason_for_change FROM table_1694505_4 WHERE district = "Wisconsin 2nd"
In the district Wisconsin 2nd, what was the reason for change?
CREATE TABLE table_1694505_4 (reason_for_change VARCHAR, district VARCHAR)
SELECT MIN(place) FROM table_26375386_28 WHERE couple = "Keiron & Brianne"
What is the least place when the couple is Keiron & Brianne?
CREATE TABLE table_26375386_28 (place INTEGER, couple VARCHAR)
SELECT MAX(stage) FROM table_28298471_14 WHERE winner = "Svein Tuft"
When svein tuft is the winner what is the highest stage?
CREATE TABLE table_28298471_14 (stage INTEGER, winner VARCHAR)
SELECT third_place FROM table_16331144_1 WHERE season = "Four"
Who won third place in season four?
CREATE TABLE table_16331144_1 (third_place VARCHAR, season VARCHAR)
SELECT first_aired FROM table_name_86 WHERE money_requested__£_ > 85 OFFSET 000
Name the first aired with money requested more than 85,000
CREATE TABLE table_name_86 (first_aired VARCHAR, money_requested__£_ INTEGER)
SELECT weight__kg_ FROM table_name_44 WHERE name = "john-michael liles"
What is the weight of John-Michael Liles?
CREATE TABLE table_name_44 (weight__kg_ VARCHAR, name VARCHAR)
SELECT MAX(death_2013) FROM table_25703_1 WHERE death_2012 = "12,7"
What is the highest death/2013 when the death/2012 is 12,7?
CREATE TABLE table_25703_1 (death_2013 INTEGER, death_2012 VARCHAR)
SELECT date FROM table_name_9 WHERE opponent = "adrián menéndez-maceiras"
What date was the match against adrián menéndez-maceiras?
CREATE TABLE table_name_9 (date VARCHAR, opponent VARCHAR)
SELECT COUNT(height) FROM table_20872722_1 WHERE position = "Cornerback"
What is the height of the cornerback position?
CREATE TABLE table_20872722_1 (height VARCHAR, position VARCHAR)
SELECT incumbent FROM table_name_82 WHERE result = "retired to run for the senate democratic hold"
Who was the incumbent that retired to run for the senate democratic hold?
CREATE TABLE table_name_82 (incumbent VARCHAR, result VARCHAR)
SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC
Please show different denominations and the corresponding number of schools in descending order.
CREATE TABLE school (Denomination VARCHAR)
SELECT district FROM table_27021001_1 WHERE incumbent = "Charlie Norwood"
What is the district with the incumbent Charlie Norwood?
CREATE TABLE table_27021001_1 (district VARCHAR, incumbent VARCHAR)
SELECT location FROM table_name_99 WHERE ihsaa_football_class = "aa" AND school = "winchester community"
Winchester Community school, which plays IHSAA class AA football, is located where?
CREATE TABLE table_name_99 (location VARCHAR, ihsaa_football_class VARCHAR, school VARCHAR)
SELECT selection_show FROM table_name_86 WHERE semi_final_heat_host = "no semi final/heat" AND year_s_ = "1969"
What is the selection show in 1969 when the Semi final/heat host shows there was no semi final/heat.
CREATE TABLE table_name_86 (selection_show VARCHAR, semi_final_heat_host VARCHAR, year_s_ VARCHAR)
SELECT home_team FROM table_name_74 WHERE venue = "junction oval"
What team was the home team at the venue junction oval?
CREATE TABLE table_name_74 (home_team VARCHAR, venue VARCHAR)
SELECT couple FROM table_19744915_15 WHERE vote_percentage = "7.691%"
What couple had a vote percentage of 7.691%
CREATE TABLE table_19744915_15 (couple VARCHAR, vote_percentage VARCHAR)
SELECT class FROM table_name_34 WHERE part_4 = "*buranaz"
Which class has *buranaz as Part 4?
CREATE TABLE table_name_34 (class VARCHAR, part_4 VARCHAR)
SELECT method FROM table_name_1 WHERE record = "4-2"
Tell me the method with a record of 4-2
CREATE TABLE table_name_1 (method VARCHAR, record VARCHAR)
SELECT home FROM table_name_27 WHERE attendance = 3305
Who was the home team with 3305 in attendance?
CREATE TABLE table_name_27 (home VARCHAR, attendance VARCHAR)
SELECT 1 AS st_leg FROM table_name_10 WHERE team__number2 = "antwerp bc"
Tell me the 1st leg for antwerp bc
CREATE TABLE table_name_10 (team__number2 VARCHAR)
SELECT venue FROM table_name_57 WHERE date = "20,21,22,23,24 november 1998"
Which venue has a Date of 20,21,22,23,24 november 1998?
CREATE TABLE table_name_57 (venue VARCHAR, date VARCHAR)
SELECT finalist FROM table_name_14 WHERE week = "may 7"
What is the May 7 finalist?
CREATE TABLE table_name_14 (finalist VARCHAR, week VARCHAR)
SELECT AVG(age) FROM visitor WHERE Level_of_membership <= 4
What is the average age of the visitors whose membership level is not higher than 4?
CREATE TABLE visitor (age INTEGER, Level_of_membership VARCHAR)
SELECT sspec_number FROM table_name_52 WHERE frequency = "1ghz"
What is the sSpec Number of the model with a 1ghz frequency?
CREATE TABLE table_name_52 (sspec_number VARCHAR, frequency VARCHAR)
SELECT make FROM table_name_58 WHERE pos = 3
Which Make has a Pos of 3?
CREATE TABLE table_name_58 (make VARCHAR, pos VARCHAR)
SELECT quantity FROM table_name_65 WHERE model = "pg-2901"
What is the Quantity of the engine Model PG-2901?
CREATE TABLE table_name_65 (quantity VARCHAR, model VARCHAR)
SELECT class FROM table_name_45 WHERE city_of_license = "black mountain, north carolina"
What class is the city of black mountain, north carolina?
CREATE TABLE table_name_45 (class VARCHAR, city_of_license VARCHAR)
SELECT competition FROM table_name_56 WHERE date = "december 25, 1925"
Who played on December 25, 1925?
CREATE TABLE table_name_56 (competition VARCHAR, date VARCHAR)
SELECT date FROM table_name_8 WHERE game_site = "invesco field"
What was the date of the game held at Invesco Field?
CREATE TABLE table_name_8 (date VARCHAR, game_site VARCHAR)
SELECT crowd FROM table_name_77 WHERE venue = "junction oval"
How many people attended the game at Junction Oval?
CREATE TABLE table_name_77 (crowd VARCHAR, venue VARCHAR)
SELECT date FROM table_name_65 WHERE location = "north carolina" AND tournament = "kmart greater greensboro open"
What is the date of the Kmart greater greensboro open in North Carolina?
CREATE TABLE table_name_65 (date VARCHAR, location VARCHAR, tournament VARCHAR)
SELECT date_of_appointment FROM table_18788823_5 WHERE team = "Milton Keynes Dons"
What date did the Milton Keynes Dons appoint?
CREATE TABLE table_18788823_5 (date_of_appointment VARCHAR, team VARCHAR)
SELECT cover_model FROM table_1566848_7 WHERE date = "7-86"
Who was the cover model in the 7-86 issue?
CREATE TABLE table_1566848_7 (cover_model VARCHAR, date VARCHAR)
SELECT kinka_pre_release FROM table_name_45 WHERE kinka_developer = "no"
What is the pre-release when the developer is no?
CREATE TABLE table_name_45 (kinka_pre_release VARCHAR, kinka_developer VARCHAR)
SELECT MIN(rank) FROM table_name_77 WHERE country = "guam"
What is the lowest Rank for a Guam Player?
CREATE TABLE table_name_77 (rank INTEGER, country VARCHAR)
SELECT callsign FROM table_24418525_1 WHERE coverage = "Dumaguete Central Visayas Region"
when coverage is dumaguete central visayas region, what is the callsign?
CREATE TABLE table_24418525_1 (callsign VARCHAR, coverage VARCHAR)
SELECT certification FROM table_name_88 WHERE album = "closer: the best of sarah mclachlan"
What was the album Closer: The Best of Sarah Mclachlan certified as?
CREATE TABLE table_name_88 (certification VARCHAR, album VARCHAR)
SELECT MIN(avg_finish) FROM table_name_70 WHERE position = "40th" AND top_5 > 0
WHAT IS THE LOWEST AVERAGE FINISH FOR 40TH POSITION, WITH A TOP 5 LARGER THAN 0?
CREATE TABLE table_name_70 (avg_finish INTEGER, position VARCHAR, top_5 VARCHAR)
SELECT base FROM table_name_2 WHERE name = ".44 wcf"
Which Base has a Name of .44 wcf?
CREATE TABLE table_name_2 (base VARCHAR, name VARCHAR)
SELECT AVG(top_5) FROM table_name_79 WHERE cuts_made = 42
What is the average for the top five having a number of 42 cuts made.
CREATE TABLE table_name_79 (top_5 INTEGER, cuts_made VARCHAR)
SELECT the_wørd FROM table_25691838_12 WHERE guest = "Daniel Ellsberg , William Wegman , Julie Taymor"
What is "the wørd" when guests were daniel ellsberg , william wegman , julie taymor?
CREATE TABLE table_25691838_12 (the_wørd VARCHAR, guest VARCHAR)
SELECT elected FROM table_27021001_1 WHERE incumbent = "Cynthia McKinney"
What is the year elected for incumbent Cynthia Mckinney?
CREATE TABLE table_27021001_1 (elected VARCHAR, incumbent VARCHAR)
SELECT date FROM table_name_35 WHERE home_team = "south melbourne"
What day is south melbourne at home?
CREATE TABLE table_name_35 (date VARCHAR, home_team VARCHAR)
SELECT method FROM table_name_36 WHERE time = "5:00" AND opponent = "adriano martins"
What method had Adriano Martins as an opponent and a time of 5:00?
CREATE TABLE table_name_36 (method VARCHAR, time VARCHAR, opponent VARCHAR)
SELECT Name FROM member WHERE Country = "United States" OR Country = "Canada"
Show the names of members whose country is "United States" or "Canada".
CREATE TABLE member (Name VARCHAR, Country VARCHAR)
SELECT authority FROM table_name_43 WHERE decile < 6 AND roll < 65
tell me the authority that has a decile less than 6 and roll less than 65.
CREATE TABLE table_name_43 (authority VARCHAR, decile VARCHAR, roll VARCHAR)
SELECT COUNT(type) FROM table_261895_1 WHERE nickname = "Britons"
how many categories fall under the category of britons?
CREATE TABLE table_261895_1 (type VARCHAR, nickname VARCHAR)
SELECT agg FROM table_name_38 WHERE team_2 = "vantour club mangoungou"
What is the agg of team 2 for Vantour Club Mangoungou?
CREATE TABLE table_name_38 (agg VARCHAR, team_2 VARCHAR)
SELECT team_1 FROM table_18733480_1 WHERE team_2 = "Chalkheads"
Who was team 1 when the chalkheads were team 2?
CREATE TABLE table_18733480_1 (team_1 VARCHAR, team_2 VARCHAR)
SELECT MAX(seats) FROM table_name_61 WHERE share_of_votes = "45.3%" AND total_seats < 166
with shares of 45.3% and total seats less than 166. what is the greatest number of seat?
CREATE TABLE table_name_61 (seats INTEGER, share_of_votes VARCHAR, total_seats VARCHAR)
SELECT date FROM table_name_82 WHERE label = "sony bmg, epic" AND catalog = "5187482"
What is the date of the item with a label of Sony BMG, Epic and a Catalog number 5187482?
CREATE TABLE table_name_82 (date VARCHAR, label VARCHAR, catalog VARCHAR)
SELECT years FROM table_name_62 WHERE goals = 27
For the player that scored 27 goals, what years did he score them?
CREATE TABLE table_name_62 (years VARCHAR, goals VARCHAR)
SELECT SUM(silver) FROM table_name_29 WHERE rank = "1" AND bronze < 3
How much Silver has a Rank of 1, and a Bronze smaller than 3?
CREATE TABLE table_name_29 (silver INTEGER, rank VARCHAR, bronze VARCHAR)
SELECT date FROM table_name_47 WHERE man_of_the_match = "stuart potts"
On what date was Stuart Potts the Man of the Match?
CREATE TABLE table_name_47 (date VARCHAR, man_of_the_match VARCHAR)
SELECT date FROM table_name_28 WHERE competition = "f" AND opponents = "fc astoria walldorf"
What is Date, when Competition is "F", and when Opponents is "FC Astoria Walldorf"?
CREATE TABLE table_name_28 (date VARCHAR, competition VARCHAR, opponents VARCHAR)
SELECT SUM(grid) FROM table_name_12 WHERE time_retired = "+58.182" AND laps < 67
What is the total grid number where the time/retired is +58.182 and the lap number is less than 67?
CREATE TABLE table_name_12 (grid INTEGER, time_retired VARCHAR, laps VARCHAR)
SELECT COUNT(fourth_place) FROM table_29446183_2 WHERE winner = "Otsuka Pharmaceuticals"
How many teams came in fourth when Otsuka Pharmaceuticals won?
CREATE TABLE table_29446183_2 (fourth_place VARCHAR, winner VARCHAR)
SELECT COUNT(*), LOCATION FROM shop GROUP BY LOCATION
Find the number of shops in each location.
CREATE TABLE shop (LOCATION VARCHAR)
SELECT COUNT(no_in_series) FROM table_2618119_1 WHERE no_in_season = 8
How many numbers in series were for the number in season of 8?
CREATE TABLE table_2618119_1 (no_in_series VARCHAR, no_in_season VARCHAR)
SELECT MAX(_number) FROM table_24649082_1 WHERE written_by = "Matthew Pitts"
What is the most recent episode number written by Matthew Pitts?
CREATE TABLE table_24649082_1 (_number INTEGER, written_by VARCHAR)
SELECT lineup FROM table_name_95 WHERE location = "usa virginia beach"
Which lineup has a Location of usa virginia beach?
CREATE TABLE table_name_95 (lineup VARCHAR, location VARCHAR)
SELECT COUNT(senior__4th_year_) FROM table_13967239_2 WHERE junior__3rd_year_ = "World History"
How many classes between senior and junior year for world history
CREATE TABLE table_13967239_2 (senior__4th_year_ VARCHAR, junior__3rd_year_ VARCHAR)
SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year
Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year.
CREATE TABLE Movie (mID VARCHAR, year VARCHAR); CREATE TABLE Rating (mID VARCHAR, stars VARCHAR)
SELECT elevation_ft FROM table_27435931_1 WHERE continent = "South America"
what is the elevation of south america?
CREATE TABLE table_27435931_1 (elevation_ft VARCHAR, continent VARCHAR)
SELECT COUNT(lost) FROM table_name_61 WHERE drawn > 1 AND points < 14 AND against > 10
How much Lost has a Drawn larger than 1, and Points smaller than 14, and an Against larger than 10?
CREATE TABLE table_name_61 (lost VARCHAR, against VARCHAR, drawn VARCHAR, points VARCHAR)
SELECT music FROM table_name_23 WHERE year = 1962
What music is in the film before 1962?
CREATE TABLE table_name_23 (music VARCHAR, year VARCHAR)
SELECT circuit FROM table_name_20 WHERE winning_constructor = "bugatti" AND winning_driver = "edward bret"
What Circuit has a Winning constructor of bugatti, and a Winning driver of edward bret?
CREATE TABLE table_name_20 (circuit VARCHAR, winning_constructor VARCHAR, winning_driver VARCHAR)
SELECT team AS Captain FROM table_name_91 WHERE head_coach = "felix magath"
For the team led by head coach Felix Magath, who is the team captain?
CREATE TABLE table_name_91 (team VARCHAR, head_coach VARCHAR)