answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT SUM(laps) FROM table_name_36 WHERE grid = 16
What's the number of laps for 16 grids?
CREATE TABLE table_name_36 (laps INTEGER, grid VARCHAR)
SELECT to_par FROM table_name_29 WHERE player = "charlie wi"
What is Charlie Wi's To par?
CREATE TABLE table_name_29 (to_par VARCHAR, player VARCHAR)
SELECT pro_debut FROM table_name_68 WHERE tournaments > 11 AND highest_rank = "maegashira 1"
What is Pro Debut, when Tournament is greater than 11, and when Highest Rank is "Maegashira 1"?
CREATE TABLE table_name_68 (pro_debut VARCHAR, tournaments VARCHAR, highest_rank VARCHAR)
SELECT result FROM table_name_88 WHERE race = "ajc craven plate (wfa)"
What is the result of the ajc craven plate (wfa) race?
CREATE TABLE table_name_88 (result VARCHAR, race VARCHAR)
SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa'
Where does the staff member with the first name Elsa live?
CREATE TABLE staff (address_id VARCHAR, first_name VARCHAR); CREATE TABLE address (address VARCHAR, address_id VARCHAR)
SELECT chassis FROM table_name_41 WHERE entrant = "larrousse f1" AND driver = "aguri suzuki"
Which chassis did Aguri Suzuki drive with an entrant of Larrousse F1?
CREATE TABLE table_name_41 (chassis VARCHAR, entrant VARCHAR, driver VARCHAR)
SELECT MIN(all_time) FROM table_name_35 WHERE first_title = 2007 AND amateur_era > 0
What is the lowest All-Time, when First Title is "2007, and when Amateur Era is greater than 0?
CREATE TABLE table_name_35 (all_time INTEGER, first_title VARCHAR, amateur_era VARCHAR)
SELECT MAX(population_1991) FROM table_name_13 WHERE name = "baden bei wien" AND population_2007 > 25 OFFSET 284
What is the highest population in 1991 in Baden Bei Wien, and a 2007 population larger than 25,284?
CREATE TABLE table_name_13 (population_1991 INTEGER, name VARCHAR, population_2007 VARCHAR)
SELECT london_, _great_britain FROM table_23619492_3 WHERE world_record = "Championship record"
Name the london great britain for championship record
CREATE TABLE table_23619492_3 (london_ VARCHAR, _great_britain VARCHAR, world_record VARCHAR)
SELECT site FROM table_name_94 WHERE opponent = "iowa"
Where did the game(s) against Iowa take place?
CREATE TABLE table_name_94 (site VARCHAR, opponent VARCHAR)
SELECT MAX(rank) FROM table_name_85 WHERE country = "palestinian territories"
Which highest rank belongs to the palestinian territories?
CREATE TABLE table_name_85 (rank INTEGER, country VARCHAR)
SELECT average FROM table_2482547_5 WHERE wickets_taken = 212
What are the averages for games with 212 wickets taken?
CREATE TABLE table_2482547_5 (average VARCHAR, wickets_taken VARCHAR)
SELECT host_city FROM table_26669939_1 WHERE host_country = "Croatia" AND edition = "8th"
What was the host city of the 8th edition in the the host country of Croatia?
CREATE TABLE table_26669939_1 (host_city VARCHAR, host_country VARCHAR, edition VARCHAR)
SELECT weight FROM table_15592941_1 WHERE player_name = "Geno Hayes"
How much does geno hayes weigh?
CREATE TABLE table_15592941_1 (weight VARCHAR, player_name VARCHAR)
SELECT 家族_family FROM table_1912713_2 WHERE 性情_personality = "Gentle"
Who in the family has a gentle personality?
CREATE TABLE table_1912713_2 (家族_family VARCHAR, 性情_personality VARCHAR)
SELECT MAX(wins) FROM table_name_8 WHERE position < 1
What is the highest number of wins of the team with a position less than 1?
CREATE TABLE table_name_8 (wins INTEGER, position INTEGER)
SELECT time_retired FROM table_name_46 WHERE driver = "john watson"
What was John Watson's time/retired?
CREATE TABLE table_name_46 (time_retired VARCHAR, driver VARCHAR)
SELECT 2011 FROM table_name_24 WHERE tournament = "indian wells"
Which 2011's tournament was Indian Wells?
CREATE TABLE table_name_24 (tournament VARCHAR)
SELECT tally FROM table_name_12 WHERE opposition = "derry" AND total = 14
What is the tally when the opposition is Derry, and total is 14?
CREATE TABLE table_name_12 (tally VARCHAR, opposition VARCHAR, total VARCHAR)
SELECT opponent FROM table_name_77 WHERE game = "4"
Who was their opponent in game 4?
CREATE TABLE table_name_77 (opponent VARCHAR, game VARCHAR)
SELECT nation FROM table_name_46 WHERE silver < 3 AND total > 1 AND gold < "4" AND rank = "4"
What Nation had a more than 1 Total medal including less than 3 Silver, less than 4 Gold and a Rank of 4?
CREATE TABLE table_name_46 (nation VARCHAR, rank VARCHAR, gold VARCHAR, silver VARCHAR, total VARCHAR)
SELECT foursomes_w_l_h FROM table_1628607_5 WHERE year = "2002"
What was the foursome's record in 2002?
CREATE TABLE table_1628607_5 (foursomes_w_l_h VARCHAR, year VARCHAR)
SELECT broadcast_date FROM table_2102714_1 WHERE run_time = "24:40"
What date was an episode broadcasted on that had a run time of 24:40?
CREATE TABLE table_2102714_1 (broadcast_date VARCHAR, run_time VARCHAR)
SELECT host_team FROM table_name_86 WHERE final_score = "42-23"
Which Host Team has Final Score of 42-23?
CREATE TABLE table_name_86 (host_team VARCHAR, final_score VARCHAR)
SELECT away FROM table_name_82 WHERE home = "1-4"
What away has 1-4 as the home?
CREATE TABLE table_name_82 (away VARCHAR, home VARCHAR)
SELECT COUNT(year) FROM table_name_31 WHERE engine = "maserati straight-6"
Which year has has a Engine of maserati straight-6?
CREATE TABLE table_name_31 (year VARCHAR, engine VARCHAR)
SELECT right_ascension___j2000__ FROM table_name_98 WHERE constellation = "mensa" AND ngc_number > 2171
Which Right ascension (J2000) has a Constellation of mensa, and an NGC number larger than 2171?
CREATE TABLE table_name_98 (right_ascension___j2000__ VARCHAR, constellation VARCHAR, ngc_number VARCHAR)
SELECT position FROM table_25429986_1 WHERE number = 22
what position is number 22?
CREATE TABLE table_25429986_1 (position VARCHAR, number VARCHAR)
SELECT weight__kg_m_ FROM table_2071644_2 WHERE cross_section_area__cm_2__ = "21.2"
If the cross-section area is 21.2, what is the weight?
CREATE TABLE table_2071644_2 (weight__kg_m_ VARCHAR, cross_section_area__cm_2__ VARCHAR)
SELECT MIN(division) FROM table_name_30 WHERE team = "benfica" AND apps = 22
What is the lowest Division, when Team is "Benfica", and when Apps is 22?
CREATE TABLE table_name_30 (division INTEGER, team VARCHAR, apps VARCHAR)
SELECT MAX(points) FROM table_name_63 WHERE goal_average > 4 AND draws < 12 AND goals_for = 63
What is the highest amount of points with a goal average larger than 4, less than 12 draws, and a goal of 63?
CREATE TABLE table_name_63 (points INTEGER, goals_for VARCHAR, goal_average VARCHAR, draws VARCHAR)
SELECT mens_singles FROM table_28138035_27 WHERE year_location = "2009 Doha"
Who is listed under mens singles when the year location is 2009 doha?
CREATE TABLE table_28138035_27 (mens_singles VARCHAR, year_location VARCHAR)
SELECT score_1 FROM table_name_99 WHERE attendance = "9,205"
What was the final score of the match that had an attendance of 9,205?
CREATE TABLE table_name_99 (score_1 VARCHAR, attendance VARCHAR)
SELECT DISTINCT T2.emp_fname, T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems'
Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department.
CREATE TABLE professor (prof_high_degree VARCHAR, emp_num VARCHAR, dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR)
SELECT SUM(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas'
Find the total account balance of each customer from Utah or Texas.
CREATE TABLE customer (acc_bal INTEGER, state VARCHAR)
SELECT barony FROM table_30121082_1 WHERE area__acres__ = 276
What are the Baronies when the area (in acres) is 276?
CREATE TABLE table_30121082_1 (barony VARCHAR, area__acres__ VARCHAR)
SELECT masters FROM table_1506950_9 WHERE pga_ch = "R16"
What is the result at the Masters for the player who finished R16 at the PGA Ch.?
CREATE TABLE table_1506950_9 (masters VARCHAR, pga_ch VARCHAR)
SELECT mountains_classification FROM table_19115414_4 WHERE team_classification = "Team Columbia"
Name the mountains classification for team columbia
CREATE TABLE table_19115414_4 (mountains_classification VARCHAR, team_classification VARCHAR)
SELECT commercial_operation FROM table_name_27 WHERE construction_start = "june 10, 1971"
When was commercial operation where construction started June 10, 1971?
CREATE TABLE table_name_27 (commercial_operation VARCHAR, construction_start VARCHAR)
SELECT AVG(pct) FROM table_name_4 WHERE lost > 7 AND name = "george felton"
What's the average pct for George Felton when he had losses greater than 7?
CREATE TABLE table_name_4 (pct INTEGER, lost VARCHAR, name VARCHAR)
SELECT years_in_orlando FROM table_15621965_10 WHERE school_club_team = "Concord HS"
Name the years in orlando that the player from concord hs was in
CREATE TABLE table_15621965_10 (years_in_orlando VARCHAR, school_club_team VARCHAR)
SELECT driver FROM table_name_44 WHERE laps > 16 AND constructor = "ferrari" AND grid < 15
I want the driver with Laps larger than 16 with a ferrari and grid less than 15
CREATE TABLE table_name_44 (driver VARCHAR, grid VARCHAR, laps VARCHAR, constructor VARCHAR)
SELECT title FROM table_name_78 WHERE director = "chuck jones" AND production_number = "9537"
What is the title with chuck jones as the director and the production number 9537?
CREATE TABLE table_name_78 (title VARCHAR, director VARCHAR, production_number 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 name FROM table_name_42 WHERE team = "forsythe racing" AND best = "1:00.099"
Who is the driver for the Forsythe Racing team that has the best time of 1:00.099?
CREATE TABLE table_name_42 (name VARCHAR, team VARCHAR, best VARCHAR)
SELECT first_broadcast FROM table_19930660_3 WHERE rufus_guest = "Jack Whitehall"
When is the first broadcast for episodes where Rufus's guest is Jack Whitehall?
CREATE TABLE table_19930660_3 (first_broadcast VARCHAR, rufus_guest VARCHAR)
SELECT MIN(enrollment) FROM table_2076463_2 WHERE location_s_ = "Springfield"
How much would you expect the enrollment to be in Springfield?
CREATE TABLE table_2076463_2 (enrollment INTEGER, location_s_ VARCHAR)
SELECT Character, Duration FROM actor
What are the characters and duration of actors?
CREATE TABLE actor (Character VARCHAR, Duration VARCHAR)
SELECT organization FROM table_name_14 WHERE rank = "68"
What organization ranks 68?
CREATE TABLE table_name_14 (organization VARCHAR, rank VARCHAR)
SELECT composition FROM table_name_37 WHERE founded = 1976
What composition was founded in 1976?
CREATE TABLE table_name_37 (composition VARCHAR, founded VARCHAR)
SELECT surname FROM table_name_16 WHERE first = "michael"
What is Michael's surname?
CREATE TABLE table_name_16 (surname VARCHAR, first VARCHAR)
SELECT SUM(wins) FROM table_name_47 WHERE club = "abuls smiltene" AND goals_for < 18
Can you tell me the sum of Wins that has the Club of abuls smiltene, and the Goals smaller than 18?
CREATE TABLE table_name_47 (wins INTEGER, club VARCHAR, goals_for VARCHAR)
SELECT MIN(money___) AS $__ FROM table_name_25 WHERE score = 70 - 68 - 73 - 68 = 279
Which Money has a Score of 70-68-73-68=279?
CREATE TABLE table_name_25 (money___ INTEGER, score VARCHAR)
SELECT result FROM table_name_40 WHERE date = "19 august 1992"
What is Result, when Date is 19 August 1992?
CREATE TABLE table_name_40 (result VARCHAR, date VARCHAR)
SELECT MIN(grid) FROM table_name_28 WHERE team = "pkv racing" AND points = 13 AND laps < 64
What is the lowest grid of pkv racing, which had 13 points and less than 64 laps?
CREATE TABLE table_name_28 (grid INTEGER, laps VARCHAR, team VARCHAR, points VARCHAR)
SELECT MAX(total__number) FROM table_27155243_4 WHERE written_by = "Sheri Elwood"
What is largest total number that was written by Sheri Elwood?
CREATE TABLE table_27155243_4 (total__number INTEGER, written_by VARCHAR)
SELECT school FROM table_16295365_2 WHERE conf_record = "12-6"
Name the school where conference record is 12-6
CREATE TABLE table_16295365_2 (school VARCHAR, conf_record VARCHAR)
SELECT MAX(points) FROM table_name_5 WHERE assists < 5 AND goals < 2
What is the highest amount of points with less than 5 assists and less than 2 goals?
CREATE TABLE table_name_5 (points INTEGER, assists VARCHAR, goals VARCHAR)
SELECT framed_size FROM table_name_22 WHERE date_completed = "08/87"
What was the frame size in 08/87?
CREATE TABLE table_name_22 (framed_size VARCHAR, date_completed VARCHAR)
SELECT Residence FROM player WHERE gender = "M" INTERSECT SELECT Residence FROM player WHERE gender = "F"
Show the residences that have both a player of gender "M" and a player of gender "F".
CREATE TABLE player (Residence VARCHAR, gender VARCHAR)
SELECT report FROM table_name_43 WHERE venue = "state sports centre"
What was the report at State Sports Centre?
CREATE TABLE table_name_43 (report VARCHAR, venue VARCHAR)
SELECT city FROM table_name_38 WHERE club = "suntracs f.c."
Which City has a Club of suntracs f.c.?
CREATE TABLE table_name_38 (city VARCHAR, club VARCHAR)
SELECT COUNT(interview) FROM table_name_19 WHERE country = "louisiana" AND swimsuit > 9.1
What is the interview number in Louisiana, and the swimsuit number is more than 9.1?
CREATE TABLE table_name_19 (interview VARCHAR, country VARCHAR, swimsuit VARCHAR)
SELECT score FROM table_name_97 WHERE date = "may 11"
What is Score, when Date is "May 11"?
CREATE TABLE table_name_97 (score VARCHAR, date VARCHAR)
SELECT party FROM table_2668254_22 WHERE candidates = "George McDuffie (J)"
What party did candidate george mcduffie (j) represent?
CREATE TABLE table_2668254_22 (party VARCHAR, candidates VARCHAR)
SELECT iso FROM table_160510_5 WHERE rr_romaja = "Chungcheongnam"
Name the iso for chungcheongnam
CREATE TABLE table_160510_5 (iso VARCHAR, rr_romaja VARCHAR)
SELECT poll_source FROM table_name_38 WHERE other = "15%"
Which poll source had an other of 15%?
CREATE TABLE table_name_38 (poll_source VARCHAR, other VARCHAR)
SELECT MAX(revenue__) AS $m_ FROM table_name_44 WHERE team = "schalke 04" AND rank < 10
Name the highest revenue for schalke 04 with rank less than 10
CREATE TABLE table_name_44 (revenue__ INTEGER, team VARCHAR, rank VARCHAR)
SELECT pole_position FROM table_1132588_3 WHERE constructor = "Ferrari" AND grand_prix = "Austrian grand_prix"
What is the pole position for the ferrari at the austrian grand prix?
CREATE TABLE table_1132588_3 (pole_position VARCHAR, constructor VARCHAR, grand_prix VARCHAR)
SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1
Show the denomination of the school that has the most players.
CREATE TABLE player (School_ID VARCHAR); CREATE TABLE school (Denomination VARCHAR, School_ID VARCHAR)
SELECT player FROM table_name_77 WHERE nationality = "sweden" AND round > 3
Who is the player from Sweden from a round after 3?
CREATE TABLE table_name_77 (player VARCHAR, nationality VARCHAR, round VARCHAR)
SELECT AVG(pick) FROM table_name_15 WHERE player = "mark joseph kong"
What is Mark Joseph Kong's pick?
CREATE TABLE table_name_15 (pick INTEGER, player VARCHAR)
SELECT 1999 FROM table_name_21 WHERE 2003 = "a" AND career_sr = "0 / 4"
What is 1999, when 2003 is "A", and when Career SR is "0 / 4"?
CREATE TABLE table_name_21 (career_sr VARCHAR)
SELECT category FROM table_name_9 WHERE recipient_s_ = "nick jonas" AND award = "kids' choice awards mexico"
In which category did Nick Jonas win at the Kids' Choice Awards Mexico?
CREATE TABLE table_name_9 (category VARCHAR, recipient_s_ VARCHAR, award VARCHAR)
SELECT MIN(pick__number) FROM table_2897457_8 WHERE player = "Paul Krake"
What was the pick number when Paul Krake was selected?
CREATE TABLE table_2897457_8 (pick__number INTEGER, player VARCHAR)
SELECT player FROM table_name_61 WHERE position = "ss" AND pick = 11
What is Player, when Position is "SS", and when Pick is "11"?
CREATE TABLE table_name_61 (player VARCHAR, position VARCHAR, pick VARCHAR)
SELECT position FROM table_name_35 WHERE player = "tomasz kiełbowicz"
What position did tomasz kiełbowicz play?
CREATE TABLE table_name_35 (position VARCHAR, player VARCHAR)
SELECT high_points FROM table_name_16 WHERE date = "september 9"
What were the high points on september 9?
CREATE TABLE table_name_16 (high_points VARCHAR, date VARCHAR)
SELECT MIN(track) FROM table_name_37 WHERE writer_s_ = "dennis linde" AND time = "2:50"
What's the smallest track written by dennis linde that's 2:50 minutes long
CREATE TABLE table_name_37 (track INTEGER, writer_s_ VARCHAR, time VARCHAR)
SELECT COUNT(power_stage_wins) FROM table_23385853_20 WHERE wins = 10
What is the power stage wins total number if the wins is 10?
CREATE TABLE table_23385853_20 (power_stage_wins VARCHAR, wins VARCHAR)
SELECT MAX(points) FROM table_name_35 WHERE score = "4–1"
Which Points have a Score of 4–1?
CREATE TABLE table_name_35 (points INTEGER, score VARCHAR)
SELECT score FROM table_name_93 WHERE date = "8 september 1999"
What was the score on 8 September 1999?
CREATE TABLE table_name_93 (score VARCHAR, date VARCHAR)
SELECT COUNT(population__2010___rank_) FROM table_14253123_1 WHERE county_name = "Spencer"
When Spencer is the county what is total of the population (2010) (rank)?
CREATE TABLE table_14253123_1 (population__2010___rank_ VARCHAR, county_name VARCHAR)
SELECT calendar_date, day_Number FROM Ref_calendar
Show all calendar dates and day Numbers.
CREATE TABLE Ref_calendar (calendar_date VARCHAR, day_Number VARCHAR)
SELECT away_team AS score FROM table_name_30 WHERE venue = "moorabbin oval"
What did the team score while away in moorabbin oval?
CREATE TABLE table_name_30 (away_team VARCHAR, venue VARCHAR)
SELECT AVG(height__cm_) FROM table_name_79 WHERE position = "d" AND birthplace = "new hope, minnesota"
What is the average Height for the Position of d, with a Birthplace of new hope, minnesota?
CREATE TABLE table_name_79 (height__cm_ INTEGER, position VARCHAR, birthplace VARCHAR)
SELECT rank FROM table_name_2 WHERE player = "charles eady" AND bowling = "12/63"
What is rank of player Charles Eady and a Bowling of 12/63?
CREATE TABLE table_name_2 (rank VARCHAR, player VARCHAR, bowling VARCHAR)
SELECT MIN(top_5) FROM table_name_27 WHERE wins < 0
Which Top-5 is the lowest one that has Wins smaller than 0?
CREATE TABLE table_name_27 (top_5 INTEGER, wins INTEGER)
SELECT candidates FROM table_1342292_4 WHERE incumbent = "William J. Driver"
What candidates ran in the election when the incumbent was william j. driver?
CREATE TABLE table_1342292_4 (candidates VARCHAR, incumbent VARCHAR)
SELECT COUNT(car__number) FROM table_1769428_2 WHERE winning_driver = "Rusty Wallace"
How many car numbers were listed for Rusty Wallace?
CREATE TABLE table_1769428_2 (car__number VARCHAR, winning_driver VARCHAR)
SELECT opponent FROM table_name_67 WHERE score = "3-17"
Who did they lose to 3-17?
CREATE TABLE table_name_67 (opponent VARCHAR, score VARCHAR)
SELECT MAX(to_par) FROM table_name_24 WHERE total < 290
When the total was smaller than 290, what was the highest To par?
CREATE TABLE table_name_24 (to_par INTEGER, total INTEGER)
SELECT COUNT(club) FROM table_14070062_3 WHERE try_bonus = "5"
How many clubs have a try bonus value of 5?
CREATE TABLE table_14070062_3 (club VARCHAR, try_bonus VARCHAR)
SELECT may_2009 FROM table_23680576_2 WHERE jul_2009 = "7.2%"
If the polling average in July 2009 was 7.2%, what was it in May 2009?
CREATE TABLE table_23680576_2 (may_2009 VARCHAR, jul_2009 VARCHAR)
SELECT name FROM table_name_76 WHERE species_authority = "sigmodon hispidus say & ord, 1825"
What is the name for the species Authority of sigmodon hispidus say & ord, 1825?
CREATE TABLE table_name_76 (name VARCHAR, species_authority VARCHAR)
SELECT competition FROM table_name_96 WHERE venue = "zurich"
What was the competition that was played in Zurich?
CREATE TABLE table_name_96 (competition VARCHAR, venue VARCHAR)
SELECT COUNT(goals_for) FROM table_name_68 WHERE points_1 = "41"
What is the total number of Goals For, when Points 1 is "41"?
CREATE TABLE table_name_68 (goals_for VARCHAR, points_1 VARCHAR)
SELECT loser FROM table_name_87 WHERE winner = "antonio silva"
Who was the loser of the fight against antonio silva?
CREATE TABLE table_name_87 (loser VARCHAR, winner VARCHAR)
SELECT sat_29_aug FROM table_23465864_3 WHERE rank = 3
When 3 is the rank what is the time for Saturday August 29th?
CREATE TABLE table_23465864_3 (sat_29_aug VARCHAR, rank VARCHAR)
SELECT preferred_foot, AVG(overall_rating) FROM Player_Attributes GROUP BY preferred_foot
What is the average rating for right-footed players and left-footed players?
CREATE TABLE Player_Attributes (preferred_foot VARCHAR, overall_rating INTEGER)