answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT AVG(avg) FROM table_name_16 WHERE yards = 124 AND rec < 13
What is the average of the player with 124 yards and less than 13 rec.?
CREATE TABLE table_name_16 (avg INTEGER, yards VARCHAR, rec VARCHAR)
SELECT tournament FROM table_name_70 WHERE score = "6–4, 4–6, 7–5"
Which tournament had a score of 6–4, 4–6, 7–5?
CREATE TABLE table_name_70 (tournament VARCHAR, score VARCHAR)
SELECT SUM(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2
find the total market rate of the furnitures that have the top 2 market shares.
CREATE TABLE furniture (market_rate INTEGER)
SELECT to FROM table_21220720_1 WHERE league_apps = 19
Name the to for 19 league apps
CREATE TABLE table_21220720_1 (to VARCHAR, league_apps VARCHAR)
SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Afghanistan" AND IsOfficial = "T"
How many official languages does Afghanistan have?
CREATE TABLE country (Code VARCHAR, Name VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR)
SELECT time FROM table_name_96 WHERE grid < 8 AND rider = "troy bayliss"
What is the time of Troy Bayliss with less than 8 grids?
CREATE TABLE table_name_96 (time VARCHAR, grid VARCHAR, rider VARCHAR)
SELECT race FROM table_name_47 WHERE event = "goodwood trophy" AND driver = "reg parnell"
At which race did reg parnell win the goodwood trophy?
CREATE TABLE table_name_47 (race VARCHAR, event VARCHAR, driver VARCHAR)
SELECT SUM(evening_gown) FROM table_name_84 WHERE interview = 9.22 AND preliminaries > 9.057
What is the evening gown score where the interview score is 9.22 and the preliminaries are larger than 9.057?
CREATE TABLE table_name_84 (evening_gown INTEGER, interview VARCHAR, preliminaries VARCHAR)
SELECT title_of_work FROM table_name_17 WHERE year > 2009
Tell me the title of work for year more than 2009
CREATE TABLE table_name_17 (title_of_work VARCHAR, year INTEGER)
SELECT 4 AS th_day FROM table_name_52 WHERE year < 2012 AND finish_position = "33rd"
What was the 4th day in the year before 2012 that the finish is 33rd?
CREATE TABLE table_name_52 (year VARCHAR, finish_position VARCHAR)
SELECT COUNT(rank) FROM table_12280396_1 WHERE peak = "Fresvikbreen"
What is the number of rank of peak fresvikbreen?
CREATE TABLE table_12280396_1 (rank VARCHAR, peak VARCHAR)
SELECT date FROM table_name_73 WHERE nationality = "great britain" AND ship = "afrika"
What is the date for the ship Afrika, with nationality Great Britain?
CREATE TABLE table_name_73 (date VARCHAR, nationality VARCHAR, ship VARCHAR)
SELECT COUNT(year) FROM table_name_47 WHERE award = "press award"
How many years have an Award of press award?
CREATE TABLE table_name_47 (year VARCHAR, award VARCHAR)
SELECT AVG(total) FROM table_name_25 WHERE name = "alex mcleish category:articles with hcards" AND league < 494
Which Total has a Name of alex mcleish category:articles with hcards, and a League smaller than 494?
CREATE TABLE table_name_25 (total INTEGER, name VARCHAR, league VARCHAR)
SELECT date FROM table_name_86 WHERE away_team = "richmond"
When was the game with richmond as Away team?
CREATE TABLE table_name_86 (date VARCHAR, away_team VARCHAR)
SELECT original_air_date FROM table_28768925_1 WHERE us_viewers__million_ = "8.84"
What date did the episode that had 8.84 million u.s. viewers originally air?
CREATE TABLE table_28768925_1 (original_air_date VARCHAR, us_viewers__million_ VARCHAR)
SELECT MIN(total) FROM table_name_81 WHERE year_s__won = "1992"
What is the lowest total that has 1992 as the year (s) won?
CREATE TABLE table_name_81 (total INTEGER, year_s__won VARCHAR)
SELECT opposition FROM table_name_56 WHERE stadium = "westpac stadium" AND attendance = "31,853"
Who's the opposition at westpac stadium when the attendance is 31,853?
CREATE TABLE table_name_56 (opposition VARCHAR, stadium VARCHAR, attendance VARCHAR)
SELECT date FROM table_name_26 WHERE catalog = "nebdj068"
Catalog Nebdj068 was released when?
CREATE TABLE table_name_26 (date VARCHAR, catalog VARCHAR)
SELECT AVG(wins) FROM table_name_45 WHERE defeated_by = "furuichi"
How many wins, on average, were defeated by furuichi?
CREATE TABLE table_name_45 (wins INTEGER, defeated_by VARCHAR)
SELECT SUM(points) FROM table_name_86 WHERE engine_s_ = "ford dfz 3.5 v8"
How many points were awarded to the Ford DFZ 3.5 V8?
CREATE TABLE table_name_86 (points INTEGER, engine_s_ VARCHAR)
SELECT DISTINCT forename FROM drivers ORDER BY forename
List the forenames of all distinct drivers in alphabetical order?
CREATE TABLE drivers (forename VARCHAR)
SELECT MAX(total) FROM table_name_64 WHERE finish = "t64" AND year_won > 2006
Which Total has a Finish of t64, and a Year won larger than 2006?
CREATE TABLE table_name_64 (total INTEGER, finish VARCHAR, year_won VARCHAR)
SELECT height__in_ FROM table_23476629_2 WHERE province = "La Rioja"
What is the height in inches of contestants who are from the province of La Rioja?
CREATE TABLE table_23476629_2 (height__in_ VARCHAR, province VARCHAR)
SELECT gdp___bn__ FROM table_name_74 WHERE area__sq_mi_ = "7,263"
What is the GDP for the region with an area of 7,263 sq. mi.?
CREATE TABLE table_name_74 (gdp___bn__ VARCHAR, area__sq_mi_ VARCHAR)
SELECT report FROM table_name_70 WHERE name = "lyon grand prix"
Name the Report has a Name of lyon grand prix?
CREATE TABLE table_name_70 (report VARCHAR, name VARCHAR)
SELECT opponents FROM table_2009095_2 WHERE score = "6–4, 3–6, 6–2"
Name the opponets for 6–4, 3–6, 6–2
CREATE TABLE table_2009095_2 (opponents VARCHAR, score VARCHAR)
SELECT date FROM table_22903773_2 WHERE record = "17-7"
What game date had a record of 17-7?
CREATE TABLE table_22903773_2 (date VARCHAR, record VARCHAR)
SELECT finish FROM table_name_54 WHERE country = "south africa"
What is Finish, when Country is "South Africa"?
CREATE TABLE table_name_54 (finish VARCHAR, country VARCHAR)
SELECT service_charge FROM table_name_9 WHERE number_made = 1009
What is the service charge of the boat howitzers with 1009 made?
CREATE TABLE table_name_9 (service_charge VARCHAR, number_made VARCHAR)
SELECT player FROM table_name_22 WHERE to_par = "+2" AND score = 78 - 69 - 68 = 215
Who had a to par of +2 and a score of 78-69-68=215?
CREATE TABLE table_name_22 (player VARCHAR, to_par VARCHAR, score VARCHAR)
SELECT MIN(week) FROM table_name_14 WHERE date = "november 28, 1982"
What is the week for November 28, 1982?
CREATE TABLE table_name_14 (week INTEGER, date VARCHAR)
SELECT MAX(cycle) FROM table_name_57 WHERE number_of_contestants = "11" AND premiere_date = "september 3, 2012"
What is the highest Cycle, when the Number of Constestants is 11, and when Premiere Date is September 3, 2012?
CREATE TABLE table_name_57 (cycle INTEGER, number_of_contestants VARCHAR, premiere_date VARCHAR)
SELECT place FROM table_name_97 WHERE country = "south africa"
What place did the player from South Africa finish?
CREATE TABLE table_name_97 (place VARCHAR, country VARCHAR)
SELECT under_13 FROM table_26368963_1 WHERE under_11 = "Aly Abou El Einen"
When the under-11 was Aly Abou El Einen, who was the under-13?
CREATE TABLE table_26368963_1 (under_13 VARCHAR, under_11 VARCHAR)
SELECT MAX(draws) FROM table_name_8 WHERE points = 31 AND wins > 12 AND goal_difference < 11
What is the highest draws that have 31 for points, wins greater than 12, with a goal difference less than 11?
CREATE TABLE table_name_8 (draws INTEGER, goal_difference VARCHAR, points VARCHAR, wins VARCHAR)
SELECT home_team FROM table_name_23 WHERE tie_no = "27"
What team was the home team when the tie no was 27?
CREATE TABLE table_name_23 (home_team VARCHAR, tie_no VARCHAR)
SELECT representative FROM table_name_76 WHERE party = "whig"
Name the representative for party of whig
CREATE TABLE table_name_76 (representative VARCHAR, party VARCHAR)
SELECT description FROM table_name_8 WHERE year_of_issue = 1983 AND thickness = "1.7mm" AND weight = "3.50grams"
Which Description has a Year of Issue of 1983, and a Thickness of 1.7mm, and a Weight of 3.50grams?
CREATE TABLE table_name_8 (description VARCHAR, weight VARCHAR, year_of_issue VARCHAR, thickness 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 AVG(pick) FROM table_name_68 WHERE team = "minnesota twins"
What pick did the Minnesota Twins have?
CREATE TABLE table_name_68 (pick INTEGER, team VARCHAR)
SELECT MIN(number_of_seats) FROM table_name_93 WHERE current_status = "retired" AND year_placed_in_service = "1981"
What is the smallest number of seats in a retired vehicle that was started in service in 1981?
CREATE TABLE table_name_93 (number_of_seats INTEGER, current_status VARCHAR, year_placed_in_service VARCHAR)
SELECT AVG(founded) FROM table_name_9 WHERE municipality = "yauco" AND population__2010_ > 42 OFFSET 043
In what year was Yauco, which had over 42,043 people in 2010, founded?
CREATE TABLE table_name_9 (founded INTEGER, municipality VARCHAR, population__2010_ VARCHAR)
SELECT max_processors FROM table_10818465_1 WHERE max_memory = "256 GB"
What max processor has a maximum memory of 256 gb?
CREATE TABLE table_10818465_1 (max_processors VARCHAR, max_memory VARCHAR)
SELECT record FROM table_name_25 WHERE time___et__ = "1:00pm" AND opponent = "kansas city chiefs"
Which Record has a Time (ET) of 1:00pm, and an Opponent of kansas city chiefs?
CREATE TABLE table_name_25 (record VARCHAR, time___et__ VARCHAR, opponent VARCHAR)
SELECT surface FROM table_name_30 WHERE outcome = "runner-up" AND score = "6–4, 6–3"
On what Surface was the match with a Score of 6–4, 6–3 and Runner-up Outcome played?
CREATE TABLE table_name_30 (surface VARCHAR, outcome VARCHAR, score VARCHAR)
SELECT competition FROM table_name_71 WHERE round = "2nd round" AND score = "1:0, 0:1 (4:3 a.p.)"
Which Competition has a 2nd round score of 1:0, 0:1 (4:3 a.p.)?
CREATE TABLE table_name_71 (competition VARCHAR, round VARCHAR, score VARCHAR)
SELECT title FROM table_165732_2 WHERE episode__number = 2
What is the title of Episode #2
CREATE TABLE table_165732_2 (title VARCHAR, episode__number VARCHAR)
SELECT event FROM table_name_79 WHERE year < 1964 AND athlete = "lászló tábori gunnar nielsen"
What event is before 1964 and has an athlete of lászló tábori gunnar nielsen?
CREATE TABLE table_name_79 (event VARCHAR, year VARCHAR, athlete VARCHAR)
SELECT score FROM table_name_47 WHERE country = "scotland"
What is Score, when Country is "Scotland"?
CREATE TABLE table_name_47 (score VARCHAR, country VARCHAR)
SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1
Find the payment method that is used most frequently.
CREATE TABLE Customers (payment_method VARCHAR)
SELECT males FROM table_name_13 WHERE females = "62 331"
What was the number of males that had the number females 62 331?
CREATE TABLE table_name_13 (males VARCHAR, females VARCHAR)
SELECT points FROM table_name_95 WHERE goals_against = "260"
What are the points if the goals against were 260?
CREATE TABLE table_name_95 (points VARCHAR, goals_against VARCHAR)
SELECT team_classification FROM table_name_13 WHERE points_classification = "josé maría jiménez" AND winner = "beat zberg"
What is the team classification with a winner of Beat Zberg, and a points classification of José María Jiménez.
CREATE TABLE table_name_13 (team_classification VARCHAR, points_classification VARCHAR, winner VARCHAR)
SELECT candidates FROM table_1342256_40 WHERE district = "South Carolina 4"
What is the candidate for south carolina 4?
CREATE TABLE table_1342256_40 (candidates VARCHAR, district VARCHAR)
SELECT round FROM table_10361625_1 WHERE player_name = "Tommy Kramer"
Which round did Tommy Kramer play in>
CREATE TABLE table_10361625_1 (round VARCHAR, player_name VARCHAR)
SELECT krypton FROM table_name_4 WHERE neon = "10"
Which Krypton has Neon of 10?
CREATE TABLE table_name_4 (krypton VARCHAR, neon VARCHAR)
SELECT to_par FROM table_name_92 WHERE score = 69 - 72 = 141 AND player = "tim herron"
What was the to par score for Tim Herron, who had a score of 69-72=141?
CREATE TABLE table_name_92 (to_par VARCHAR, player VARCHAR, score VARCHAR)
SELECT home_ground FROM table_name_15 WHERE nickname = "lions"
What's the home ground of the Lions?
CREATE TABLE table_name_15 (home_ground VARCHAR, nickname VARCHAR)
SELECT races FROM table_name_38 WHERE points = "125"
Which races did they accumulate at least 125 points?
CREATE TABLE table_name_38 (races VARCHAR, points VARCHAR)
SELECT MAX(points_for_higher) FROM table_name_66 WHERE points_for_foundation < 0
What is the maximum points for higher when the points for foundation is less than 0?
CREATE TABLE table_name_66 (points_for_higher INTEGER, points_for_foundation INTEGER)
SELECT country FROM table_name_12 WHERE place = "t10" AND score = 66 - 72 - 70 = 207
What country was the player in t10 place with a score of 66-72-70=207?
CREATE TABLE table_name_12 (country VARCHAR, place VARCHAR, score VARCHAR)
SELECT COUNT(closure_for_signature) FROM table_2001348_1 WHERE field = "Sea (revised)"
How many inputs are there in the 'closure for signature' tab under the field 'sea (revised)'?
CREATE TABLE table_2001348_1 (closure_for_signature VARCHAR, field VARCHAR)
SELECT MIN(display_size__in_) FROM table_name_10 WHERE model = "versapro vy10f/bh-l"
Which Display size (in) has a Model of versapro vy10f/bh-l?
CREATE TABLE table_name_10 (display_size__in_ INTEGER, model VARCHAR)
SELECT sanskrit_संस्कृतम् FROM table_name_23 WHERE tamil_தமிழ் = "rōkiṇi ரோகிணி"
What kind of Sanskrit संस्कृतम् has a Tamil தமிழ் of rōkiṇi ரோகிணி?
CREATE TABLE table_name_23 (sanskrit_संस्कृतम् VARCHAR, tamil_தமிழ் VARCHAR)
SELECT MIN(crowd) FROM table_name_68 WHERE away_team = "st kilda"
In games where st kilda was the away team, what was the smallest crowd?
CREATE TABLE table_name_68 (crowd INTEGER, away_team VARCHAR)
SELECT AVG(area_km_2) FROM table_name_97 WHERE census_ranking = "636 of 5,008"
What is the area of the community with a census ranking of 636 of 5,008?
CREATE TABLE table_name_97 (area_km_2 INTEGER, census_ranking VARCHAR)
SELECT player_name FROM table_10966926_2 WHERE college = "Michigan State"
Which player went to Michigan State?
CREATE TABLE table_10966926_2 (player_name VARCHAR, college VARCHAR)
SELECT speed___knots__ FROM table_23614702_2 WHERE tons___lton__ = "1.150"
List the maximum speed for the 1.150 ton ships?
CREATE TABLE table_23614702_2 (speed___knots__ VARCHAR, tons___lton__ VARCHAR)
SELECT SUM(bronze) FROM table_name_5 WHERE rank = "9" AND silver > 2
How many Bronzes have a Rank of 9, and a Silver larger than 2?
CREATE TABLE table_name_5 (bronze INTEGER, rank VARCHAR, silver VARCHAR)
SELECT MIN(_number_of_candidates) FROM table_106367_2 WHERE _number_of_seats_won = 80
What is the least number of candidates running were there when 80 seats were won?
CREATE TABLE table_106367_2 (_number_of_candidates INTEGER, _number_of_seats_won VARCHAR)
SELECT boat_builder FROM table_name_76 WHERE number > 93 AND year_built = "1994"
What is the boat builder for a boat built in 1994 and a number greater than 93?
CREATE TABLE table_name_76 (boat_builder VARCHAR, number VARCHAR, year_built VARCHAR)
SELECT iata FROM table_name_99 WHERE country = "norway" AND icao = "ento"
What is th IATA for Norway with an ICAO of ENTO?
CREATE TABLE table_name_99 (iata VARCHAR, country VARCHAR, icao VARCHAR)
SELECT SUM(attendance) FROM table_name_6 WHERE visitor = "cleveland" AND leading_scorer = "larry hughes(33)"
How many people attended the game when Larry Hughes(33) was the leading scorer and cleveland was visiting?
CREATE TABLE table_name_6 (attendance INTEGER, visitor VARCHAR, leading_scorer VARCHAR)
SELECT away_team FROM table_name_4 WHERE tie_no = "14"
Who was the away team with a tie of 14?
CREATE TABLE table_name_4 (away_team VARCHAR, tie_no VARCHAR)
SELECT name FROM swimmer ORDER BY meter_100
Find the names of all swimmers, sorted by their 100 meter scores in ascending order.
CREATE TABLE swimmer (name VARCHAR, meter_100 VARCHAR)
SELECT winners FROM table_name_30 WHERE season = 2011
Who is the winner in 2011?
CREATE TABLE table_name_30 (winners VARCHAR, season VARCHAR)
SELECT genre FROM table_name_17 WHERE game_modes = "single-player" AND chinese_title = "摸摸瓦力欧制造"
What is the genre of the Chinese title 摸摸瓦力欧制造, which has a single-player game mode?
CREATE TABLE table_name_17 (genre VARCHAR, game_modes VARCHAR, chinese_title VARCHAR)
SELECT country FROM table_name_59 WHERE finish = "t8"
What country had a Finish of t8?
CREATE TABLE table_name_59 (country VARCHAR, finish VARCHAR)
SELECT AVG(laps) FROM table_name_23 WHERE driver = "gerhard berger"
What is the average number of laps when Gerhard Berger is the driver?
CREATE TABLE table_name_23 (laps INTEGER, driver VARCHAR)
SELECT COUNT(points) FROM table_name_78 WHERE game = 44 AND january > 15
Name the total number of points for 44 game and january more than 15
CREATE TABLE table_name_78 (points VARCHAR, game VARCHAR, january VARCHAR)
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 COUNT(party) FROM table_1342013_34 WHERE candidates = "John M. Vorys (R) 61.5% Jacob F. Myers (D) 38.5%"
how many party with candidates being john m. vorys (r) 61.5% jacob f. myers (d) 38.5%
CREATE TABLE table_1342013_34 (party VARCHAR, candidates VARCHAR)
SELECT ship FROM table_name_87 WHERE date = "28.1.1915"
what is the ship with the date of 28.1.1915?
CREATE TABLE table_name_87 (ship VARCHAR, date VARCHAR)
SELECT MIN(losses) FROM table_name_96 WHERE rank < 3 AND team = "united states" AND wins > 6
What is the lowest amount of losses the United States, ranked higher than 3 with more than 6 wins, have?
CREATE TABLE table_name_96 (losses INTEGER, wins VARCHAR, rank VARCHAR, team VARCHAR)
SELECT away_team FROM table_name_34 WHERE date = "june 9, 2015" AND home_team = "f1"
Which away team played on June 9, 2015 with a home team of f1?
CREATE TABLE table_name_34 (away_team VARCHAR, date VARCHAR, home_team VARCHAR)
SELECT record FROM table_name_11 WHERE opponent = "new york knicks"
What is Record, when Opponent is "New York Knicks"?
CREATE TABLE table_name_11 (record VARCHAR, opponent VARCHAR)
SELECT document_id, COUNT(*) FROM Draft_Copies GROUP BY document_id HAVING COUNT(*) > 1
Which documents have more than 1 draft copies? List document id and number of draft copies.
CREATE TABLE Draft_Copies (document_id VARCHAR)
SELECT MAX(pick) FROM table_name_20 WHERE position = "tight end"
what is the highest pick for the position tight end?
CREATE TABLE table_name_20 (pick INTEGER, position VARCHAR)
SELECT player FROM table_name_15 WHERE opponent = "st kilda" AND team = "richmond"
What richmond player played against st kilda?
CREATE TABLE table_name_15 (player VARCHAR, opponent VARCHAR, team VARCHAR)
SELECT elector FROM table_name_92 WHERE nationality = "french" AND elevated = "1288, may 16"
Who was the French Elector Elevated on 1288, May 16?
CREATE TABLE table_name_92 (elector VARCHAR, nationality VARCHAR, elevated VARCHAR)
SELECT entrant FROM table_name_82 WHERE year > 1950 AND points < 7
What Entrant older than 1950 has points smaller than 7?
CREATE TABLE table_name_82 (entrant VARCHAR, year VARCHAR, points VARCHAR)
SELECT COUNT(game) FROM table_name_16 WHERE score = "3–0" AND january > 12
How many games have a Score of 3–0, and a January larger than 12?
CREATE TABLE table_name_16 (game VARCHAR, score VARCHAR, january VARCHAR)
SELECT COUNT(record) FROM table_27539272_4 WHERE location_attendance = "HP Pavilion - 17,562"
Name the number of record for hp pavilion - 17,562
CREATE TABLE table_27539272_4 (record VARCHAR, location_attendance VARCHAR)
SELECT instrumental FROM table_name_42 WHERE genitive = "tkven-i"
What instrumental has tkven-i as the genitive?
CREATE TABLE table_name_42 (instrumental VARCHAR, genitive VARCHAR)
SELECT opponent FROM table_name_61 WHERE game > 51 AND score = "99-129"
Looking only at matches occurring after Game 51, who was the opponent for the game that ended with a score of 99-129?
CREATE TABLE table_name_61 (opponent VARCHAR, game VARCHAR, score VARCHAR)
SELECT height FROM table_name_59 WHERE current_club = "alta gestión fuenlabrada"
What is the height of the player who currently plays for Alta Gestión Fuenlabrada?
CREATE TABLE table_name_59 (height VARCHAR, current_club VARCHAR)
SELECT entrant FROM table_name_22 WHERE driver = "nigel mansell"
Nigel Mansell was the driver in what Entrant?
CREATE TABLE table_name_22 (entrant VARCHAR, driver VARCHAR)
SELECT COUNT(rossendale) FROM table_name_95 WHERE fylde < 0
How much Rossendale has a Fylde smaller than 0?
CREATE TABLE table_name_95 (rossendale VARCHAR, fylde INTEGER)
SELECT team FROM table_17802778_1 WHERE average_speed__mph_ = "138.14"
What team(s) enjoyed an average spped (mph) of 138.14?
CREATE TABLE table_17802778_1 (team VARCHAR, average_speed__mph_ VARCHAR)