answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT state FROM table_name_98 WHERE elected_assumed_office = 2013
What state had an elected/assumed office in 2013?
CREATE TABLE table_name_98 (state VARCHAR, elected_assumed_office VARCHAR)
SELECT SUM(losses) FROM table_name_9 WHERE manager = "jim hoff" AND wins < 12
What was Jim Hoff's sum of losses and a wins smaller than 12?
CREATE TABLE table_name_9 (losses INTEGER, manager VARCHAR, wins VARCHAR)
SELECT nickname FROM table_2293402_2 WHERE founded = 1798
Name the nickname that was founded 1798
CREATE TABLE table_2293402_2 (nickname VARCHAR, founded VARCHAR)
SELECT incumbent FROM table_2668401_12 WHERE candidates = "Joseph Hiester (DR) 83.2% Roswell Wells (F) 16.8%"
Name the incumbent for candidates Joseph Hiester (dr) 83.2% Roswell Wells (f) 16.8%.
CREATE TABLE table_2668401_12 (incumbent VARCHAR, candidates VARCHAR)
SELECT runner_s__up FROM table_name_21 WHERE winning_score = –10(66 - 71 - 62 - 71 = 270)
Who has the Winning score of –10 (66-71-62-71=270) ?
CREATE TABLE table_name_21 (runner_s__up VARCHAR, winning_score VARCHAR)
SELECT 2008 AS _rank FROM table_23050383_1 WHERE country = "Djibouti"
What is the 2008 rank of Djibouti?
CREATE TABLE table_23050383_1 (country VARCHAR)
SELECT home FROM table_name_5 WHERE attendance > 1 OFFSET 858
Which Home has an Attendance larger than 1,858?
CREATE TABLE table_name_5 (home VARCHAR, attendance INTEGER)
SELECT SUM(drawn) FROM table_name_94 WHERE goals = "274-357"
What is the sum of draws with 274-357 goals?
CREATE TABLE table_name_94 (drawn INTEGER, goals VARCHAR)
SELECT unit FROM table_name_58 WHERE name = "anas cheuen"
What is the Unit with a Name that is anas cheuen?
CREATE TABLE table_name_58 (unit VARCHAR, name VARCHAR)
SELECT team FROM table_name_2 WHERE best = "58.846"
Name the team with best of 58.846
CREATE TABLE table_name_2 (team VARCHAR, best VARCHAR)
SELECT COUNT(district) FROM table_1342379_10 WHERE first_elected = 1912
how many areas were in the election in 1912
CREATE TABLE table_1342379_10 (district VARCHAR, first_elected VARCHAR)
SELECT AVG(enrollment) FROM table_name_32 WHERE location = "hope"
COunt the average Enrollment in hope?
CREATE TABLE table_name_32 (enrollment INTEGER, location VARCHAR)
SELECT driver FROM table_name_12 WHERE race_3 = "10"
What is Driver, when Race 2 is "10"?
CREATE TABLE table_name_12 (driver VARCHAR, race_3 VARCHAR)
SELECT AVG(points) FROM table_name_6 WHERE team = "newman/haas racing" AND laps < 40
How many points for Newman/Haas Racing with fewer than 40 laps?
CREATE TABLE table_name_6 (points INTEGER, team VARCHAR, laps VARCHAR)
SELECT district FROM table_1341577_22 WHERE first_elected = 1952
What is the district for 1952?
CREATE TABLE table_1341577_22 (district VARCHAR, first_elected VARCHAR)
SELECT MAX(round) FROM table_name_91 WHERE opponent = "rene rooze" AND location = "saitama, japan"
What is the highest round of the match with Rene Rooze as the opponent in Saitama, Japan?
CREATE TABLE table_name_91 (round INTEGER, opponent VARCHAR, location VARCHAR)
SELECT directed_by FROM table_2618072_1 WHERE production_code = 67425
Who is the directed by when the production code is 67425?
CREATE TABLE table_2618072_1 (directed_by VARCHAR, production_code VARCHAR)
SELECT name FROM table_29562161_1 WHERE starting_price = "66/1"
What horse had a starting price of 66/1?
CREATE TABLE table_29562161_1 (name VARCHAR, starting_price VARCHAR)
SELECT democrat AS :_mark_begich FROM table_16751596_13 WHERE dates_administered = "October 6, 2008"
What was Mark Begich polling on October 6, 2008?
CREATE TABLE table_16751596_13 (democrat VARCHAR, dates_administered VARCHAR)
SELECT binibining_pilipinas_international FROM table_name_24 WHERE binibining_pilipinas_world = "sharmaine gutierrez"
Which Binibining Pilipinas International has a Binibining Pilipinas-World of sharmaine gutierrez?
CREATE TABLE table_name_24 (binibining_pilipinas_international VARCHAR, binibining_pilipinas_world VARCHAR)
SELECT interacting__settings_ FROM table_name_40 WHERE doing__actions_ = "co-operate, plan, take care of, help"
Name the interacting settings for co-operate, plan, take care of, help
CREATE TABLE table_name_40 (interacting__settings_ VARCHAR, doing__actions_ VARCHAR)
SELECT up_down FROM table_1161065_28 WHERE hosted = 7
What is the up/down at the venue that hosted 7 games?
CREATE TABLE table_1161065_28 (up_down VARCHAR, hosted VARCHAR)
SELECT MAX(pick) FROM table_name_25 WHERE round = "round 4" AND player = "rudy harris"
What was Rudy Harris' pick number in round 4?
CREATE TABLE table_name_25 (pick INTEGER, round VARCHAR, player VARCHAR)
SELECT country FROM table_name_5 WHERE city = "sendai"
Which country's city is Sendai?
CREATE TABLE table_name_5 (country VARCHAR, city VARCHAR)
SELECT section_name FROM Sections ORDER BY section_name DESC
List the section_name in reversed lexicographical order.
CREATE TABLE Sections (section_name VARCHAR)
SELECT result FROM table_name_64 WHERE week = 13
What is the result when 13 is the week?
CREATE TABLE table_name_64 (result VARCHAR, week VARCHAR)
SELECT COUNT(*) FROM debate
How many debates are there?
CREATE TABLE debate (Id VARCHAR)
SELECT venue FROM table_name_16 WHERE result = "1-3"
In what Venue was the Result 1-3?
CREATE TABLE table_name_16 (venue VARCHAR, result VARCHAR)
SELECT MAX(year_commissioned) FROM table_name_75 WHERE gross_head__metres_ = 60 AND average_annual_output__million_kwh_ < 59
What is the Year commissioned of the power station with a Gross head of 60 metres and Average annual output of less than 59 million KWh?
CREATE TABLE table_name_75 (year_commissioned INTEGER, gross_head__metres_ VARCHAR, average_annual_output__million_kwh_ VARCHAR)
SELECT bronze FROM table_name_85 WHERE nation = "poland"
Which bronze has a Nation of poland?
CREATE TABLE table_name_85 (bronze VARCHAR, nation VARCHAR)
SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.am...
Find the name of dorms which have TV Lounge but no Study Room as amenity.
CREATE TABLE dorm (dorm_name VARCHAR, dormid VARCHAR); CREATE TABLE has_amenity (dormid VARCHAR, amenid VARCHAR); CREATE TABLE dorm_amenity (amenid VARCHAR, amenity_name VARCHAR)
SELECT date FROM table_17432028_1 WHERE score = "95-101"
Name the date for score of 95-101
CREATE TABLE table_17432028_1 (date VARCHAR, score VARCHAR)
SELECT finish FROM table_name_74 WHERE start = "3" AND year = 2010
What is the Finish when the start shows 3 in the year of 2010?
CREATE TABLE table_name_74 (finish VARCHAR, start VARCHAR, year VARCHAR)
SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1
Show the customer id and number of accounts with most accounts.
CREATE TABLE Accounts (customer_id VARCHAR)
SELECT total FROM table_name_89 WHERE years = "1926–1938"
What is the Total for 1926–1938?
CREATE TABLE table_name_89 (total VARCHAR, years VARCHAR)
SELECT MIN(points) FROM table_name_41 WHERE team = "sportivo luqueño" AND wins > 1
Name the Points which has a Team of sportivo luqueño, and Wins larger than 1?
CREATE TABLE table_name_41 (points INTEGER, team VARCHAR, wins VARCHAR)
SELECT 2012 FROM table_name_8 WHERE 2007 = "0 / 4"
Which 2012 has a 2007 of 0 / 4?
CREATE TABLE table_name_8 (Id VARCHAR)
SELECT name FROM table_name_70 WHERE opponent = "ssc-r"
When SSC-R is the opponent what is the name?
CREATE TABLE table_name_70 (name VARCHAR, opponent VARCHAR)
SELECT COUNT(ratings) FROM table_29135051_2 WHERE guest_s_ = "Bruce Forsyth"
Name the number of ratings for bruce forsyth
CREATE TABLE table_29135051_2 (ratings VARCHAR, guest_s_ VARCHAR)
SELECT type FROM table_2562572_33 WHERE cyrillic_name_other_names = "Ором (Hungarian: Orom)"
What type of settlement is ором (hungarian: orom)?
CREATE TABLE table_2562572_33 (type VARCHAR, cyrillic_name_other_names VARCHAR)
SELECT 2006 FROM table_name_88 WHERE 2010 = "a" AND 2009 = "a" AND tournament = "canada masters"
What is the 2006 result of the Canada Masters tournament that is A in 2009 and A in 2010?
CREATE TABLE table_name_88 (tournament VARCHAR)
SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'researcher'
When do all the researcher role staff start to work, and when do they stop working?
CREATE TABLE Project_Staff (date_from VARCHAR, date_to VARCHAR, role_code VARCHAR)
SELECT goals_against FROM table_28848697_4 WHERE goals_scored = 30
What is the goals against listed when the goals scored is 30?
CREATE TABLE table_28848697_4 (goals_against VARCHAR, goals_scored VARCHAR)
SELECT Ends AS lost FROM table_26745426_2 WHERE country = Canada
Name the ends lost for canada
CREATE TABLE table_26745426_2 (Ends VARCHAR, country VARCHAR, Canada VARCHAR)
SELECT MIN(wins) FROM table_name_19 WHERE division = "east" AND losses = 8 AND appearances < 18
How many losses did the East Division have who appeared 18 times and lost 8?
CREATE TABLE table_name_19 (wins INTEGER, appearances VARCHAR, division VARCHAR, losses VARCHAR)
SELECT power FROM table_name_28 WHERE model = "2.0 tdi (cr) dpf" AND years = "2010–2011"
What is the power for model 2.0 tdi (cr) dpf, and a Years of 2010–2011?
CREATE TABLE table_name_28 (power VARCHAR, model VARCHAR, years VARCHAR)
SELECT AVG(lane) FROM table_name_79 WHERE name = "bronte barratt" AND rank > 4
What lane did Bronte Barratt, who had a rank larger than 4, swim in?
CREATE TABLE table_name_79 (lane INTEGER, name VARCHAR, rank VARCHAR)
SELECT color FROM table_name_16 WHERE transcription = "wan suk"
Which Color has a Transcription of wan suk?
CREATE TABLE table_name_16 (color VARCHAR, transcription VARCHAR)
SELECT start___utc__ FROM table_22385461_9 WHERE spacecraft = "Shenzhou 7 EVA 1"
If the spacecraft is the Shenzhou 7 Eva 1, what is the start (utc) date and time?
CREATE TABLE table_22385461_9 (start___utc__ VARCHAR, spacecraft VARCHAR)
SELECT number FROM table_name_77 WHERE position = "k"
What is the number for the player that has a k position?
CREATE TABLE table_name_77 (number VARCHAR, position VARCHAR)
SELECT MAX(3 AS rd_ru) FROM table_17522854_6 WHERE country = "Costa Rica"
How many 3rd ru does Costa Rica have?
CREATE TABLE table_17522854_6 (country VARCHAR)
SELECT letter FROM table_name_45 WHERE operator = "verisign" AND as_number = "as26415"
Which letter has an operator of VeriSign and an AS-number of AS26415?
CREATE TABLE table_name_45 (letter VARCHAR, operator VARCHAR, as_number VARCHAR)
SELECT laps FROM table_17802778_1 WHERE year = 2001
How many laps recorded in 2001?
CREATE TABLE table_17802778_1 (laps VARCHAR, year VARCHAR)
SELECT fleet_numbers FROM table_name_19 WHERE type = "4-6-4t"
What are the fleet number for the 4-6-4t locomotive?
CREATE TABLE table_name_19 (fleet_numbers VARCHAR, type VARCHAR)
SELECT college_or_campus_name FROM table_name_79 WHERE weblink = "http://www.aucev.edu.in/"
Which College or campus has a website of http://www.aucev.edu.in/?
CREATE TABLE table_name_79 (college_or_campus_name VARCHAR, weblink VARCHAR)
SELECT MIN(goal_gain) FROM table_name_31 WHERE game < 18
What team with a Game smaller than 18 has the lowest Goal Gain?
CREATE TABLE table_name_31 (goal_gain INTEGER, game INTEGER)
SELECT date FROM table_name_72 WHERE leading_scorer = "leo mainoldi (24)"
What date was Leo Mainoldi (24) the leading scorer?
CREATE TABLE table_name_72 (date VARCHAR, leading_scorer VARCHAR)
SELECT time FROM table_name_61 WHERE method = "tko"
What was the time when the method was TKO?
CREATE TABLE table_name_61 (time VARCHAR, method VARCHAR)
SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1
What is name of the country that speaks the largest number of languages?
CREATE TABLE countrylanguage (CountryCode VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR)
SELECT MAX(2008) FROM table_name_35 WHERE 2009 = 3.4 AND 2005 > 2.9
What's the 2008 that has 3.4 in 2009 and more than 2.9 in 2005?
CREATE TABLE table_name_35 (Id VARCHAR)
SELECT COUNT(top_fives) FROM table_name_29 WHERE year = "2010" AND wins > 0
What is the total number of top fives in 2010 when casey mears had more than 0 wins?
CREATE TABLE table_name_29 (top_fives VARCHAR, year VARCHAR, wins VARCHAR)
SELECT MIN(obama_number) FROM table_20799905_1 WHERE county = "LAKE"
How many votes did Obama get in Lake County?
CREATE TABLE table_20799905_1 (obama_number INTEGER, county VARCHAR)
SELECT COUNT(january) FROM table_name_30 WHERE opponent = "philadelphia flyers"
What is the number in January for Philadelphia Flyers as opponents?
CREATE TABLE table_name_30 (january VARCHAR, opponent VARCHAR)
SELECT SUM(tie_no) FROM table_name_89 WHERE away_team = "chelsea"
What was the tie number for the round against visiting opponent Chelsea?
CREATE TABLE table_name_89 (tie_no INTEGER, away_team VARCHAR)
SELECT MIN(year) FROM table_22587192_1 WHERE mens_singles = "Raju Rai"
What is the least year when men's singles is Raju Rai?
CREATE TABLE table_22587192_1 (year INTEGER, mens_singles VARCHAR)
SELECT goals_for FROM table_1253396_5 WHERE overall_record = "12-9-7"
The Dallas Burn had a 12-9-7 record and what number of goals for?
CREATE TABLE table_1253396_5 (goals_for VARCHAR, overall_record VARCHAR)
SELECT us_viewers__millions_ FROM table_20046379_3 WHERE production_code = "214"
How many millions of people in the US saw the episode with production code 214?
CREATE TABLE table_20046379_3 (us_viewers__millions_ VARCHAR, production_code VARCHAR)
SELECT 1981 FROM table_name_54 WHERE number_1971 > 192 AND 1991 = 1748
What is the 1981 value of the Macedonian population with a 1971 number greater than 192 and a 1991 of 1748?
CREATE TABLE table_name_54 (number_1971 VARCHAR)
SELECT mccain_percentage FROM table_20722805_1 WHERE obama_percentage = "64.39%"
What was McCain's percentage when Obama had 64.39% of the vote?
CREATE TABLE table_20722805_1 (mccain_percentage VARCHAR, obama_percentage VARCHAR)
SELECT specific_impulse__s_ FROM table_name_19 WHERE scenario = "sr-71 at mach 3.2 (wet)"
What is the specific impulse for the engine with a scenario of sr-71 at mach 3.2 (wet)?
CREATE TABLE table_name_19 (specific_impulse__s_ VARCHAR, scenario VARCHAR)
SELECT MIN(erp_w) FROM table_name_47 WHERE call_sign = "w233be"
Which ERP W is the lowest one that has a Call sign of w233be?
CREATE TABLE table_name_47 (erp_w INTEGER, call_sign VARCHAR)
SELECT MIN(goals) FROM table_name_37 WHERE goals / matches > 0.43 AND name = "joachim streich" AND matches > 378
What are the lowest goal that have goals/matches greater than 0.43 with joachim streich as the name and matches greater than 378?
CREATE TABLE table_name_37 (goals INTEGER, matches VARCHAR, name VARCHAR)
SELECT customer_name, customer_phone FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM customer_address_history)
Show names and phones of customers who do not have address information.
CREATE TABLE customer_address_history (customer_name VARCHAR, customer_phone VARCHAR, customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_phone VARCHAR, customer_id VARCHAR)
SELECT result FROM table_14959246_2 WHERE opponent = "Dallas Cowboys"
What was the final score of the game against the Dallas Cowboys?
CREATE TABLE table_14959246_2 (result VARCHAR, opponent VARCHAR)
SELECT date_s_ FROM table_name_14 WHERE winner = "virginia commonwealth rams"
What date did Virginia Commonwealth Rams win?
CREATE TABLE table_name_14 (date_s_ VARCHAR, winner VARCHAR)
SELECT MIN(league_apps) FROM table_27086613_5 WHERE total_apps = 5
Name the least league apps for total apps of 5
CREATE TABLE table_27086613_5 (league_apps INTEGER, total_apps VARCHAR)
SELECT 2011 FROM table_name_68 WHERE 2008 = "4r"
What 2011 has 4r as the 2008?
CREATE TABLE table_name_68 (Id VARCHAR)
SELECT years_at_club FROM table_name_38 WHERE debut_year = 1930 AND games > 7 AND player = "colin benham"
Which Years at club have a Debut year of 1930, and Games larger than 7, and a Player of colin benham?
CREATE TABLE table_name_38 (years_at_club VARCHAR, player VARCHAR, debut_year VARCHAR, games VARCHAR)
SELECT record FROM table_name_21 WHERE event = "tpf 5: stars and strikes"
Which Record has an Event of tpf 5: stars and strikes?
CREATE TABLE table_name_21 (record VARCHAR, event VARCHAR)
SELECT AVG(league_goals) FROM table_name_95 WHERE league_apps = "16 (1)" AND league_cup_goals < 0
What is the league goals when the league cup goals is less than 0 and 16 (1) league apps?
CREATE TABLE table_name_95 (league_goals INTEGER, league_apps VARCHAR, league_cup_goals VARCHAR)
SELECT HOST FROM performance ORDER BY Attendance
List the hosts of performances in ascending order of attendance.
CREATE TABLE performance (HOST VARCHAR, Attendance VARCHAR)
SELECT MIN(crowd) FROM table_name_13 WHERE venue = "corio oval"
What was the smallest crowd in games at the corio oval?
CREATE TABLE table_name_13 (crowd INTEGER, venue VARCHAR)
SELECT skipper FROM table_25561560_2 WHERE sail_number = "AUS60000"
what skipper has the sail number aus60000?
CREATE TABLE table_25561560_2 (skipper VARCHAR, sail_number VARCHAR)
SELECT away_team FROM table_name_30 WHERE venue = "windy hill"
Which away team was at windy hill?
CREATE TABLE table_name_30 (away_team VARCHAR, venue VARCHAR)
SELECT COUNT(group_stage) FROM table_19412902_1 WHERE play_off = 0 AND clubs = 12
which group stage was there 0 play-offs and 12 clubs played in it
CREATE TABLE table_19412902_1 (group_stage VARCHAR, play_off VARCHAR, clubs VARCHAR)
SELECT SUM(placings) FROM table_name_22 WHERE rank < 7 AND points = 514.55
What is the Place of the couple with a Rank smaller than 7 and 514.55 Points?
CREATE TABLE table_name_22 (placings INTEGER, rank VARCHAR, points VARCHAR)
SELECT birthplace FROM table_name_70 WHERE height__in_ > 192 AND position = "d" AND birthdate = "april 5, 1983"
Which birthplace's height in inches was more than 192 when the position was d and the birthday was April 5, 1983?
CREATE TABLE table_name_70 (birthplace VARCHAR, birthdate VARCHAR, height__in_ VARCHAR, position VARCHAR)
SELECT engine FROM table_name_86 WHERE team = "korten motorsport"
Which engine did Korten Motorsport use?
CREATE TABLE table_name_86 (engine VARCHAR, team VARCHAR)
SELECT SUM(silver) FROM table_name_45 WHERE rank > 1 AND gold = 4
How many Silver medals did nation who is ranked greater than 1 and has 4 Gold medals have?
CREATE TABLE table_name_45 (silver INTEGER, rank VARCHAR, gold VARCHAR)
SELECT COUNT(overall) FROM table_name_28 WHERE position = "wide receiver" AND player = "tom fleming"
What was the overall draft number of Tom Fleming, a wide receiver?
CREATE TABLE table_name_28 (overall VARCHAR, position VARCHAR, player VARCHAR)
SELECT winning_score FROM table_name_55 WHERE tournament = "mynavi abc championship"
What was the Winning score for the Mynavi ABC Championship Tournament?
CREATE TABLE table_name_55 (winning_score VARCHAR, tournament VARCHAR)
SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1
List the time of elimination of the wrestlers with largest days held.
CREATE TABLE wrestler (Wrestler_ID VARCHAR, Days_held VARCHAR); CREATE TABLE elimination (Time VARCHAR, Wrestler_ID VARCHAR)
SELECT MIN(diameter) FROM table_name_7 WHERE name = "dardanus sulcus"
What is dardanus sulcus' lowest diameter?
CREATE TABLE table_name_7 (diameter INTEGER, name VARCHAR)
SELECT speed FROM table_name_29 WHERE position = "2nd" AND time = "01:13:03.39"
What was the speed of the race that ended in 2nd place and had a time of 01:13:03.39?
CREATE TABLE table_name_29 (speed VARCHAR, position VARCHAR, time VARCHAR)
SELECT MAX(no_in_series) FROM table_14724369_1 WHERE production_code = "1ACX03"
What is the first number in series that had the production code 1ACX03?
CREATE TABLE table_14724369_1 (no_in_series INTEGER, production_code VARCHAR)
SELECT represented FROM table_23576576_2 WHERE hometown = "Windhoek"
If the hometown is Windhoek, what is the represented?
CREATE TABLE table_23576576_2 (represented VARCHAR, hometown VARCHAR)
SELECT attendance FROM table_name_98 WHERE away_team = "cambridge city"
How many people attended the game against away team Cambridge City?
CREATE TABLE table_name_98 (attendance VARCHAR, away_team VARCHAR)
SELECT drivers FROM table_name_86 WHERE laps = 101
What driver had 101 laps?
CREATE TABLE table_name_86 (drivers VARCHAR, laps VARCHAR)
SELECT height FROM table_24055352_1 WHERE name = "Kammeon Holsey"
What is Kammeon Holsey's height?
CREATE TABLE table_24055352_1 (height VARCHAR, name VARCHAR)
SELECT collaboration FROM table_name_5 WHERE indication = "non-hodgkin lymphoma"
What company collaborated with non-hodgkin lymphoma?
CREATE TABLE table_name_5 (collaboration VARCHAR, indication VARCHAR)