answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code ORDER BY COUNT(*) DESC LIMIT 1
Show the most common type code across products.
CREATE TABLE Products (Product_Type_Code VARCHAR)
SELECT score FROM table_name_38 WHERE opponent = "@ edmonton oilers" AND game < 7 AND series = "oilers lead 3–2"
Opponent of @ edmonton oilers, and a Game smaller than 7, and a Series of oilers lead 3–2 had what score?
CREATE TABLE table_name_38 (score VARCHAR, series VARCHAR, opponent VARCHAR, game VARCHAR)
SELECT result FROM table_name_6 WHERE award = "outer critics circle award" AND year < 2004
What is the result for the Outer Critics Circle award earlier than 2004?
CREATE TABLE table_name_6 (result VARCHAR, award VARCHAR, year VARCHAR)
SELECT term_ended FROM table_1602620_1 WHERE elected = 1984
What year did the term end for the office elected in 1984
CREATE TABLE table_1602620_1 (term_ended VARCHAR, elected VARCHAR)
SELECT other_features FROM table_1036189_1 WHERE functional_type = "Light Ball"
For the functional type of light ball, what were the other features?
CREATE TABLE table_1036189_1 (other_features VARCHAR, functional_type VARCHAR)
SELECT MAX(round) FROM table_name_67 WHERE position = "guard" AND pick__number > 9
Position of guard, and a Pick # larger than 9 is what highest round?
CREATE TABLE table_name_67 (round INTEGER, position VARCHAR, pick__number VARCHAR)
SELECT COUNT(no_in_series) FROM table_23492454_1 WHERE no_in_season = 18
How many episodes in the series are also episode 18 in the season?
CREATE TABLE table_23492454_1 (no_in_series VARCHAR, no_in_season VARCHAR)
SELECT captain FROM table_25794138_1 WHERE team = "North East Stars"
Wh owas the captian of the north east stars?
CREATE TABLE table_25794138_1 (captain VARCHAR, team VARCHAR)
SELECT judges_residence FROM table_26758262_1 WHERE municipalities_served = "Beacon Falls , Naugatuck , Middlebury , Prospect"
Where does the judge who serves Beacon Falls , Naugatuck , Middlebury , Prospect reside?
CREATE TABLE table_26758262_1 (judges_residence VARCHAR, municipalities_served VARCHAR)
SELECT name, CLASS FROM ship WHERE NOT ship_id IN (SELECT ship_id FROM captain)
what are the names and classes of the ships that do not have any captain yet?
CREATE TABLE ship (name VARCHAR, CLASS VARCHAR, ship_id VARCHAR); CREATE TABLE captain (name VARCHAR, CLASS VARCHAR, ship_id VARCHAR)
SELECT MIN(number) FROM table_name_10 WHERE date = "january 2, 1936"
What's the number of the game played on January 2, 1936?
CREATE TABLE table_name_10 (number INTEGER, date VARCHAR)
SELECT county FROM table_10586064_2 WHERE total = "18,900 (R)"
What country had the total 18,900 (r)?
CREATE TABLE table_10586064_2 (county VARCHAR, total VARCHAR)
SELECT score FROM table_name_61 WHERE home_team = "saskatoon accelerators"
Which score has a Home Team of saskatoon accelerators?
CREATE TABLE table_name_61 (score VARCHAR, home_team VARCHAR)
SELECT titles FROM table_25840200_1 WHERE date = "November 9" AND division = "Super Bantamweight"
What are the titles for the November 9 Super Bantamweight division?
CREATE TABLE table_25840200_1 (titles VARCHAR, date VARCHAR, division VARCHAR)
SELECT date FROM table_name_89 WHERE score = "2–4"
On what date was the score 2–4?
CREATE TABLE table_name_89 (date VARCHAR, score VARCHAR)
SELECT independents FROM table_name_73 WHERE labour_party = "26 (+3)"
What is the number of Independents elected in the year Labour won 26 (+3) seats?
CREATE TABLE table_name_73 (independents VARCHAR, labour_party VARCHAR)
SELECT extra FROM table_name_30 WHERE result = "2nd" AND year < 2005
Which extra resulted in 2nd before 2005?
CREATE TABLE table_name_30 (extra VARCHAR, result VARCHAR, year VARCHAR)
SELECT MIN(points) FROM table_name_38 WHERE drawn < 2 AND played > 8
What is the fewest number of points for clubs with less than 2 draws and more than 8 matches played?
CREATE TABLE table_name_38 (points INTEGER, drawn VARCHAR, played VARCHAR)
SELECT MIN(total_appearances) FROM table_29701419_2 WHERE total_goals = 289
What is the total appearances when the total goals is 289?
CREATE TABLE table_29701419_2 (total_appearances INTEGER, total_goals VARCHAR)
SELECT written_by FROM table_26561509_1 WHERE directed_by = "Charles Haid" AND no = 54
The episode with the no. 54, directed by Charles Haid, is written by who?
CREATE TABLE table_26561509_1 (written_by VARCHAR, directed_by VARCHAR, no VARCHAR)
SELECT opponent FROM table_name_95 WHERE record = "22-13"
Who was the opponent at the game when the record was 22-13?
CREATE TABLE table_name_95 (opponent VARCHAR, record VARCHAR)
SELECT record FROM table_name_94 WHERE time = "4:14"
Which record has 4:14 as the time?
CREATE TABLE table_name_94 (record VARCHAR, time VARCHAR)
SELECT high_points FROM table_27723526_12 WHERE date = "March 30"
Name the high points for march 30
CREATE TABLE table_27723526_12 (high_points VARCHAR, date VARCHAR)
SELECT AVG(round) FROM table_name_87 WHERE position = "defensive tackle"
What round on average was a defensive tackle selected?
CREATE TABLE table_name_87 (round INTEGER, position VARCHAR)
SELECT res FROM table_name_65 WHERE record = "15-7"
What was the resolution of the fight when tim hague had a record of 15-7?
CREATE TABLE table_name_65 (res VARCHAR, record VARCHAR)
SELECT college FROM table_28059992_6 WHERE player = "Francis Bellefroid"
What college did Francis Bellefroid go to?
CREATE TABLE table_28059992_6 (college VARCHAR, player VARCHAR)
SELECT team_name FROM table_name_92 WHERE races = 10
Which team completed 10 races?
CREATE TABLE table_name_92 (team_name VARCHAR, races VARCHAR)
SELECT MAX(no_in_series) FROM table_22078972_2 WHERE us_viewers__millions_ = "17.04"
What's the series number of the episode seen by 17.04 million people in the US?
CREATE TABLE table_22078972_2 (no_in_series INTEGER, us_viewers__millions_ VARCHAR)
SELECT location_attendance FROM table_27713583_11 WHERE date = "April 5"
Name the location attendance april 5
CREATE TABLE table_27713583_11 (location_attendance VARCHAR, date VARCHAR)
SELECT MIN(grid) FROM table_name_43 WHERE time = "+8.051" AND laps < 23
What is the smallest grid when the time is +8.051 and there were less than 23 laps?
CREATE TABLE table_name_43 (grid INTEGER, time VARCHAR, laps VARCHAR)
SELECT T3.Location, T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age
Show the locations of parties and the names of the party hosts in ascending order of the age of the host.
CREATE TABLE party (Location VARCHAR, Party_ID VARCHAR); CREATE TABLE HOST (Name VARCHAR, Host_ID VARCHAR, Age VARCHAR); CREATE TABLE party_host (Host_ID VARCHAR, Party_ID VARCHAR)
SELECT d_41 FROM table_name_33 WHERE r_51 = "r 11"
Tell me the D 41 and R 51 of r 11
CREATE TABLE table_name_33 (d_41 VARCHAR, r_51 VARCHAR)
SELECT surface FROM table_name_76 WHERE partner = "remi tezuka"
What surface was used when she played with Remi Tezuka?
CREATE TABLE table_name_76 (surface VARCHAR, partner VARCHAR)
SELECT proto_germanic FROM table_name_48 WHERE german = "/t/"
What's the Proto-Germanic when the German is /t/?
CREATE TABLE table_name_48 (proto_germanic VARCHAR, german VARCHAR)
SELECT standard_cost__usd_ FROM table_name_27 WHERE creator = "hans oischinger"
What is the Standard cost (USD) by hans Oischinger Creator ?
CREATE TABLE table_name_27 (standard_cost__usd_ VARCHAR, creator VARCHAR)
SELECT pitcher FROM table_name_40 WHERE location = "kingdome" AND season = "1983"
Who is the pitcher from the 1983 season in location Kingdome?
CREATE TABLE table_name_40 (pitcher VARCHAR, location VARCHAR, season VARCHAR)
SELECT record FROM table_27734769_9 WHERE high_rebounds = "Marcus Camby (13)"
What was the game record if Marcus Camby (13) got the high rebounds?
CREATE TABLE table_27734769_9 (record VARCHAR, high_rebounds VARCHAR)
SELECT status FROM table_name_26 WHERE membership_application = "2008-12-15"
What is the status of the membership application on 2008-12-15?
CREATE TABLE table_name_26 (status VARCHAR, membership_application VARCHAR)
SELECT 2 AS nd_leg FROM table_name_52 WHERE team__number2 = "pamesa valencia"
Which 2nd leg has pamesa valencia for team #2?
CREATE TABLE table_name_52 (team__number2 VARCHAR)
SELECT MIN(draws) FROM table_name_38 WHERE byes < 1
For the teams that had fewer than 1 Byes, what was the lowest number of Draws?
CREATE TABLE table_name_38 (draws INTEGER, byes INTEGER)
SELECT fixed_charge___rs__kwh_ FROM table_25479607_3 WHERE tariff___rs__kwh_ = "11.30"
What is the fixed charge for the user who had a tariff of 11.30?
CREATE TABLE table_25479607_3 (fixed_charge___rs__kwh_ VARCHAR, tariff___rs__kwh_ VARCHAR)
SELECT college FROM table_name_47 WHERE team = "denver broncos"
What is the College of the Pick from Denver Broncos?
CREATE TABLE table_name_47 (college VARCHAR, team VARCHAR)
SELECT season FROM table_name_48 WHERE draws = "10"
Which season had 10 draws?
CREATE TABLE table_name_48 (season VARCHAR, draws VARCHAR)
SELECT COUNT(form) FROM table_name_72 WHERE pages < 18
How many forms have less than 18 pages?
CREATE TABLE table_name_72 (form VARCHAR, pages INTEGER)
SELECT single FROM table_25760427_2 WHERE artist = "Travis"
What is the song released by Travis?
CREATE TABLE table_25760427_2 (single VARCHAR, artist VARCHAR)
SELECT home_team AS score FROM table_name_12 WHERE home_team = "north melbourne"
How many points did North Melbourne score?
CREATE TABLE table_name_12 (home_team VARCHAR)
SELECT tournament FROM table_name_33 WHERE partner = "nicole thijssen" AND opponent_in_the_final = "nina bratchikova & frederica piedade"
What Tournament did Silva Partner with Nicole Thijssen with Opponent in the final Nina Bratchikova & Frederica Piedade?
CREATE TABLE table_name_33 (tournament VARCHAR, partner VARCHAR, opponent_in_the_final VARCHAR)
SELECT opponent FROM table_name_34 WHERE points < 62 AND january < 6
what opponent has an average less than 62 and a January average less than 6
CREATE TABLE table_name_34 (opponent VARCHAR, points VARCHAR, january VARCHAR)
SELECT COUNT(loses) FROM table_name_45 WHERE points_against > 592 AND club = "high park demons" AND points_for > 631
How many losses have points against greater than 592, with high park demons as the club, and points for greater than 631?
CREATE TABLE table_name_45 (loses VARCHAR, points_for VARCHAR, points_against VARCHAR, club VARCHAR)
SELECT score FROM table_name_30 WHERE venue = "pro player stadium" AND winning_team = "devil rays" AND date = "june 14"
on June 14, what was the winning score by the Devil rays in pro player stadium?
CREATE TABLE table_name_30 (score VARCHAR, date VARCHAR, venue VARCHAR, winning_team VARCHAR)
SELECT years FROM table_name_69 WHERE coach = "jim berryman"
How many years does coach Jim Berryman have?
CREATE TABLE table_name_69 (years VARCHAR, coach VARCHAR)
SELECT country FROM table_name_26 WHERE to_par < 5 AND player = "sam snead"
What Country is Player Sam Snead with a To par of less than 5 from?
CREATE TABLE table_name_26 (country VARCHAR, to_par VARCHAR, player VARCHAR)
SELECT Census_Ranking FROM city WHERE Status <> "Village"
Show the census ranking of cities whose status are not "Village".
CREATE TABLE city (Census_Ranking VARCHAR, Status VARCHAR)
SELECT SUM(year) FROM table_name_69 WHERE entrant = "scuderia centro sud" AND points = 6
What was the sum of the years, when the entrant was Scuderia Centro Sud, and when there were 6 points?
CREATE TABLE table_name_69 (year INTEGER, entrant VARCHAR, points VARCHAR)
SELECT position FROM table_name_10 WHERE height = 2.09
Name the position with height of 2.09
CREATE TABLE table_name_10 (position VARCHAR, height VARCHAR)
SELECT result FROM table_name_9 WHERE date = "november 7, 1999"
What was the result of the game on November 7, 1999?
CREATE TABLE table_name_9 (result VARCHAR, date VARCHAR)
SELECT time FROM table_name_56 WHERE grid = 21
What is time of manufacturer with grid 21?
CREATE TABLE table_name_56 (time VARCHAR, grid VARCHAR)
SELECT 1995 FROM table_name_36 WHERE tournament = "miami"
What is 1995, when Tournament is "Miami"?
CREATE TABLE table_name_36 (tournament VARCHAR)
SELECT played FROM table_12886178_4 WHERE points = "16"
How many games ended up with 16 points?
CREATE TABLE table_12886178_4 (played VARCHAR, points VARCHAR)
SELECT location FROM table_name_31 WHERE round < 2 AND opponent = "mostapha al-turk"
At what Location was the match against Opponent of Mostapha Al-Turk lasting less than 2 Rounds?
CREATE TABLE table_name_31 (location VARCHAR, round VARCHAR, opponent VARCHAR)
SELECT player FROM table_name_76 WHERE school_club_team = "florida state"
Which player gradyated from Florida State?
CREATE TABLE table_name_76 (player VARCHAR, school_club_team VARCHAR)
SELECT MIN(premiere) FROM table_name_7 WHERE average = 35 AND rank > 1
What is the premiere rating associated with an average of 35 ranked above 1?
CREATE TABLE table_name_7 (premiere INTEGER, average VARCHAR, rank VARCHAR)
SELECT winning_driver FROM table_name_43 WHERE circuit = "circuit zandvoort"
Which Winning Driver has a Circuit of circuit zandvoort?
CREATE TABLE table_name_43 (winning_driver VARCHAR, circuit VARCHAR)
SELECT date FROM table_name_58 WHERE city = "copenhagen"
When did an event take place in the City of Copenhagen?
CREATE TABLE table_name_58 (date VARCHAR, city VARCHAR)
SELECT day FROM table_22298383_1 WHERE laps = "364" AND driver = "Cale Yarborough"
On what day was the race that Cale Yarborough won in 364 laps?
CREATE TABLE table_22298383_1 (day VARCHAR, laps VARCHAR, driver VARCHAR)
SELECT school_club_team FROM table_name_64 WHERE player = "andrew jones"
Which School/Club Team does Andrew Jones play for?
CREATE TABLE table_name_64 (school_club_team VARCHAR, player VARCHAR)
SELECT date FROM table_name_91 WHERE result = "loss" AND record = "7-9"
What is the Date of the game with a Loss and Record of 7-9?
CREATE TABLE table_name_91 (date VARCHAR, result VARCHAR, record VARCHAR)
SELECT written_by FROM table_27905664_1 WHERE us_viewers__million_ = "3.74"
Who wrote the episode having a US viewership of 3.74 million?
CREATE TABLE table_27905664_1 (written_by VARCHAR, us_viewers__million_ VARCHAR)
SELECT 2010 FROM table_name_36 WHERE 2001 = "grand slam tournaments"
Which 2010 Tournament has a 2001 of grand slam tournaments?
CREATE TABLE table_name_36 (Id VARCHAR)
SELECT date FROM table_name_50 WHERE home_team = "essendon"
On what date did the home team Essendon play?
CREATE TABLE table_name_50 (date VARCHAR, home_team VARCHAR)
SELECT home FROM table_name_43 WHERE date = "february 25"
What is the home team that played on February 25?
CREATE TABLE table_name_43 (home VARCHAR, date VARCHAR)
SELECT player FROM table_name_60 WHERE round < 8 AND position = "guard" AND school_club_team = "stephen f. austin"
Who is the player in guard position from Stephen F. Austin in a round less than 8?
CREATE TABLE table_name_60 (player VARCHAR, school_club_team VARCHAR, round VARCHAR, position VARCHAR)
SELECT school_club_team FROM table_10015132_1 WHERE years_in_toronto = "2010-2012"
What school did the player that has been in Toronto from 2010-2012 go to?
CREATE TABLE table_10015132_1 (school_club_team VARCHAR, years_in_toronto VARCHAR)
SELECT club FROM table_20396710_1 WHERE "bonus_points" = "bonus_points"
which club is listed when bonus points is bonus points
CREATE TABLE table_20396710_1 (club VARCHAR)
SELECT MIN(wins) FROM table_name_37 WHERE season = "2011" AND podiums = 1 AND poles < 0
What is the lowest Wins, when Season is 2011, when Podiums is 1, and when Poles is less than 0?
CREATE TABLE table_name_37 (wins INTEGER, poles VARCHAR, season VARCHAR, podiums VARCHAR)
SELECT steals FROM table_24908692_5 WHERE player = "Tamika Williams"
How many steals did Tamika Williams have?
CREATE TABLE table_24908692_5 (steals VARCHAR, player VARCHAR)
SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >= 2
What are the hometowns that are shared by at least two gymnasts?
CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR)
SELECT mascot FROM table_name_40 WHERE year_left > 2000 AND location = "huntington"
What's the mascot in Huntington after the year 2000?
CREATE TABLE table_name_40 (mascot VARCHAR, year_left VARCHAR, location VARCHAR)
SELECT state_or_territory FROM table_27871460_2 WHERE channel_number = 7
Which state or territory had a channel number of exactly 7?
CREATE TABLE table_27871460_2 (state_or_territory VARCHAR, channel_number VARCHAR)
SELECT high_assists FROM table_name_27 WHERE score = "l 107–112 (ot)"
What player had the high assists when the Score was l 107–112 (ot)?
CREATE TABLE table_name_27 (high_assists VARCHAR, score VARCHAR)
SELECT venue FROM table_name_40 WHERE runs = "153"
What is the venue where 153 runs were scored?
CREATE TABLE table_name_40 (venue VARCHAR, runs VARCHAR)
SELECT chord FROM table_name_23 WHERE minor_seventh = "f"
What is the listed chord for a Minor seventh of F?
CREATE TABLE table_name_23 (chord VARCHAR, minor_seventh VARCHAR)
SELECT AVG(gold) FROM table_name_56 WHERE bronze > 0 AND silver > 0 AND rank > 2 AND total > 3
What is the average gold medals for countries with more than 0 bronze, more than 0 silver, rank over 2 and total over 3?
CREATE TABLE table_name_56 (gold INTEGER, total VARCHAR, rank VARCHAR, bronze VARCHAR, silver VARCHAR)
SELECT COUNT(heat) FROM table_name_14 WHERE mark = "7.29" AND name = "virgen benavides" AND lane < 2
When the lane is under 2 and the name is virgen benavides with a mark of 7.29, what's the total number of Heat found?
CREATE TABLE table_name_14 (heat VARCHAR, lane VARCHAR, mark VARCHAR, name VARCHAR)
SELECT points_against FROM table_name_32 WHERE played = "22" AND club = "carmarthen athletic rfc"
How many points against did Carmarthen Athletic RFC have when they played 22 games ?
CREATE TABLE table_name_32 (points_against VARCHAR, played VARCHAR, club VARCHAR)
SELECT MAX(year) FROM table_name_55 WHERE aces = 20 AND opponent = "samantha stosur" AND sets > 2
what's the most recent year that samantha stosur was the opponent with 20 aces and having played more than 2 sets?
CREATE TABLE table_name_55 (year INTEGER, sets VARCHAR, aces VARCHAR, opponent VARCHAR)
SELECT player FROM table_name_33 WHERE score < 69 AND place = "t1"
Which Player has a Score smaller than 69, and a Place of t1?
CREATE TABLE table_name_33 (player VARCHAR, score VARCHAR, place VARCHAR)
SELECT erp_w FROM table_name_2 WHERE city_of_license = "charleston, sc"
What is Charleston, SC ERP W?
CREATE TABLE table_name_2 (erp_w VARCHAR, city_of_license VARCHAR)
SELECT first_elected FROM table_1342198_13 WHERE incumbent = "Barratt O'Hara"
What year was incumbent barratt o'hara first elected?
CREATE TABLE table_1342198_13 (first_elected VARCHAR, incumbent VARCHAR)
SELECT Country FROM perpetrator WHERE Injured > 50 INTERSECT SELECT Country FROM perpetrator WHERE Injured < 20
Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20.
CREATE TABLE perpetrator (Country VARCHAR, Injured INTEGER)
SELECT COUNT(grid) FROM table_name_65 WHERE driver = "mika häkkinen" AND laps > 45
What is the number of the grid for mika häkkinen and more than 45 laps?
CREATE TABLE table_name_65 (grid VARCHAR, driver VARCHAR, laps VARCHAR)
SELECT venue FROM MATCH ORDER BY date DESC
List venues of all matches in the order of their dates starting from the most recent one.
CREATE TABLE MATCH (venue VARCHAR, date VARCHAR)
SELECT name FROM table_178242_1 WHERE channel = "Nederland 3" AND premiere___aired = "17 May 2008 – 21 June 2008"
What is the title that aired from 17 may 2008 – 21 june 2008 on Nederland 3?
CREATE TABLE table_178242_1 (name VARCHAR, channel VARCHAR, premiere___aired VARCHAR)
SELECT number_ & _name FROM table_name_78 WHERE date = "1958"
What is the number & name of the livery in 1958?
CREATE TABLE table_name_78 (number_ VARCHAR, _name VARCHAR, date VARCHAR)
SELECT COUNT(points) FROM table_name_71 WHERE engine = "judd v8" AND year = 1989
How many points did Judd v8 has in 1989?
CREATE TABLE table_name_71 (points VARCHAR, engine VARCHAR, year VARCHAR)
SELECT height_ft__m_ FROM table_name_12 WHERE floors < 11
What is the hight in ft and m of the building with less than 11 floors?
CREATE TABLE table_name_12 (height_ft__m_ VARCHAR, floors INTEGER)
SELECT name FROM table_name_92 WHERE country = "italy" AND giro_wins = 0 AND young_rider = 0 AND maglia_rosa < 3
Who is from italy has 0 giro wins, 0 young rider and less than 3 maglia rosa?
CREATE TABLE table_name_92 (name VARCHAR, maglia_rosa VARCHAR, young_rider VARCHAR, country VARCHAR, giro_wins VARCHAR)
SELECT no_votes FROM table_256286_63 WHERE description = "Partial public funding of election campaigns"
How many no votes were there in the partial public funding of election campaigns legislation?
CREATE TABLE table_256286_63 (no_votes VARCHAR, description VARCHAR)
SELECT country FROM table_name_29 WHERE score = 70 - 68 - 71 - 71 = 280
Which country scored 70-68-71-71=280?
CREATE TABLE table_name_29 (country VARCHAR, score VARCHAR)
SELECT employee_ID FROM Employees WHERE employee_name = "Ebba"
What is the id for the employee called Ebba?
CREATE TABLE Employees (employee_ID VARCHAR, employee_name VARCHAR)