answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT production_code FROM table_26259391_1 WHERE written_by = "Andrew Goldberg"
which production codes were written by andrew goldberg
CREATE TABLE table_26259391_1 (production_code VARCHAR, written_by VARCHAR)
SELECT SUM(attendance) FROM table_name_62 WHERE away_team = "banbury united" AND tie_no > 102
What's the sum of attendance when banbury united is the away team and tie no is over 102?
CREATE TABLE table_name_62 (attendance INTEGER, away_team VARCHAR, tie_no VARCHAR)
SELECT COUNT(game) FROM table_name_56 WHERE opponent = "montreal canadiens"
What is the fame number when the Montreal Canadiens were the opponent?
CREATE TABLE table_name_56 (game VARCHAR, opponent VARCHAR)
SELECT grant_id, COUNT(*) FROM Documents GROUP BY grant_id ORDER BY COUNT(*) DESC LIMIT 1
How many documents can one grant have at most? List the grant id and number.
CREATE TABLE Documents (grant_id VARCHAR)
SELECT away_team FROM table_name_44 WHERE home_team = "wrexham"
What away team has wrexham as the home team?
CREATE TABLE table_name_44 (away_team VARCHAR, home_team VARCHAR)
SELECT finish FROM table_name_79 WHERE country = "australia"
What is Australia´s finish?
CREATE TABLE table_name_79 (finish VARCHAR, country VARCHAR)
SELECT date FROM table_name_98 WHERE tie_no = "6"
What is the date when tie number is 6?
CREATE TABLE table_name_98 (date VARCHAR, tie_no VARCHAR)
SELECT to_par FROM table_name_58 WHERE place = "t1" AND score = 70 - 72 - 73 - 72 = 287
What's the to par for the t1 place with a score of 70-72-73-72=287?
CREATE TABLE table_name_58 (to_par VARCHAR, place VARCHAR, score VARCHAR)
SELECT host_team FROM table_name_53 WHERE visiting_team = "kansas city chiefs"
Which team hosted the Kansas City Chiefs?
CREATE TABLE table_name_53 (host_team VARCHAR, visiting_team VARCHAR)
SELECT SUM(matches) FROM table_name_25 WHERE player = "jim laker" AND wickets < 9
what is the sum of matches when the player is jim laker and wikets is less than 9?
CREATE TABLE table_name_25 (matches INTEGER, player VARCHAR, wickets VARCHAR)
SELECT venue FROM table_name_63 WHERE against > 19
Which venue has more than 19 against?
CREATE TABLE table_name_63 (venue VARCHAR, against INTEGER)
SELECT season FROM table_name_97 WHERE name = "marcio lassiter"
What season had Marcio Lassiter?
CREATE TABLE table_name_97 (season VARCHAR, name VARCHAR)
SELECT score FROM table_name_83 WHERE player = "nick faldo"
What is the score for Nick Faldo?
CREATE TABLE table_name_83 (score VARCHAR, player VARCHAR)
SELECT place FROM table_name_33 WHERE score = 75 - 71 - 72 - 70 = 288
What is Place, when Score is "75-71-72-70=288"?
CREATE TABLE table_name_33 (place VARCHAR, score VARCHAR)
SELECT position FROM table_11803648_22 WHERE player = "Tobias Lindberg"
What is the position of player Tobias Lindberg?
CREATE TABLE table_11803648_22 (position VARCHAR, player VARCHAR)
SELECT music FROM table_name_57 WHERE results = "safe" AND choreographer_s_ = "jason gilkison"
Which music led to a safe result and was choreographed by Jason Gilkison?
CREATE TABLE table_name_57 (music VARCHAR, results VARCHAR, choreographer_s_ VARCHAR)
SELECT COUNT(event_2_truck_pull) FROM table_24302700_2 WHERE event_1_medley = "6 (16.6m)"
How many men had an event 1 medley score of 6 (16.6m)?
CREATE TABLE table_24302700_2 (event_2_truck_pull VARCHAR, event_1_medley VARCHAR)
SELECT COUNT(drawn) FROM table_name_49 WHERE points < 23 AND lost = 6 AND against > 21
How many draws were there when there were points less than 23, 6 losses, and more than 21 against?
CREATE TABLE table_name_49 (drawn VARCHAR, against VARCHAR, points VARCHAR, lost VARCHAR)
SELECT original_air_date FROM table_21172539_1 WHERE no_in_season = 15
What date did episode 15 of the season originally air?
CREATE TABLE table_21172539_1 (original_air_date VARCHAR, no_in_season VARCHAR)
SELECT dance_styles FROM table_name_54 WHERE draw < 15 AND points = 18
Which dance style had a draw smaller than 15 and 18 points?
CREATE TABLE table_name_54 (dance_styles VARCHAR, draw VARCHAR, points VARCHAR)
SELECT COUNT(pick__number) FROM table_name_46 WHERE round < 6 AND overall = 102
Name the total number of pick with round less than 6 and overall of 102
CREATE TABLE table_name_46 (pick__number VARCHAR, round VARCHAR, overall VARCHAR)
SELECT COUNT(value__) AS $m_ FROM table_name_21 WHERE revenue__$m_ > 193 AND rank < 12 AND team = "manchester united"
Name the total number of value for revenue more than 193 and rank less than 12 for manchester united
CREATE TABLE table_name_21 (value__ VARCHAR, team VARCHAR, revenue__$m_ VARCHAR, rank VARCHAR)
SELECT MAX(yards) FROM table_name_51 WHERE rec < 54 AND long < 5 AND player = "todd herremans" AND avg > 1
Which Yards is the highest one that has a Rec smaller than 54, and a Long smaller than 5, and a Player of todd herremans, and an Avg larger than 1?
CREATE TABLE table_name_51 (yards INTEGER, avg VARCHAR, player VARCHAR, rec VARCHAR, long VARCHAR)
SELECT results FROM table_name_44 WHERE choreographer = "kelly aykers"
What is the Result of the dance Choreographed by Kelly Aykers?
CREATE TABLE table_name_44 (results VARCHAR, choreographer VARCHAR)
SELECT stroke FROM table_name_39 WHERE max_power = "109 ps(80kw)@4000 rpm"
What stroke has a max power of 109 ps(80kw)@4000 rpm?
CREATE TABLE table_name_39 (stroke VARCHAR, max_power VARCHAR)
SELECT class FROM table_name_72 WHERE manufacturer = "eastleigh works" AND year_made = "1914" AND year_s__withdrawn = "1959"
What is the class of the locomotive with an Eastleigh Works manufacturer, made in 1914, and withdrawn in 1959?
CREATE TABLE table_name_72 (class VARCHAR, year_s__withdrawn VARCHAR, manufacturer VARCHAR, year_made VARCHAR)
SELECT purse___us$__ FROM table_name_30 WHERE dist = "1 mile" AND winning_horse = "crafty bear"
How much money did Crafty Bear wins with a dist of 1 mile?
CREATE TABLE table_name_30 (purse___us$__ VARCHAR, dist VARCHAR, winning_horse VARCHAR)
SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1
List the software platform shared by the greatest number of devices.
CREATE TABLE device (Software_Platform VARCHAR)
SELECT developer_s_ FROM table_name_22 WHERE genre = "adventure"
Who was the developer(s) of the genre Adventure?
CREATE TABLE table_name_22 (developer_s_ VARCHAR, genre VARCHAR)
SELECT runs FROM table_name_53 WHERE opponent = "south australia"
Which Runs has a Opponent of south australia?
CREATE TABLE table_name_53 (runs VARCHAR, opponent VARCHAR)
SELECT rocket FROM table_name_41 WHERE block = "block i" AND cospar_id = "1995-060a"
What rocket has a Block of block i and a COSPAR ID of 1995-060a?
CREATE TABLE table_name_41 (rocket VARCHAR, block VARCHAR, cospar_id VARCHAR)
SELECT high_assists FROM table_name_28 WHERE date = "february 22"
Who had the highest assists during the game on February 22?
CREATE TABLE table_name_28 (high_assists VARCHAR, date VARCHAR)
SELECT DISTINCT grade FROM list WHERE classroom = 103
Which grade is studying in classroom 103?
CREATE TABLE list (grade VARCHAR, classroom VARCHAR)
SELECT high_rebounds FROM table_name_55 WHERE high_assists = "a. johnson (14)"
Who had the highest rebounds of the game with A. Johnson (14) as the highest assists?
CREATE TABLE table_name_55 (high_rebounds VARCHAR, high_assists VARCHAR)
SELECT SUM(game) FROM table_name_11 WHERE january < 19 AND record = "27-6-6"
What is the sum of the games before January 19 with a 27-6-6 record?
CREATE TABLE table_name_11 (game INTEGER, january VARCHAR, record VARCHAR)
SELECT us_viewers__million_ FROM table_25548213_1 WHERE written_by = "Kevin Biegel & Aseem Batra"
How many million viewers watch the episode that kevin biegel & aseem batra wrote?
CREATE TABLE table_25548213_1 (us_viewers__million_ VARCHAR, written_by VARCHAR)
SELECT date FROM table_name_35 WHERE fastest_lap = "patrick tambay"
What day did Patrick Tambay have the fastest lap?
CREATE TABLE table_name_35 (date VARCHAR, fastest_lap VARCHAR)
SELECT home_team AS score FROM table_name_53 WHERE home_team = "fitzroy"
What is the score for Fitzroy when they are the home team?
CREATE TABLE table_name_53 (home_team VARCHAR)
SELECT name FROM table_2482547_5 WHERE average = "15.89"
What are the names of all the players with an average of 15.89?
CREATE TABLE table_2482547_5 (name VARCHAR, average VARCHAR)
SELECT COUNT(points) FROM table_name_49 WHERE year > 1991
What are the Points after 1991?
CREATE TABLE table_name_49 (points VARCHAR, year INTEGER)
SELECT COUNT(pinyin) FROM table_1638437_2 WHERE simplified = "河西区"
Name the number of pinyin where simplified is 河西区
CREATE TABLE table_1638437_2 (pinyin VARCHAR, simplified VARCHAR)
SELECT diameter__km_ FROM table_name_5 WHERE diameter__mi_ = "5mi"
What shows as the Diameter (km) when the Diameter (mi) is 5mi?
CREATE TABLE table_name_5 (diameter__km_ VARCHAR, diameter__mi_ VARCHAR)
SELECT fname, lname FROM student WHERE major <> (SELECT major FROM student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1)
Find the first and last name of students who are not in the largest major.
CREATE TABLE student (fname VARCHAR, lname VARCHAR, major VARCHAR)
SELECT score FROM table_name_6 WHERE opponent = "indians" AND record = "21-19"
What was score of the Blue Jays' game versus the Indians when their record was 21-19?
CREATE TABLE table_name_6 (score VARCHAR, opponent VARCHAR, record VARCHAR)
SELECT AVG(points) FROM table_name_35 WHERE rank = "2nd" AND draw > 3
What is the average number of points for a song ranked 2nd with a draw greater than 3?
CREATE TABLE table_name_35 (points INTEGER, rank VARCHAR, draw VARCHAR)
SELECT location FROM table_2562113_1 WHERE nickname = "Lions"
What is the location of the institution nicknamed Lions?
CREATE TABLE table_2562113_1 (location VARCHAR, nickname VARCHAR)
SELECT player FROM table_name_86 WHERE school_club_team = "auburn"
Who is the player from Auburn?
CREATE TABLE table_name_86 (player VARCHAR, school_club_team VARCHAR)
SELECT MAX(overall) FROM table_name_33 WHERE slalom = "39" AND season < 1996
What is the highest overall prior to 1996 with a slalom of 39?
CREATE TABLE table_name_33 (overall INTEGER, slalom VARCHAR, season VARCHAR)
SELECT date_of_vacancy FROM table_22133191_3 WHERE manner_of_departure = "End of caretaker contract"
What is the date of vacancy for the person that left because of end of caretaker contract?
CREATE TABLE table_22133191_3 (date_of_vacancy VARCHAR, manner_of_departure VARCHAR)
SELECT COUNT(huckleberry_hound) FROM table_19860361_4 WHERE air_date = "1960.09.18"
How many Huckleberry Hound episodes were aired on 1960.09.18?
CREATE TABLE table_19860361_4 (huckleberry_hound VARCHAR, air_date VARCHAR)
SELECT COUNT(points) FROM table_name_24 WHERE wins > 0
How many Points has Wins larger than 0?
CREATE TABLE table_name_24 (points VARCHAR, wins INTEGER)
SELECT years_for_jazz FROM table_name_43 WHERE position = "guard" AND school_club_team = "notre dame"
At Position of guard, from the School/Club Team Notre Dame, how many Years for Jazz did that person play?
CREATE TABLE table_name_43 (years_for_jazz VARCHAR, position VARCHAR, school_club_team VARCHAR)
SELECT high_points FROM table_name_2 WHERE team = "charlotte"
Name the high points for charlotte
CREATE TABLE table_name_2 (high_points VARCHAR, team VARCHAR)
SELECT MAX(number) FROM table_1749567_2 WHERE name = "Eyserweg"
The Eyserweg race was which race #?
CREATE TABLE table_1749567_2 (number INTEGER, name VARCHAR)
SELECT year FROM table_name_7 WHERE gen_secretary = "silvana jansen"
Which year has a Gen.-Secretary of silvana jansen?
CREATE TABLE table_name_7 (year VARCHAR, gen_secretary VARCHAR)
SELECT runs FROM table_name_52 WHERE opponent = "canterbury"
Which Run has an Opponent of Canterbury?
CREATE TABLE table_name_52 (runs VARCHAR, opponent VARCHAR)
SELECT MAX(year) FROM table_name_89 WHERE accolade = "singles of 1999" AND rank = "22"
Name the highest year with rank of 22 and accolade of singles of 1999
CREATE TABLE table_name_89 (year INTEGER, accolade VARCHAR, rank VARCHAR)
SELECT team FROM table_name_81 WHERE player = "a.j. moye"
Which Team has the Player of A.J. Moye?
CREATE TABLE table_name_81 (team VARCHAR, player VARCHAR)
SELECT result FROM table_name_47 WHERE goals = "deacon 2/5"
Which result has a Goal of deacon 2/5?
CREATE TABLE table_name_47 (result VARCHAR, goals VARCHAR)
SELECT viewers_millions_ FROM table_12919003_3 WHERE episode = "episode 5"
How many millions of viewers did watch Episode 5?
CREATE TABLE table_12919003_3 (viewers_millions_ VARCHAR, episode VARCHAR)
SELECT COUNT(*) FROM building
How many buildings are there?
CREATE TABLE building (Id VARCHAR)
SELECT affiliation FROM table_name_53 WHERE nickname = "ramblers"
Who is affiliated with the nickname Ramblers?
CREATE TABLE table_name_53 (affiliation VARCHAR, nickname VARCHAR)
SELECT time FROM table_18438494_3 WHERE wrestler = "Cena"
What was the time for the match with Cena?
CREATE TABLE table_18438494_3 (time VARCHAR, wrestler VARCHAR)
SELECT outgoing_manager FROM table_16075179_6 WHERE team = "Aberdeen"
Who was the outgoing manager for Aberdeen?
CREATE TABLE table_16075179_6 (outgoing_manager VARCHAR, team VARCHAR)
SELECT event FROM table_name_7 WHERE location = "tokyo, japan" AND record = "6-1"
what is the even when the location is tokyo, japan and the record is 6-1?
CREATE TABLE table_name_7 (event VARCHAR, location VARCHAR, record VARCHAR)
SELECT MIN(rank) FROM table_name_27 WHERE name = "maribor cathedral"
Which Rank is the lowest one that has a Name of maribor cathedral?
CREATE TABLE table_name_27 (rank INTEGER, name VARCHAR)
SELECT result FROM table_1342218_17 WHERE district = "Kentucky 2"
What was the result in the voting district Kentucky 2?
CREATE TABLE table_1342218_17 (result VARCHAR, district VARCHAR)
SELECT winner FROM table_23157997_13 WHERE mountains_classification = "Tom Zirbel" AND points_classification = "Thomas Soladay"
Who won the race with Tom Zirbel as Mountains Classification and Thomas Soladay as Points Classification?
CREATE TABLE table_23157997_13 (winner VARCHAR, mountains_classification VARCHAR, points_classification VARCHAR)
SELECT COUNT(goals) FROM table_name_76 WHERE position = "df" AND nationality = "england" AND crewe_alexandra_career = "1948–1951"
What is the number of goals when the position is DF, the nationality is England, and the Crewe Alexandra career is 1948–1951?
CREATE TABLE table_name_76 (goals VARCHAR, crewe_alexandra_career VARCHAR, position VARCHAR, nationality VARCHAR)
SELECT title FROM table_name_4 WHERE year < 2011 AND network = "kbs2" AND genre = "drama"
What's the title when the genre is drama and network of KBS2 happening before 2011?
CREATE TABLE table_name_4 (title VARCHAR, genre VARCHAR, year VARCHAR, network VARCHAR)
SELECT result FROM table_name_78 WHERE date = "november 6, 1966"
What is the Result of the game on November 6, 1966?
CREATE TABLE table_name_78 (result VARCHAR, date VARCHAR)
SELECT MAX(population_august_15), _2012 FROM table_12496904_1 WHERE population_density_2012__km_2__ = 307
What is the August 15, 2012 population when the population density of 2012 is 307?
CREATE TABLE table_12496904_1 (_2012 VARCHAR, population_august_15 INTEGER, population_density_2012__km_2__ VARCHAR)
SELECT MIN(wins) FROM table_name_46 WHERE club = "broadview hawks" AND points_against > 594
What is the lowest Wins when the Club is broadview hawks, and Points Against is more than 594?
CREATE TABLE table_name_46 (wins INTEGER, club VARCHAR, points_against VARCHAR)
SELECT AVG(crowd) FROM table_name_38 WHERE away_team = "collingwood"
What is the average crowd when the team Collingwood was away?
CREATE TABLE table_name_38 (crowd INTEGER, away_team VARCHAR)
SELECT directed_by FROM table_27776266_1 WHERE us_viewers__million_ = "14.11"
Who directed the episode with an audience of 14.11 million?
CREATE TABLE table_27776266_1 (directed_by VARCHAR, us_viewers__million_ VARCHAR)
SELECT SUM(place) FROM table_name_79 WHERE song = "never change"
What is the place of the song 'Never Change'?
CREATE TABLE table_name_79 (place INTEGER, song VARCHAR)
SELECT type FROM table_name_69 WHERE moving_from = "gimnàstic"
What is the type when they move from Gimnàstic?
CREATE TABLE table_name_69 (type VARCHAR, moving_from VARCHAR)
SELECT original_air_date FROM table_2818164_4 WHERE production_code = 322
What was the air date of the episode with the production code of 322?
CREATE TABLE table_2818164_4 (original_air_date VARCHAR, production_code VARCHAR)
SELECT COUNT(attendance) FROM table_17120964_8 WHERE result = "Lost 5-3"
How many attendance figures are given for the game where the final score was lost 5-3?
CREATE TABLE table_17120964_8 (attendance VARCHAR, result VARCHAR)
SELECT format FROM table_name_65 WHERE notes = "licensed to hope" AND frequency = "fm 100.5"
What is the Format of FM 100.5 Licensed to Hope?
CREATE TABLE table_name_65 (format VARCHAR, notes VARCHAR, frequency VARCHAR)
SELECT term_ended FROM table_1602620_1 WHERE elected = 1990
What year did the term end for those elected in 1990
CREATE TABLE table_1602620_1 (term_ended VARCHAR, elected VARCHAR)
SELECT stage FROM table_name_90 WHERE route = "boulogne-billancourt"
Which stage took the tour through Boulogne-Billancourt?
CREATE TABLE table_name_90 (stage VARCHAR, route VARCHAR)
SELECT score FROM table_name_42 WHERE home_team = "kidderminster harriers"
What is the score for the match that had a home team of Kidderminster Harriers?
CREATE TABLE table_name_42 (score VARCHAR, home_team VARCHAR)
SELECT bronze FROM table_name_50 WHERE total > 2 AND gold = "1" AND silver = "4"
What is the bronze when silver is 4 and gold is 1 and the total is more than 2
CREATE TABLE table_name_50 (bronze VARCHAR, silver VARCHAR, total VARCHAR, gold VARCHAR)
SELECT SUM(dwellings) FROM table_name_37 WHERE neighbourhood = "beverly heights" AND change___percentage_ > -5.2
How many Dwellings does Beverly Heights have that have a change percent larger than -5.2?
CREATE TABLE table_name_37 (dwellings INTEGER, neighbourhood VARCHAR, change___percentage_ VARCHAR)
SELECT 2005 AS _06_points FROM table_23215145_2 WHERE team = "Worcester"
If the team is Worcester, what is the 2005-2006 points?
CREATE TABLE table_23215145_2 (team VARCHAR)
SELECT AVG(qiangshu) FROM table_name_45 WHERE rank > 4 AND jianshu < 9.22
What is the average Qiangshu lower than rank 4 and less than 9.22 Jianshu?
CREATE TABLE table_name_45 (qiangshu INTEGER, rank VARCHAR, jianshu VARCHAR)
SELECT MAX(water__sqmi_) FROM table_name_91 WHERE pop__2010_ = 359 AND longitude < -97.176811
Which Water (sqmi) has a Pop (2010) of 359, and a Longitude smaller than -97.176811?
CREATE TABLE table_name_91 (water__sqmi_ INTEGER, pop__2010_ VARCHAR, longitude VARCHAR)
SELECT AVG(nominated_by_the_taoiseach) FROM table_name_10 WHERE agricultural_panel < 1 AND administrative_panel < 0
What was the average number of members Nominated by the Taoiseach, when the Agricultural Panel had less than 1 member, and when the Administrative Panel had fewer than 0 members?
CREATE TABLE table_name_10 (nominated_by_the_taoiseach INTEGER, agricultural_panel VARCHAR, administrative_panel VARCHAR)
SELECT team FROM table_name_59 WHERE pick > 29
WHAT TEAM HAS A PICK LARGER THAN 29?
CREATE TABLE table_name_59 (team VARCHAR, pick INTEGER)
SELECT SUM(bronze) FROM table_name_22 WHERE silver > 0 AND total < 1
What is the sum of bronzes for teams with more than 0 silver and a total under 1?
CREATE TABLE table_name_22 (bronze INTEGER, silver VARCHAR, total VARCHAR)
SELECT engine FROM table_name_78 WHERE displacement = "1,585 cc" AND model = "90i"
Which of the engines has a displacement of 1,585 cc, with a model number of 90i?
CREATE TABLE table_name_78 (engine VARCHAR, displacement VARCHAR, model VARCHAR)
SELECT candidates FROM table_1341865_45 WHERE incumbent = "Jack Brooks"
Who ran in the race for Jack Brooks' seat?
CREATE TABLE table_1341865_45 (candidates VARCHAR, incumbent VARCHAR)
SELECT date FROM table_name_80 WHERE home = "romania" AND venue = "bucharest" AND score = "13-19"
What date were Romania at Home at the Bucharest Venue with a Score of 13-19?
CREATE TABLE table_name_80 (date VARCHAR, score VARCHAR, home VARCHAR, venue VARCHAR)
SELECT COUNT(attendance) FROM table_name_59 WHERE home = "ny islanders"
What is the attendance of the game with the NY Islanders as home team?
CREATE TABLE table_name_59 (attendance VARCHAR, home VARCHAR)
SELECT population__percentage_1971 FROM table_name_14 WHERE population__percentage_1961 = "1.79%"
For the group with 1.79% population in 1961, what was their percentage of the population in 1971?
CREATE TABLE table_name_14 (population__percentage_1971 VARCHAR, population__percentage_1961 VARCHAR)
SELECT partner FROM table_name_24 WHERE opponents = "wayne arthurs sandon stolle"
Which Partner has an Opponents of wayne arthurs sandon stolle?
CREATE TABLE table_name_24 (partner VARCHAR, opponents VARCHAR)
SELECT record FROM table_name_6 WHERE date = "15 december" AND round = "final"
What is the record for the date 15 december, and a round of final?
CREATE TABLE table_name_6 (record VARCHAR, date VARCHAR, round VARCHAR)
SELECT stake FROM table_name_98 WHERE occupation = "realtor for american equity realty"
What stake has realtor for American equity realty as their occupation?
CREATE TABLE table_name_98 (stake VARCHAR, occupation VARCHAR)
SELECT actor_required FROM table_name_24 WHERE flatspin = "edna stricken"
Who is the actor required when Edna Stricken is the FlatSpin actor?
CREATE TABLE table_name_24 (actor_required VARCHAR, flatspin VARCHAR)