answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT us_viewers__millions_ FROM table_21313327_1 WHERE written_by = "Brad Kern"
when the writer is Brad Kern, how many u.s viewers (in millions) had the episode?
CREATE TABLE table_21313327_1 (us_viewers__millions_ VARCHAR, written_by VARCHAR)
SELECT MAX(gold) FROM table_name_33 WHERE total = 7
what is the most gold when the total is 7?
CREATE TABLE table_name_33 (gold INTEGER, total VARCHAR)
SELECT COUNT(*) FROM Invoices
How many invoices do we have?
CREATE TABLE Invoices (Id VARCHAR)
SELECT to_par FROM table_name_94 WHERE place = "t3" AND player = "geoff ogilvy"
WHAT IS THE TO PAR FOR GEOFF OGILVY WITH A PLACE OF T3?
CREATE TABLE table_name_94 (to_par VARCHAR, place VARCHAR, player VARCHAR)
SELECT country FROM table_name_20 WHERE airport = "narita international airport"
Which country has the Narita International Airport?
CREATE TABLE table_name_20 (country VARCHAR, airport VARCHAR)
SELECT tournament FROM table_name_65 WHERE partner = "tom gorman"
What Tournament has a Partner of tom gorman?
CREATE TABLE table_name_65 (tournament VARCHAR, partner VARCHAR)
SELECT MAX(game) FROM table_29997127_4 WHERE location_attendance = "America West Arena 18,756"
In what game was the attendance at the America West Arena 18,756?
CREATE TABLE table_29997127_4 (game INTEGER, location_attendance VARCHAR)
SELECT COUNT(share) FROM table_22353769_3 WHERE viewers__millions_ = "3.62"
How many episodes had 3.62 million viewers?
CREATE TABLE table_22353769_3 (share VARCHAR, viewers__millions_ VARCHAR)
SELECT torque FROM table_name_38 WHERE power = "220kw (299hp) @ 4000"
Power of 220kw (299hp) @ 4000 has what torque?
CREATE TABLE table_name_38 (torque VARCHAR, power VARCHAR)
SELECT player FROM table_15621965_18 WHERE school_club_team = "Arizona"
WHO IS THE PLAYER(S) ON THE ROSTER FROM SCHOOL/CLUB TEAM ARIZONA?
CREATE TABLE table_15621965_18 (player VARCHAR, school_club_team VARCHAR)
SELECT live_births_per_year FROM table_18950570_2 WHERE deaths_per_year = "998 000"
How many births per year are there for the period with 998 000 deaths per year?
CREATE TABLE table_18950570_2 (live_births_per_year VARCHAR, deaths_per_year VARCHAR)
SELECT date FROM table_name_5 WHERE round = "2r"
What was the date for Round 2r?
CREATE TABLE table_name_5 (date VARCHAR, round VARCHAR)
SELECT player_name FROM table_10360656_1 WHERE position = "Quarterback"
What was the name of the quarterback drafted?
CREATE TABLE table_10360656_1 (player_name VARCHAR, position VARCHAR)
SELECT alumni FROM table_26419467_1 WHERE original_season = "RW: Cancun"
What alumni were in rw: cancun as their original season?
CREATE TABLE table_26419467_1 (alumni VARCHAR, original_season VARCHAR)
SELECT result FROM table_14608759_1 WHERE week = 4
What are week 4 results?
CREATE TABLE table_14608759_1 (result VARCHAR, week VARCHAR)
SELECT 3 AS rd_place FROM table_name_53 WHERE year = "2011"
What was the 3rd place value in 2011?
CREATE TABLE table_name_53 (year VARCHAR)
SELECT SUM(game) FROM table_name_52 WHERE opponent = "@ phoenix suns"
Opponent of @ phoenix suns had what sum of game?
CREATE TABLE table_name_52 (game INTEGER, opponent VARCHAR)
SELECT street_address FROM table_name_74 WHERE name = "notre dame basilica"
What is the street address of Notre Dame Basilica?
CREATE TABLE table_name_74 (street_address VARCHAR, name VARCHAR)
SELECT issue_price__bu_[_clarification_needed_] FROM table_name_35 WHERE year > 2002 AND mintage__proof_ = "50,000"
What's the Issue Price (BU) [Clarification Needed] with a Year larger than 2002 and Mintage (Proof) of 50,000?
CREATE TABLE table_name_35 (issue_price__bu_ VARCHAR, _clarification_needed_ VARCHAR, year VARCHAR, mintage__proof_ VARCHAR)
SELECT ihsaa_class FROM table_name_32 WHERE mascot = "pioneers"
Name the IHSAA Class of Mascot of pioneers?
CREATE TABLE table_name_32 (ihsaa_class VARCHAR, mascot VARCHAR)
SELECT event_3_deadlift FROM table_28540428_3 WHERE name = "Hennie Jordan"
Name the event 3 deadlift for hennie jordan
CREATE TABLE table_28540428_3 (event_3_deadlift VARCHAR, name VARCHAR)
SELECT date FROM table_name_6 WHERE opponent = "philadelphia 76ers"
What is Date, when Opponent is "Philadelphia 76ers"?
CREATE TABLE table_name_6 (date VARCHAR, opponent VARCHAR)
SELECT position FROM table_name_62 WHERE round = "t" AND team = "minneapolis lakers"
What was the position of the team Minneapolis Lakers during round T?
CREATE TABLE table_name_62 (position VARCHAR, round VARCHAR, team VARCHAR)
SELECT city FROM table_name_70 WHERE date = "october 26, 2007"
Which City has a Date on october 26, 2007
CREATE TABLE table_name_70 (city VARCHAR, date VARCHAR)
SELECT production_code FROM table_2226817_8 WHERE written_by = "Michael G. Moye"
What are all the production codes of episodes written by Michael G. Moye?
CREATE TABLE table_2226817_8 (production_code VARCHAR, written_by VARCHAR)
SELECT COUNT(party) FROM table_1341930_5 WHERE district = "Arkansas 1"
What is the number of party in the arkansas 1 district
CREATE TABLE table_1341930_5 (party VARCHAR, district VARCHAR)
SELECT location FROM table_name_89 WHERE callsign = "dxbl"
What is the Location of the Frequency with a Callsign of DXBL?
CREATE TABLE table_name_89 (location VARCHAR, callsign VARCHAR)
SELECT rank__number FROM table_name_53 WHERE result = "w42-14"
What was the rank# of the opponent when the result of the game was w42-14?
CREATE TABLE table_name_53 (rank__number VARCHAR, result VARCHAR)
SELECT SUM(november) FROM table_name_89 WHERE game < 16 AND points > 22
Which November has a Game smaller than 16, and Points larger than 22?
CREATE TABLE table_name_89 (november INTEGER, game VARCHAR, points VARCHAR)
SELECT record FROM table_name_65 WHERE game > 24
What is the record when the game is greater than 24?
CREATE TABLE table_name_65 (record VARCHAR, game INTEGER)
SELECT time___gmt__ FROM table_name_66 WHERE serial = "4a"
What is the time (GMT) for the 4A Serial?
CREATE TABLE table_name_66 (time___gmt__ VARCHAR, serial VARCHAR)
SELECT game FROM table_name_27 WHERE road_team = "utah jazz" AND result = "81-83 (3-2)"
Road Team of utah jazz, and a Result of 81-83 (3-2) involved what game?
CREATE TABLE table_name_27 (game VARCHAR, road_team VARCHAR, result VARCHAR)
SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games
Show ids of students who play video game and play sports.
CREATE TABLE Plays_games (StuID VARCHAR); CREATE TABLE Sportsinfo (StuID VARCHAR)
SELECT frequency FROM table_name_75 WHERE purpose = "commercial" AND on_air_id = "radio tab" AND callsign = "4tab"
4tab of commercial broadcaster Radio Tab broadcasts at what frequency?
CREATE TABLE table_name_75 (frequency VARCHAR, callsign VARCHAR, purpose VARCHAR, on_air_id VARCHAR)
SELECT tournament FROM table_name_21 WHERE date = "12 february 2001"
Which tournament was played on 12 February 2001?
CREATE TABLE table_name_21 (tournament VARCHAR, date VARCHAR)
SELECT losing_bonus FROM table_13399573_4 WHERE tries_against = "39"
In the 2008/2009 season one team had 39 tries against, how many losing bonuses did they have that year?
CREATE TABLE table_13399573_4 (losing_bonus VARCHAR, tries_against VARCHAR)
SELECT final FROM table_name_59 WHERE rank = "10"
Which final has rank of 10?
CREATE TABLE table_name_59 (final VARCHAR, rank VARCHAR)
SELECT COUNT(number_of_clubs) FROM table_17632217_1 WHERE runners_up = "Shandong"
How many values for number of clubs have Shandong as the runner-up?
CREATE TABLE table_17632217_1 (number_of_clubs VARCHAR, runners_up VARCHAR)
SELECT MAX(total) FROM table_name_80 WHERE gold = 0 AND silver > 0 AND nation = "ukraine"
Which total is highest with 0 gold and more than 0 silver, in Ukraine?
CREATE TABLE table_name_80 (total INTEGER, nation VARCHAR, gold VARCHAR, silver VARCHAR)
SELECT date FROM table_15736385_1 WHERE location = "Nazareth"
On what date was the race at Nazareth?
CREATE TABLE table_15736385_1 (date VARCHAR, location VARCHAR)
SELECT first_name, last_name FROM players ORDER BY birth_date
List the first and last name of all players in the order of birth date.
CREATE TABLE players (first_name VARCHAR, last_name VARCHAR, birth_date VARCHAR)
SELECT COUNT(candidates) FROM table_2668405_17 WHERE district = "Virginia 6"
How many were in district virginia 6?
CREATE TABLE table_2668405_17 (candidates VARCHAR, district VARCHAR)
SELECT object_type FROM table_name_81 WHERE ngc_number > 6995 AND right_ascension___j2000__ = "21h01m37.7s"
What Object Type has a 21h01m37.7s Right Ascension (J2000) and 6995 or greater NGC?
CREATE TABLE table_name_81 (object_type VARCHAR, ngc_number VARCHAR, right_ascension___j2000__ VARCHAR)
SELECT MAX(rank) FROM table_name_29 WHERE total < 15 AND bronze > 2 AND gold = 0 AND silver = 1
What is the highest rank of the medal total less than 15, more than 2 bronzes, 0 gold and 1 silver?
CREATE TABLE table_name_29 (rank INTEGER, silver VARCHAR, gold VARCHAR, total VARCHAR, bronze VARCHAR)
SELECT 2007 FROM table_name_25 WHERE 2006 = "wta premier tournaments"
What is the 2007 value for the 2006 wta premier tournaments?
CREATE TABLE table_name_25 (Id VARCHAR)
SELECT school FROM table_11677691_5 WHERE hometown = "Aledo, Texas"
Which school is in the hometown of Aledo, Texas?
CREATE TABLE table_11677691_5 (school VARCHAR, hometown VARCHAR)
SELECT MIN(total) FROM table_13606924_1 WHERE kerry__percentage = "16.71%"
what is the minimum total with kerry % being 16.71%
CREATE TABLE table_13606924_1 (total INTEGER, kerry__percentage VARCHAR)
SELECT AVG(to_iran) FROM table_name_9 WHERE survived < 9 AND aircraft = "ussr an-26" AND damaged > 3
What's the to Iran with fewer than 9 survivors, more than 3 damaged, and an ussr an-26 aircraft?
CREATE TABLE table_name_9 (to_iran INTEGER, damaged VARCHAR, survived VARCHAR, aircraft VARCHAR)
SELECT player FROM table_name_7 WHERE years_with_spurs = "1988-95"
What is Player, when Years With Spurs is 1988-95?
CREATE TABLE table_name_7 (player VARCHAR, years_with_spurs VARCHAR)
SELECT customer_id FROM customers WHERE customer_name LIKE "%Diana%"
Find the IDs of customers whose name contains "Diana".
CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR)
SELECT MIN(players) FROM table_10682862_68
What's the smallest number of players?
CREATE TABLE table_10682862_68 (players INTEGER)
SELECT score FROM table_name_48 WHERE set_2 = "15:21"
What is the score for Set 2 at 15:21?
CREATE TABLE table_name_48 (score VARCHAR, set_2 VARCHAR)
SELECT COUNT(*) FROM battle WHERE NOT id IN (SELECT lost_in_battle FROM ship WHERE tonnage = '225')
How many battles did not lose any ship with tonnage '225'?
CREATE TABLE ship (id VARCHAR, lost_in_battle VARCHAR, tonnage VARCHAR); CREATE TABLE battle (id VARCHAR, lost_in_battle VARCHAR, tonnage VARCHAR)
SELECT tv_time FROM table_name_49 WHERE week = 10
Name the tv time for week 10
CREATE TABLE table_name_49 (tv_time VARCHAR, week VARCHAR)
SELECT males FROM table_name_44 WHERE percentage___percentage_ = "87.5"
Which language do 87.5% of males speak?
CREATE TABLE table_name_44 (males VARCHAR, percentage___percentage_ VARCHAR)
SELECT decision FROM table_name_89 WHERE date = "april 18"
What was the Decision on April 18?
CREATE TABLE table_name_89 (decision VARCHAR, date VARCHAR)
SELECT date FROM table_name_33 WHERE game = "41"
What was the date for Game 41?
CREATE TABLE table_name_33 (date VARCHAR, game VARCHAR)
SELECT _number FROM table_20124413_2 WHERE prod_code = "2.6"
How many numbers have the product code of 2.6?
CREATE TABLE table_20124413_2 (_number VARCHAR, prod_code VARCHAR)
SELECT position FROM table_name_89 WHERE vehicle = "bmw" AND year = 2006
What position did the BMW vehicle made in 2006 hold?
CREATE TABLE table_name_89 (position VARCHAR, vehicle VARCHAR, year VARCHAR)
SELECT 2006 FROM table_name_72 WHERE 2009 = "0" AND tournament = "runner-ups"
What is the value in 2006 when the value for 2009 is 0 with runner-ups for tournament?
CREATE TABLE table_name_72 (tournament VARCHAR)
SELECT COUNT(league_goals) FROM table_name_84 WHERE fa_cup_apps = "0 (1)"
How many League Goals have an FA Cup Apps of 0 (1)?
CREATE TABLE table_name_84 (league_goals VARCHAR, fa_cup_apps VARCHAR)
SELECT COUNT(total) FROM table_name_43 WHERE silver > 0 AND gold < 5 AND bronze < 0
If there are more than 0 Silver medals, less than 5 gold medals, and no bronze medals, what was the total number of medals?
CREATE TABLE table_name_43 (total VARCHAR, bronze VARCHAR, silver VARCHAR, gold VARCHAR)
SELECT visiting_team FROM table_name_36 WHERE date = "october 18"
What visiting team played on October 18?
CREATE TABLE table_name_36 (visiting_team VARCHAR, date VARCHAR)
SELECT participle FROM table_12784134_1 WHERE verbal_noun = "i-bil-tze"
What's the participle when the verbal noun is i-bil-tze?
CREATE TABLE table_12784134_1 (participle VARCHAR, verbal_noun VARCHAR)
SELECT MAX(round) FROM table_name_67 WHERE school_club_team = "cal-poly slo" AND pick < 238
Which Round has a School/Club Team of cal-poly slo, and a Pick smaller than 238?
CREATE TABLE table_name_67 (round INTEGER, school_club_team VARCHAR, pick VARCHAR)
SELECT COUNT(DISTINCT Governor) FROM party
How many distinct governors are there?
CREATE TABLE party (Governor VARCHAR)
SELECT date FROM table_name_3 WHERE catalog = "alca-275"
On what date was the record with catalog ALCA-275 released?
CREATE TABLE table_name_3 (date VARCHAR, catalog VARCHAR)
SELECT date FROM table_name_68 WHERE record = "2–1–1"
What is the Date with a game with a Record of 2–1–1?
CREATE TABLE table_name_68 (date VARCHAR, record VARCHAR)
SELECT MIN(fa_cup_goals) FROM table_name_10 WHERE name = "dick taylor" AND league_goals < 0
How many FA cup goals did dick taylor score in the year that he had 0 league goals?
CREATE TABLE table_name_10 (fa_cup_goals INTEGER, name VARCHAR, league_goals VARCHAR)
SELECT runner_up FROM table_name_87 WHERE event = "mancora peru classic"
What is Runner-up, when Event is Mancora Peru Classic?
CREATE TABLE table_name_87 (runner_up VARCHAR, event VARCHAR)
SELECT constructor FROM table_name_49 WHERE grid > 19 AND time_retired = "suspension"
Who constructed the car with a grid over 19 that retired due to suspension?
CREATE TABLE table_name_49 (constructor VARCHAR, grid VARCHAR, time_retired VARCHAR)
SELECT position FROM table_11734041_7 WHERE years_for_rockets = "2008"
What are all the positions for the rockets in 2008?
CREATE TABLE table_11734041_7 (position VARCHAR, years_for_rockets VARCHAR)
SELECT name FROM table_name_4 WHERE red_list = 7 AND order = "artiodactyla" AND species_authority = "cervus elaphus linnaeus, 1758"
What is the name for the red list of 7, the artiodactyla order, and Species Authority of cervus elaphus linnaeus, 1758?
CREATE TABLE table_name_4 (name VARCHAR, species_authority VARCHAR, red_list VARCHAR, order VARCHAR)
SELECT successor FROM table_2159571_2 WHERE district = "Washington 3rd"
Who is every successor for the Washington 3rd District?
CREATE TABLE table_2159571_2 (successor VARCHAR, district VARCHAR)
SELECT title FROM table_2453243_5 WHERE production_code = "406"
What is the title of the episode with production code 406?
CREATE TABLE table_2453243_5 (title VARCHAR, production_code VARCHAR)
SELECT years_in_senate FROM table_name_23 WHERE years_in_assembly = "2010–present" AND name = "toni atkins"
Which Years in Senate has a Years in Assembly of 2010–present, and toni atkins?
CREATE TABLE table_name_23 (years_in_senate VARCHAR, years_in_assembly VARCHAR, name VARCHAR)
SELECT record FROM table_name_43 WHERE attendance > 28 OFFSET 459
Which record has an attendance larger than 28,459?
CREATE TABLE table_name_43 (record VARCHAR, attendance INTEGER)
SELECT gross_revenue__2011_ FROM table_name_8 WHERE state = "mo"
What is the gross revenue in 2011 for MO?
CREATE TABLE table_name_8 (gross_revenue__2011_ VARCHAR, state VARCHAR)
SELECT MAX(lost) FROM table_name_51 WHERE played < 9
What is the greatest lost where played is less than 9?
CREATE TABLE table_name_51 (lost INTEGER, played INTEGER)
SELECT date FROM table_name_55 WHERE set_3 = "21–25"
Which Date has a Set 3 of 21–25?
CREATE TABLE table_name_55 (date VARCHAR, set_3 VARCHAR)
SELECT d_44 FROM table_name_70 WHERE d_41 = "d 16"
What is the D44 when D41 is D 16?
CREATE TABLE table_name_70 (d_44 VARCHAR, d_41 VARCHAR)
SELECT brooklyn FROM table_1108394_6 WHERE manhattan = "3,139"
What was the total in Brooklyn when Manhattan was 3,139?
CREATE TABLE table_1108394_6 (brooklyn VARCHAR, manhattan VARCHAR)
SELECT result FROM table_name_19 WHERE venue = "fort lauderdale, florida"
What is the result in fort lauderdale, florida?
CREATE TABLE table_name_19 (result VARCHAR, venue VARCHAR)
SELECT laps FROM table_name_31 WHERE grid > 1 AND time_retired = "halfshaft"
How many laps for a grid larger than 1 with a Time/Retired of halfshaft?
CREATE TABLE table_name_31 (laps VARCHAR, grid VARCHAR, time_retired VARCHAR)
SELECT name FROM table_name_49 WHERE goals > 14 AND transfer_fee = "youth system"
What is Name, when Goals is greater than 14, and when Transfer Fee is "Youth System"?
CREATE TABLE table_name_49 (name VARCHAR, goals VARCHAR, transfer_fee VARCHAR)
SELECT os_x FROM table_name_88 WHERE name = "home media center"
What is the OS X for the Home Media Center?
CREATE TABLE table_name_88 (os_x VARCHAR, name VARCHAR)
SELECT COUNT(high_points) FROM table_13762472_3 WHERE team = "New Orleans/Oklahoma City"
How many players scored the most points when the opposing team was New Orleans/Oklahoma City?
CREATE TABLE table_13762472_3 (high_points VARCHAR, team VARCHAR)
SELECT city___municipality FROM table_232458_1 WHERE pop_density__per_km²_ = "1,388.88"
What is the name of the city/municipality if the population is 1,388.88?
CREATE TABLE table_232458_1 (city___municipality VARCHAR, pop_density__per_km²_ VARCHAR)
SELECT team FROM table_name_75 WHERE date = "march 27"
What is Team, when Date is "March 27"?
CREATE TABLE table_name_75 (team VARCHAR, date VARCHAR)
SELECT viewers__in_millions_ FROM table_2108684_1 WHERE run_time = "25:22"
How many million viewers watched the episode with a run time of 25:22?
CREATE TABLE table_2108684_1 (viewers__in_millions_ VARCHAR, run_time VARCHAR)
SELECT pole_position FROM table_23315271_2 WHERE circuit = "Misano World circuit"
Who held the pole position in misano world circuit?
CREATE TABLE table_23315271_2 (pole_position VARCHAR, circuit VARCHAR)
SELECT score FROM table_name_14 WHERE attendance = 303
What is Score, when Attendance is "303"?
CREATE TABLE table_name_14 (score VARCHAR, attendance VARCHAR)
SELECT drawn FROM table_name_56 WHERE club = "llanishen rfc"
What was drawn for llanishen rfc?
CREATE TABLE table_name_56 (drawn VARCHAR, club VARCHAR)
SELECT MAX(year) FROM table_name_33 WHERE extra = "pentathlon"
What is the highest Year, when Extra is Pentathlon?
CREATE TABLE table_name_33 (year INTEGER, extra VARCHAR)
SELECT AVG(attendance) FROM table_name_86 WHERE record = "83-52"
What is the average attendance that has 83-52 as the record?
CREATE TABLE table_name_86 (attendance INTEGER, record VARCHAR)
SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id
get the details of employees who manage a department.
CREATE TABLE departments (department_id VARCHAR, manager_id VARCHAR); CREATE TABLE employees (department_id VARCHAR, employee_id VARCHAR)
SELECT nation_of_citizenship FROM table_name_12 WHERE year_of_award > 2011
What is the nation of citizenship for athletes later than 2011 year of award?
CREATE TABLE table_name_12 (nation_of_citizenship VARCHAR, year_of_award INTEGER)
SELECT COUNT(incumbent) FROM table_1342256_11 WHERE first_elected = 1926
How many incumbents were elected in the 1926 election?
CREATE TABLE table_1342256_11 (incumbent VARCHAR, first_elected VARCHAR)
SELECT MIN(week) FROM table_name_93 WHERE result = "l 13–10" AND date = "november 30, 1975" AND attendance > 44 OFFSET 982
What is the lowest Week when the result was l 13–10, November 30, 1975, with more than 44,982 people in attendance?
CREATE TABLE table_name_93 (week INTEGER, attendance VARCHAR, result VARCHAR, date VARCHAR)
SELECT tatsuhito_takaiwa FROM table_name_38 WHERE koji_kanemoto = "liger (20:29)"
Which Tatsuhito Takaiwa has a Koji Kanemoto of liger (20:29)?
CREATE TABLE table_name_38 (tatsuhito_takaiwa VARCHAR, koji_kanemoto VARCHAR)