answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT seats FROM table_name_86 WHERE outcome_of_election = "minority in parliament" AND number_of_pnc_votes = "186,226"
How many seats does the election with the outcome of election of minority in parliament and 186,226 PNC votes have?
CREATE TABLE table_name_86 (seats VARCHAR, outcome_of_election VARCHAR, number_of_pnc_votes VARCHAR)
SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT MAX(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')
What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?
CREATE TABLE Staff_Department_Assignments (staff_id VARCHAR, date_assigned_to INTEGER, job_title_code VARCHAR)
SELECT loss FROM table_name_85 WHERE date = "may 25"
Who took the loss on May 25?
CREATE TABLE table_name_85 (loss VARCHAR, date VARCHAR)
SELECT COUNT(year) FROM table_13012165_1 WHERE maryland = "Easton LL Easton"
In what year did Easton LL Easton play in Maryland?
CREATE TABLE table_13012165_1 (year VARCHAR, maryland VARCHAR)
SELECT country FROM table_name_90 WHERE wins > 2 AND rank = 2 AND name = "federico bahamontes"
Which Country has Wins larger than 2, and a Rank of 2, and a Name of federico bahamontes?
CREATE TABLE table_name_90 (country VARCHAR, name VARCHAR, wins VARCHAR, rank VARCHAR)
SELECT hometown FROM table_name_83 WHERE sport = "basketball" AND winner = "dwight howard"
What is Hometown, when Sport is "Basketball", and when Winner is "Dwight Howard"?
CREATE TABLE table_name_83 (hometown VARCHAR, sport VARCHAR, winner VARCHAR)
SELECT employee__real_name_ FROM table_26397277_3 WHERE brand__from_ = "Raw" AND role_s_ = "Superstar"
Name the employee real name for raw and superstar
CREATE TABLE table_26397277_3 (employee__real_name_ VARCHAR, brand__from_ VARCHAR, role_s_ VARCHAR)
SELECT callsign FROM table_name_66 WHERE frequency = 1300
What callsign has 1300 as the frequency?
CREATE TABLE table_name_66 (callsign VARCHAR, frequency VARCHAR)
SELECT result FROM table_name_3 WHERE competition = "uncaf nations cup 2009" AND goal = 6
Name the result for uncaf nations cup 2009 and 6 goal
CREATE TABLE table_name_3 (result VARCHAR, competition VARCHAR, goal VARCHAR)
SELECT location FROM table_name_45 WHERE rank > 8 AND date = "22 july 2011"
Which location had a race that took place on 22 July 2011 and has a rank greater than 8?
CREATE TABLE table_name_45 (location VARCHAR, rank VARCHAR, date VARCHAR)
SELECT MIN(1985 AS _1986) FROM table_name_33 WHERE total_points = 124
What is the lowest total for 1985-1986 when the total points are 124?
CREATE TABLE table_name_33 (total_points VARCHAR)
SELECT COUNT(crowd) FROM table_name_80 WHERE away_team = "footscray"
What was the attendance when Footscray played as the away team?
CREATE TABLE table_name_80 (crowd VARCHAR, away_team VARCHAR)
SELECT hometown FROM table_name_35 WHERE college = "ohio state"
What is the hometown of the player who attended Ohio State?
CREATE TABLE table_name_35 (hometown VARCHAR, college VARCHAR)
SELECT SUM(alianza_wins) FROM table_name_97 WHERE alianza_goals = 317 AND u_goals > 296
What is the sum of Alianza Wins, when Alianza Goals is "317, and when U Goals is greater than 296?
CREATE TABLE table_name_97 (alianza_wins INTEGER, alianza_goals VARCHAR, u_goals VARCHAR)
SELECT years_produced FROM table_26352332_4 WHERE engine_family = "MaxxForce 11"
For the engine family MaxxForce 11, what is the years produced?
CREATE TABLE table_26352332_4 (years_produced VARCHAR, engine_family VARCHAR)
SELECT MIN(played) FROM table_name_59 WHERE wins > 15 AND goals_against < 42
What is the lowest number played of the club with more than 15 wins and less than 42 goals against?
CREATE TABLE table_name_59 (played INTEGER, wins VARCHAR, goals_against VARCHAR)
SELECT 2004 FROM table_name_10 WHERE 2011 = "q1"
What is the 2004 tournament that has a Q1 of 2011?
CREATE TABLE table_name_10 (Id VARCHAR)
SELECT place FROM table_name_46 WHERE country = "australia"
What is the place of Australia?
CREATE TABLE table_name_46 (place VARCHAR, country VARCHAR)
SELECT constituency_number FROM table_name_37 WHERE district = "bhiwani"
Bhiwani district have what constituency number?
CREATE TABLE table_name_37 (constituency_number VARCHAR, district VARCHAR)
SELECT margin_of_victory FROM table_name_37 WHERE make = "dodge intrepid"
What is the margin of victory of the Dodge Intrepid?
CREATE TABLE table_name_37 (margin_of_victory VARCHAR, make VARCHAR)
SELECT replaced_by FROM table_22297198_3 WHERE date_of_vacancy = "12 Dec 2009"
Who was the replacement manager for the vacancy of 12 Dec 2009?
CREATE TABLE table_22297198_3 (replaced_by VARCHAR, date_of_vacancy VARCHAR)
SELECT sales_breakdown FROM table_21458142_1 WHERE publisher = "Nintendo" AND release_date = "May 15, 2006"
What's the sales breakdown of the Nintendo game released on May 15, 2006?
CREATE TABLE table_21458142_1 (sales_breakdown VARCHAR, publisher VARCHAR, release_date VARCHAR)
SELECT MAX(points) FROM table_name_64 WHERE game < 43 AND january > 8
Which Points is the highest one that has a Game smaller than 43, and a January larger than 8?
CREATE TABLE table_name_64 (points INTEGER, game VARCHAR, january VARCHAR)
SELECT written_by FROM table_12419515_4 WHERE total_viewers__in_millions_ = "1.211"
Who wrote the title that received 1.211 million total viewers?
CREATE TABLE table_12419515_4 (written_by VARCHAR, total_viewers__in_millions_ VARCHAR)
SELECT margin_of_victory FROM table_name_39 WHERE tournament = "semgroup championship"
What is the margin of victory in a semgroup championship?
CREATE TABLE table_name_39 (margin_of_victory VARCHAR, tournament VARCHAR)
SELECT year FROM table_name_26 WHERE color_commentator_s_ = "jerry sichting"
Name the year for jerry sichting
CREATE TABLE table_name_26 (year VARCHAR, color_commentator_s_ VARCHAR)
SELECT winning_amount FROM table_name_51 WHERE contestant_name = "himesh reshammiya"
What winning amount has himesh reshammiya as the contestant name?
CREATE TABLE table_name_51 (winning_amount VARCHAR, contestant_name VARCHAR)
SELECT suburb FROM table_name_60 WHERE roll = 741
What is the name of the suburb with a roll of 741?
CREATE TABLE table_name_60 (suburb VARCHAR, roll VARCHAR)
SELECT player FROM table_name_84 WHERE year_s__won = "1955"
What is Player, when Year(s) Won is 1955?
CREATE TABLE table_name_84 (player VARCHAR, year_s__won VARCHAR)
SELECT party FROM table_27050336_7 WHERE delegate = "Feldman, Brian J. Brian J. Feldman"
Where delegate is feldman, brian j. brian j. feldman, please specify all the party
CREATE TABLE table_27050336_7 (party VARCHAR, delegate VARCHAR)
SELECT candidates FROM table_1342270_17 WHERE incumbent = "Noble Jones Gregory"
Who were the candidates when Noble Jones Gregory was incumbent?
CREATE TABLE table_1342270_17 (candidates VARCHAR, incumbent VARCHAR)
SELECT opponent FROM table_name_5 WHERE opponents = 16
Who is the opponent with 16 points?
CREATE TABLE table_name_5 (opponent VARCHAR, opponents VARCHAR)
SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations
Show the location code, the starting date and ending data in that location for all the documents.
CREATE TABLE Document_locations (location_code VARCHAR, date_in_location_from VARCHAR, date_in_locaton_to VARCHAR)
SELECT COUNT(*), crs_code FROM CLASS GROUP BY crs_code
How many sections does each course has?
CREATE TABLE CLASS (crs_code VARCHAR)
SELECT new_conference FROM table_name_28 WHERE team_nickname = "gauchos"
What is the new conference for the Gauchos team?
CREATE TABLE table_name_28 (new_conference VARCHAR, team_nickname VARCHAR)
SELECT intro_date FROM table_29778616_1 WHERE interface = "PCI"
What is the intro date for the interface that equals pci?
CREATE TABLE table_29778616_1 (intro_date VARCHAR, interface VARCHAR)
SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = "B"
Find the number of students that have at least one grade "B".
CREATE TABLE ENROLLED_IN (StuID VARCHAR, Grade VARCHAR)
SELECT home_team FROM table_name_17 WHERE venue = "moorabbin oval"
Who was the home team that played at Moorabbin Oval?
CREATE TABLE table_name_17 (home_team VARCHAR, venue VARCHAR)
SELECT candidates FROM table_1341577_44 WHERE incumbent = "Jack Fields"
Who were the candidates when Jack Fields was the incumbent?
CREATE TABLE table_1341577_44 (candidates VARCHAR, incumbent VARCHAR)
SELECT matches FROM table_name_77 WHERE _percentage_won = "52.38"
Which Match has the percentage won 52.38?
CREATE TABLE table_name_77 (matches VARCHAR, _percentage_won VARCHAR)
SELECT date FROM table_name_6 WHERE record = "16–16"
When is Record of 16–16 taken?
CREATE TABLE table_name_6 (date VARCHAR, record VARCHAR)
SELECT stage AS winner FROM table_name_48 WHERE year = 2013
Who was the winner in 2013?
CREATE TABLE table_name_48 (stage VARCHAR, year VARCHAR)
SELECT source FROM table_name_52 WHERE internet_explorer = "60.2%"
Which source date has an Internet Explorer usage of 60.2%?
CREATE TABLE table_name_52 (source VARCHAR, internet_explorer VARCHAR)
SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY COUNT(*) DESC LIMIT 1
What is the card type code with most number of cards?
CREATE TABLE Customers_cards (card_type_code VARCHAR)
SELECT game FROM table_name_50 WHERE points = 28 AND opponent = "tampa bay lightning"
What game has 28 points, and tampa bay lightning as the opponent?
CREATE TABLE table_name_50 (game VARCHAR, points VARCHAR, opponent VARCHAR)
SELECT date FROM table_name_4 WHERE home_team = "st kilda"
When was the game played where St Kilda was the home team?
CREATE TABLE table_name_4 (date VARCHAR, home_team VARCHAR)
SELECT player FROM table_name_93 WHERE total = 289
What player has 289 as the total?
CREATE TABLE table_name_93 (player VARCHAR, total VARCHAR)
SELECT COUNT(rank) FROM table_name_48 WHERE studio = "vestron"
What is the total number of ranks that had vestron as the studio?
CREATE TABLE table_name_48 (rank VARCHAR, studio VARCHAR)
SELECT team FROM table_name_28 WHERE manager = "david o'leary"
Which team does David O'leary manage?
CREATE TABLE table_name_28 (team VARCHAR, manager VARCHAR)
SELECT stories FROM table_name_43 WHERE rank = "14"
Which stories have a rank of 14?
CREATE TABLE table_name_43 (stories VARCHAR, rank VARCHAR)
SELECT COUNT(party) FROM table_1341423_36 WHERE district = "Oklahoma 5"
How many party were listed for district oklahoma 5?
CREATE TABLE table_1341423_36 (party VARCHAR, district VARCHAR)
SELECT method FROM table_name_86 WHERE round = "3" AND res = "loss" AND event = "juiz de fora - fight 1"
Which method had a 3 rounds, result in a loss and the Juiz de Fora - fight 1 event?
CREATE TABLE table_name_86 (method VARCHAR, event VARCHAR, round VARCHAR, res VARCHAR)
SELECT bbi FROM table_27922491_20 WHERE average = "24.50"
What was the BBI for the bowler whose average is 24.50?
CREATE TABLE table_27922491_20 (bbi VARCHAR, average VARCHAR)
SELECT frequency FROM table_name_14 WHERE format = "soft adult contemporary"
What is the frequency of the soft adult contemporary stations?
CREATE TABLE table_name_14 (frequency VARCHAR, format VARCHAR)
SELECT high_rebounds FROM table_23274514_7 WHERE record = "17-33"
Name the high rebounds for 17-33
CREATE TABLE table_23274514_7 (high_rebounds VARCHAR, record VARCHAR)
SELECT loser FROM table_name_46 WHERE winner = "new england patriots" AND location = "giants stadium" AND result = "30–28"
What is the name of the Loser when the winner was new england patriots, and a Location of giants stadium, and a Result of 30–28?
CREATE TABLE table_name_46 (loser VARCHAR, result VARCHAR, winner VARCHAR, location VARCHAR)
SELECT team_classification FROM table_22464308_2 WHERE malaysian_team_classification = "MNCF Continental Team"
Which team classification has malaysian team classification of mncf continental team?
CREATE TABLE table_22464308_2 (team_classification VARCHAR, malaysian_team_classification VARCHAR)
SELECT record FROM table_name_57 WHERE opponent = "twins" AND date = "september 25"
What was the home team's record when they played the Twins on September 25?
CREATE TABLE table_name_57 (record VARCHAR, opponent VARCHAR, date VARCHAR)
SELECT pole_position FROM table_name_10 WHERE fastest_lap = "adam christodoulou" AND circuit = "rockingham"
who had the pole position at rockingham circuit with adam christodoulou having the fastest lap?
CREATE TABLE table_name_10 (pole_position VARCHAR, fastest_lap VARCHAR, circuit VARCHAR)
SELECT MAX(w_plyf) FROM table_name_99 WHERE first_yr < 1960 AND g_plyf > 0 AND g_ > _500 < 43 AND w_l_percentage < 0.578
What is the highest w plyf with a first yr before 1960, a G plyf greater than 0, a G > .500 less than 43, and a w-l% less than 0.578?
CREATE TABLE table_name_99 (w_plyf INTEGER, w_l_percentage VARCHAR, first_yr VARCHAR, g_plyf VARCHAR, g_ VARCHAR, _500 VARCHAR)
SELECT location_attendance FROM table_27539272_7 WHERE game = 41
What was the location and attendance for game 41?
CREATE TABLE table_27539272_7 (location_attendance VARCHAR, game VARCHAR)
SELECT average_attendance_home FROM table_1816947_2 WHERE division___section = "Superettan" AND average_attendance_away = "1.889"
When the average away attendance is 1.889 in the Superettan, what's the average home attendance?
CREATE TABLE table_1816947_2 (average_attendance_home VARCHAR, division___section VARCHAR, average_attendance_away VARCHAR)
SELECT MAX(area__km²_) FROM table_1067441_1 WHERE density = "331.4"
What is the area of the place that has a population density of 331.4?
CREATE TABLE table_1067441_1 (area__km²_ INTEGER, density VARCHAR)
SELECT number_ & _name FROM table_name_72 WHERE description = "peckett 0-4-0st"
What's the number & name for the description peckett 0-4-0st?
CREATE TABLE table_name_72 (number_ VARCHAR, _name VARCHAR, description VARCHAR)
SELECT COUNT(lost_to_eventual_winner) FROM table_12444503_1 WHERE lost_to_eventual_runner_up = "ASC Jeanne d'Arc"
How many players lost to eventual winner in the season when ASC Jeanne d'Arc lost to eventual runner up?
CREATE TABLE table_12444503_1 (lost_to_eventual_winner VARCHAR, lost_to_eventual_runner_up VARCHAR)
SELECT MIN(extra_points) FROM table_name_86 WHERE player = "ross kidston" AND points < 5
Which Extra points is the lowest one that has a Player of ross kidston, and Points smaller than 5?
CREATE TABLE table_name_86 (extra_points INTEGER, player VARCHAR, points VARCHAR)
SELECT researched_at FROM table_30057479_1 WHERE geometry = "D: 25~70nm, L: 10~20 μm"
Where was d: 25~70nm, l: 10~20 μm geometry researched?
CREATE TABLE table_30057479_1 (researched_at VARCHAR, geometry VARCHAR)
SELECT SUM(crowd) FROM table_name_65 WHERE venue = "junction oval"
At Junction Oval, what is the sum of the crowd?
CREATE TABLE table_name_65 (crowd INTEGER, venue VARCHAR)
SELECT MAX(w) FROM table_29542147_2 WHERE l = 0
What is the highest W of the 0 L?
CREATE TABLE table_29542147_2 (w INTEGER, l VARCHAR)
SELECT score FROM table_name_12 WHERE player = "andy north"
What is Score, when Player is "Andy North"?
CREATE TABLE table_name_12 (score VARCHAR, player VARCHAR)
SELECT name FROM shop WHERE number_products > (SELECT AVG(number_products) FROM shop)
Find the names of stores whose number products is more than the average number of products.
CREATE TABLE shop (name VARCHAR, number_products INTEGER)
SELECT date FROM table_name_89 WHERE visitor = "toronto"
What is the date of the game with toronto as the visitor?
CREATE TABLE table_name_89 (date VARCHAR, visitor VARCHAR)
SELECT 2008 FROM table_name_20 WHERE 2012 = "a" AND tournament = "australian open"
Name the 2008 for 2012 being a and tournament of australian open
CREATE TABLE table_name_20 (tournament VARCHAR)
SELECT COUNT(pick__number) FROM table_name_78 WHERE affiliation = "university of virginia"
Tell me the total number of pick for university of virginia
CREATE TABLE table_name_78 (pick__number VARCHAR, affiliation VARCHAR)
SELECT COUNT(date_released) FROM table_17798548_4 WHERE season = "The Complete 4th Series"
On how many dates was the complete 4th series released?
CREATE TABLE table_17798548_4 (date_released VARCHAR, season VARCHAR)
SELECT player_name FROM table_name_23 WHERE matches = "51"
Name the player name with matches of 51
CREATE TABLE table_name_23 (player_name VARCHAR, matches VARCHAR)
SELECT prothrombin_time FROM table_name_6 WHERE partial_thromboplastin_time = "unaffected" AND condition = "thrombocytopenia"
Which Prothrombin time that has a Partial thromboplastin time of unaffected, and a Condition of thrombocytopenia?
CREATE TABLE table_name_6 (prothrombin_time VARCHAR, partial_thromboplastin_time VARCHAR, condition VARCHAR)
SELECT berlin FROM table_name_60 WHERE südwest = "fk pirmasens" AND west = "westfalia herne"
What was Berlin when fk pirmasens was Südwest and westfalia herne was west?
CREATE TABLE table_name_60 (berlin VARCHAR, südwest VARCHAR, west VARCHAR)
SELECT high_rebounds FROM table_name_35 WHERE high_assists = "a. johnson (6)"
Who had the highest rebounds of the game with A. Johnson (6) as the highest assist?
CREATE TABLE table_name_35 (high_rebounds VARCHAR, high_assists VARCHAR)
SELECT away_team FROM table_name_23 WHERE venue = "brunswick street oval"
What away team played at Brunswick Street Oval?
CREATE TABLE table_name_23 (away_team VARCHAR, venue VARCHAR)
SELECT gold FROM table_name_76 WHERE silver = "pan cheng-tsung"
Who won gold in the games where Pan Cheng-Tsung won silver?
CREATE TABLE table_name_76 (gold VARCHAR, silver VARCHAR)
SELECT final_score FROM table_name_23 WHERE visiting_team = "indianapolis colts" AND date = "november 24"
What was the final score of the game on November 24 with the visiting team the Indianapolis Colts?
CREATE TABLE table_name_23 (final_score VARCHAR, visiting_team VARCHAR, date VARCHAR)
SELECT COUNT(*) FROM accounts
How many accounts are there in total?
CREATE TABLE accounts (Id VARCHAR)
SELECT date FROM table_name_99 WHERE points < 35 AND home = "chicago"
What is the date of the game with less than 35 points and chicago as the home team?
CREATE TABLE table_name_99 (date VARCHAR, points VARCHAR, home VARCHAR)
SELECT 1999 FROM table_name_40 WHERE 2000 = "year-end championship"
Which 1999 has 2000 as the year-end championship?
CREATE TABLE table_name_40 (Id VARCHAR)
SELECT former_school FROM table_25177625_1 WHERE hometown = "East Brunswick, NJ"
What were the former schools of the player from East Brunswick, NJ?
CREATE TABLE table_25177625_1 (former_school VARCHAR, hometown VARCHAR)
SELECT SUM(year) FROM table_name_40 WHERE weight__kg_ = "857"
What is the sum total of all the years with a bell that weighed 857 kilograms?
CREATE TABLE table_name_40 (year INTEGER, weight__kg_ VARCHAR)
SELECT MIN(total_gdp_world_rank) FROM table_2248991_2 WHERE gdp_per_capita = "$1,163"
What is the total gdp world rank when the gdp per capita was listed at $1,163?
CREATE TABLE table_2248991_2 (total_gdp_world_rank INTEGER, gdp_per_capita VARCHAR)
SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'
How many professors who has a either Ph.D. or MA degree?
CREATE TABLE professor (prof_high_degree VARCHAR)
SELECT MIN(enrollment) FROM table_27961684_1 WHERE team_name = "Pioneers"
How many people enrolled for the institute with the Pioneers?
CREATE TABLE table_27961684_1 (enrollment INTEGER, team_name VARCHAR)
SELECT MIN(laps) FROM table_name_47 WHERE constructor = "maserati" AND grid = 2
Who has the low lap total in a maserati with grid 2?
CREATE TABLE table_name_47 (laps INTEGER, constructor VARCHAR, grid VARCHAR)
SELECT AVG(Working_Horses) FROM farm WHERE Total_Horses > 5000
What is the average number of working horses of farms with more than 5000 total number of horses?
CREATE TABLE farm (Working_Horses INTEGER, Total_Horses INTEGER)
SELECT total FROM table_21995420_9 WHERE rank = 11
If the rank is 11, what is the total amount?
CREATE TABLE table_21995420_9 (total VARCHAR, rank VARCHAR)
SELECT constructor FROM table_name_17 WHERE circuit = "oulton park" AND date = "15 april"
What company constrcuted the vehicle with a circuit of oulton park on 15 april?
CREATE TABLE table_name_17 (constructor VARCHAR, circuit VARCHAR, date VARCHAR)
SELECT college_junior_club_team FROM table_name_27 WHERE pick__number = "1"
Which College/junior/club team has a Pick # of 1?
CREATE TABLE table_name_27 (college_junior_club_team VARCHAR, pick__number VARCHAR)
SELECT home_team AS score FROM table_name_24 WHERE venue = "junction oval"
In the game that took place at junction oval, how much did the home team score?
CREATE TABLE table_name_24 (home_team VARCHAR, venue VARCHAR)
SELECT date_won FROM table_name_10 WHERE championship = "wwe intercontinental championship"
Name the date won for wwe intercontinental championship
CREATE TABLE table_name_10 (date_won VARCHAR, championship VARCHAR)
SELECT place_of_birth FROM table_name_62 WHERE acquired = 2008
Of those acquired in 2008, where were they born?
CREATE TABLE table_name_62 (place_of_birth VARCHAR, acquired VARCHAR)
SELECT place FROM table_name_94 WHERE player = "tim simpson"
What was Tim Simpson's place?
CREATE TABLE table_name_94 (place VARCHAR, player VARCHAR)
SELECT score FROM table_name_6 WHERE year = "1991"
What was the 1991 score?
CREATE TABLE table_name_6 (score VARCHAR, year VARCHAR)