answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT SUM(laps) FROM table_name_94 WHERE qual = "144.665"
Name the laps for qual of 144.665
CREATE TABLE table_name_94 (laps INTEGER, qual VARCHAR)
SELECT podiums FROM table_10753917_1 WHERE team = "Williams" AND margin_of_defeat = "2"
Which podiums did the Williams team have with a margin of defeat of 2?
CREATE TABLE table_10753917_1 (podiums VARCHAR, team VARCHAR, margin_of_defeat VARCHAR)
SELECT team FROM table_name_14 WHERE date_of_appointment = "sep. 20, 2008"
Which Team has a Date of appointment on sep. 20, 2008?
CREATE TABLE table_name_14 (team VARCHAR, date_of_appointment VARCHAR)
SELECT COUNT(north_american_brands) FROM table_237199_1 WHERE world_headquarters = "Sagamihara"
How many north american brands have world headquarters in sagamihara?
CREATE TABLE table_237199_1 (north_american_brands VARCHAR, world_headquarters VARCHAR)
SELECT females FROM table_name_71 WHERE language = "romanian"
What females speak Romanian?
CREATE TABLE table_name_71 (females VARCHAR, language VARCHAR)
SELECT home FROM table_name_61 WHERE visitor = "ottawa senators" AND score = "1–5"
Which home team had a visitor of Ottawa Senators with a score of 1–5?
CREATE TABLE table_name_61 (home VARCHAR, visitor VARCHAR, score VARCHAR)
SELECT mls_cup_winner FROM table_11148572_1 WHERE mls_supporters_shield_runner_up = "Chivas USA"
What is the name of the shield winner in which the mls cup winner and mls supporters shield runner up is Chivas usa?
CREATE TABLE table_11148572_1 (mls_cup_winner VARCHAR, mls_supporters_shield_runner_up VARCHAR)
SELECT bike FROM table_name_48 WHERE rider = "dean ellison"
What bike does dean ellison ride?
CREATE TABLE table_name_48 (bike VARCHAR, rider VARCHAR)
SELECT season FROM table_name_59 WHERE apps > 26 AND club = "barcelona" AND goals > 96 AND rank > 12
What season was Barcelona ranked higher than 12, had more than 96 goals and had more than 26 apps?
CREATE TABLE table_name_59 (season VARCHAR, rank VARCHAR, goals VARCHAR, apps VARCHAR, club VARCHAR)
SELECT COUNT(team) FROM table_1004033_1 WHERE draft_pick__number = "1"
How many teams had a #1 draft pick that won the Rookie of the Year Award?
CREATE TABLE table_1004033_1 (team VARCHAR, draft_pick__number VARCHAR)
SELECT SUM(founded) FROM table_name_68 WHERE club = "tri-city storm" AND titles > 1
Which Founded has a Club of tri-city storm and a Titles larger than 1?
CREATE TABLE table_name_68 (founded INTEGER, club VARCHAR, titles VARCHAR)
SELECT media_type FROM table_23829490_1 WHERE genre = "World"
What is every media type for the World genre?
CREATE TABLE table_23829490_1 (media_type VARCHAR, genre VARCHAR)
SELECT MIN(year) FROM table_name_46 WHERE category = "best supporting actress" AND award = "asian film awards"
What's the earliest year that had a category of best supporting actress at the asian film awards?
CREATE TABLE table_name_46 (year INTEGER, category VARCHAR, award VARCHAR)
SELECT pba_team FROM table_name_50 WHERE college = "santo tomas"
What is the pba team for the player who went to santo tomas college?
CREATE TABLE table_name_50 (pba_team VARCHAR, college VARCHAR)
SELECT icao FROM table_name_51 WHERE city = "xi'an"
I want the ICAO for city of xi'an
CREATE TABLE table_name_51 (icao VARCHAR, city VARCHAR)
SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Editor"
Show the names of employees with role name Editor.
CREATE TABLE ROLES (role_code VARCHAR, role_name VARCHAR); CREATE TABLE Employees (employee_name VARCHAR, role_code VARCHAR)
SELECT MAX(rank) FROM table_name_49 WHERE county = "offaly" AND player = "mark corrigan" AND total < 8
What's the highest Rank for the County of Offaly, the Player of Mark Corrigan, and the Total that is smaller than 8?
CREATE TABLE table_name_49 (rank INTEGER, total VARCHAR, county VARCHAR, player VARCHAR)
SELECT COUNT(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000
Find the number of products with category "Spices" and typically sold above 1000.
CREATE TABLE products (product_category_code VARCHAR, typical_buying_price VARCHAR)
SELECT date FROM table_26137666_3 WHERE winning_driver = "Mark Taylor"
What is every date of Mark Taylor as winning driver?
CREATE TABLE table_26137666_3 (date VARCHAR, winning_driver VARCHAR)
SELECT season FROM table_name_50 WHERE acquisition_via = "rookie draft" AND number = "15"
What is the Season with an Acquisition via of rookie draft, and the number is 15?
CREATE TABLE table_name_50 (season VARCHAR, acquisition_via VARCHAR, number VARCHAR)
SELECT leading_scorer FROM table_name_96 WHERE date = "february 9"
Who was the leading scorer on February 9?
CREATE TABLE table_name_96 (leading_scorer VARCHAR, date VARCHAR)
SELECT season FROM table_name_68 WHERE opponent = "zenit st. petersburg"
What is the Season when the Opponent was zenit st. petersburg?
CREATE TABLE table_name_68 (season VARCHAR, opponent VARCHAR)
SELECT MIN(crowd) FROM table_name_23 WHERE home_team = "carlton"
What was the crowd number when the home team was Carlton?
CREATE TABLE table_name_23 (crowd INTEGER, home_team VARCHAR)
SELECT category FROM table_name_19 WHERE year < 1995
What was the Category before 1995?
CREATE TABLE table_name_19 (category VARCHAR, year INTEGER)
SELECT origin FROM train GROUP BY origin HAVING COUNT(*) > 1
Find the origins from which more than 1 train starts.
CREATE TABLE train (origin VARCHAR)
SELECT score FROM table_name_93 WHERE date = "29-jun-2009"
What is the score for the game that was played on 29-Jun-2009?
CREATE TABLE table_name_93 (score VARCHAR, date VARCHAR)
SELECT det_pre_amp FROM table_name_56 WHERE _number_tubes = "4" AND rectifier = "x"
Name the det/pre-amp with # tubes of 4 and rectifier of x
CREATE TABLE table_name_56 (det_pre_amp VARCHAR, _number_tubes VARCHAR, rectifier VARCHAR)
SELECT method FROM table_name_11 WHERE opponent = "valentijn overeem"
The match against Valentijn Overeem had what method?
CREATE TABLE table_name_11 (method VARCHAR, opponent VARCHAR)
SELECT MIN(league) AS Cup FROM table_22683369_8
What was the lowest number of points scored in the league cup?
CREATE TABLE table_22683369_8 (league INTEGER)
SELECT year FROM table_name_60 WHERE notes = "6.62 m"
What year had 6.62 m in the notes?
CREATE TABLE table_name_60 (year VARCHAR, notes VARCHAR)
SELECT F.goals FROM table_name_31 WHERE games = "22 22" AND points = "012 12"
Name the F. Goals for games of 22 22 and points of 012 12
CREATE TABLE table_name_31 (games VARCHAR, points VARCHAR)
SELECT MAX(games) FROM table_name_21 WHERE rank = 3
What is the number of Games for the player in Rank 3?
CREATE TABLE table_name_21 (games INTEGER, rank VARCHAR)
SELECT home_team FROM table_name_50 WHERE venue = "western oval"
Which home team plays at the Western Oval?
CREATE TABLE table_name_50 (home_team VARCHAR, venue VARCHAR)
SELECT AVG(events) FROM table_name_62 WHERE top_25 = 12 AND wins < 0
What is the average Events when the top-25 is 12 and there are less than 0 wins?
CREATE TABLE table_name_62 (events INTEGER, top_25 VARCHAR, wins VARCHAR)
SELECT COUNT(incoming_manager) FROM table_28164986_4 WHERE manner_of_departure = "Resigned"
how many new managers replaced manager(s) who resigned?
CREATE TABLE table_28164986_4 (incoming_manager VARCHAR, manner_of_departure VARCHAR)
SELECT directed_by FROM table_29747178_3 WHERE us_viewers__million_ = "2.67"
Who directed the episode that was watched by 2.67 million U.S. viewers?
CREATE TABLE table_29747178_3 (directed_by VARCHAR, us_viewers__million_ VARCHAR)
SELECT rank FROM Faculty GROUP BY rank ORDER BY COUNT(*) LIMIT 1
Which rank has the smallest number of faculty members?
CREATE TABLE Faculty (rank VARCHAR)
SELECT MAX(round) FROM table_14999879_2
What was the last round the team drafted?
CREATE TABLE table_14999879_2 (round INTEGER)
SELECT result FROM table_name_69 WHERE match = "match reports"
What was the result for the match with entry Match Reports?
CREATE TABLE table_name_69 (result VARCHAR, match VARCHAR)
SELECT cyrillic_name_other_names FROM table_2562572_9 WHERE settlement = "Budisava"
What is the cyrillic name for Budisava?
CREATE TABLE table_2562572_9 (cyrillic_name_other_names VARCHAR, settlement VARCHAR)
SELECT nationality FROM table_name_92 WHERE pick = 116
What Nationality is the Pick that is 116?
CREATE TABLE table_name_92 (nationality VARCHAR, pick VARCHAR)
SELECT AVG(frequency_mhz) FROM table_name_83 WHERE city_of_license = "loomis, south dakota"
What is the average frequency mhz of the loomis, south dakota city license?
CREATE TABLE table_name_83 (frequency_mhz INTEGER, city_of_license VARCHAR)
SELECT institution FROM table_1672976_2 WHERE wins = 6 AND current_streak = "Won 2"
What institution had 6 wins and a current streak of won 2?
CREATE TABLE table_1672976_2 (institution VARCHAR, wins VARCHAR, current_streak VARCHAR)
SELECT MAX(season__number) FROM table_19852975_4 WHERE writer_s_ = "Denne Bart Petitclerc"
From writer Denne Bart Petitclerc, what is the maximum season number?
CREATE TABLE table_19852975_4 (season__number INTEGER, writer_s_ VARCHAR)
SELECT COUNT(against) FROM table_name_30 WHERE draws > 0
What's the total against when the draws are more than 0?
CREATE TABLE table_name_30 (against VARCHAR, draws INTEGER)
SELECT coach FROM table_name_72 WHERE big_ten = "2nd (79)"
What is the Coach with a Big Ten that is 2nd (79)?
CREATE TABLE table_name_72 (coach VARCHAR, big_ten VARCHAR)
SELECT MAX(fowler) FROM table_20142629_2
What is tops for Folwer?
CREATE TABLE table_20142629_2 (fowler INTEGER)
SELECT no_yds FROM table_18064020_21 WHERE tfl_yds = "2.5-4"
How many yards for the player with tfl-yds of 2.5-4?
CREATE TABLE table_18064020_21 (no_yds VARCHAR, tfl_yds VARCHAR)
SELECT SUM(round) FROM table_name_14 WHERE opponent = "yoko hattori"
What round did Takayo Hashi face Yoko Hattori?
CREATE TABLE table_name_14 (round INTEGER, opponent VARCHAR)
SELECT 1995 FROM table_name_77 WHERE 1991 = "grand slams"
What is the 1995 when the 1991 is Grand Slams?
CREATE TABLE table_name_77 (Id VARCHAR)
SELECT date FROM table_name_82 WHERE nation = "russia" AND place = "beijing, china" AND athlete = "yelena isinbayeva"
What's the date when Yelena Isinbayeva for Russia was in Beijing, China?
CREATE TABLE table_name_82 (date VARCHAR, athlete VARCHAR, nation VARCHAR, place VARCHAR)
SELECT name FROM table_name_61 WHERE location = "jewellery quarter"
What is the name of the building at the Jewellery quarter?
CREATE TABLE table_name_61 (name VARCHAR, location VARCHAR)
SELECT MAX(total_usable_hosts) FROM table_149426_4 WHERE network_mask = "255.255.255.224"
When the network mask is 255.255.255.224 what is the highest total usable host?
CREATE TABLE table_149426_4 (total_usable_hosts INTEGER, network_mask VARCHAR)
SELECT record FROM table_name_22 WHERE location_attendance = "palace of auburn hills 8,108"
Which Record has a Location/Attendance of palace of auburn hills 8,108?
CREATE TABLE table_name_22 (record VARCHAR, location_attendance VARCHAR)
SELECT tyres FROM table_name_14 WHERE year < 1995 AND laps = 142
Which tyre was before 1995 with 142 laps?
CREATE TABLE table_name_14 (tyres VARCHAR, year VARCHAR, laps VARCHAR)
SELECT place FROM table_name_99 WHERE player = "ben crenshaw"
What is Place, when Player is "Ben Crenshaw"?
CREATE TABLE table_name_99 (place VARCHAR, player VARCHAR)
SELECT MIN(version) FROM table_name_85 WHERE code = "u+1034a" AND year > 2001
Name the lowest version with a code of u+1034a that began after 2001.
CREATE TABLE table_name_85 (version INTEGER, code VARCHAR, year VARCHAR)
SELECT MAX(to_par) FROM table_name_37 WHERE place = "t8" AND country = "west germany"
What is the highest to par with a place of t8 and West Germany as the country?
CREATE TABLE table_name_37 (to_par INTEGER, place VARCHAR, country VARCHAR)
SELECT title FROM table_2701851_2 WHERE no_in_series = "10a"
What is the name of episode # 10a?
CREATE TABLE table_2701851_2 (title VARCHAR, no_in_series VARCHAR)
SELECT COUNT(game) FROM table_name_54 WHERE team = "at phoenix" AND score = "107-119"
Which Game has a Team of at phoenix, and a Score of 107-119?
CREATE TABLE table_name_54 (game VARCHAR, team VARCHAR, score VARCHAR)
SELECT driver FROM table_name_43 WHERE grid = 11
Who drove the grid 11 car?
CREATE TABLE table_name_43 (driver VARCHAR, grid VARCHAR)
SELECT place FROM table_name_88 WHERE score = 73 - 67 - 74 - 71 = 285
What is the Place of the Player with a Score of 73-67-74-71=285?
CREATE TABLE table_name_88 (place VARCHAR, score VARCHAR)
SELECT score FROM table_name_90 WHERE player = "bob rosburg"
What is the score of player bob rosburg?
CREATE TABLE table_name_90 (score VARCHAR, player VARCHAR)
SELECT name FROM table_name_37 WHERE laid_down = "28 february 1943"
what is the name when the laid down is 28 february 1943?
CREATE TABLE table_name_37 (name VARCHAR, laid_down VARCHAR)
SELECT MIN(goals_against) FROM table_name_48 WHERE wins < 16 AND draws > 14
What are the smallest goals with wins smaller than 16, and a Draws larger than 14?
CREATE TABLE table_name_48 (goals_against INTEGER, wins VARCHAR, draws VARCHAR)
SELECT COUNT(cap_s_) FROM table_28286776_52 WHERE club_s_ = "Norwich City, Coventry City"
How many caps figures are there for Norwich City, Coventry City?
CREATE TABLE table_28286776_52 (cap_s_ VARCHAR, club_s_ VARCHAR)
SELECT location_attendance FROM table_28768469_7 WHERE date = "January 9"
Where is the location attendance when the date is January 9?
CREATE TABLE table_28768469_7 (location_attendance VARCHAR, date VARCHAR)
SELECT MAX(bronze) FROM table_name_67 WHERE silver = 0 AND gold > 0 AND total > 2
What is the highest bronze when the silver was 0, the gold was larger than 0, and the total was larger than 2?
CREATE TABLE table_name_67 (bronze INTEGER, total VARCHAR, silver VARCHAR, gold VARCHAR)
SELECT Country FROM market ORDER BY Country
List all countries of markets in ascending alphabetical order.
CREATE TABLE market (Country VARCHAR)
SELECT MIN(game) FROM table_name_48 WHERE record = "32-12-3"
What is the lowest game for a record of 32-12-3?
CREATE TABLE table_name_48 (game INTEGER, record VARCHAR)
SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1
Please show the team that has the most number of technicians.
CREATE TABLE technician (Team VARCHAR)
SELECT MIN(height__m_) FROM table_name_97 WHERE name = "plessur alps" AND ave__no > 63
Which Height (m) has a Name of plessur alps, and a AVE-No larger than 63?
CREATE TABLE table_name_97 (height__m_ INTEGER, name VARCHAR, ave__no VARCHAR)
SELECT score FROM table_name_68 WHERE loss = "ruthven (1-4)"
What was the Score when the Loss was ruthven (1-4)?
CREATE TABLE table_name_68 (score VARCHAR, loss VARCHAR)
SELECT AVG(grid) FROM table_name_7 WHERE time = "+22.505" AND laps > 23
What grid has an average time of +22.505 and laps larger than 23?
CREATE TABLE table_name_7 (grid INTEGER, time VARCHAR, laps VARCHAR)
SELECT division_north FROM table_name_75 WHERE division_southwest = "novaci" AND division_west = "vrapčište"
Who won Division North when Division Southwest was won by Novaci and Division West by Vrapčište?
CREATE TABLE table_name_75 (division_north VARCHAR, division_southwest VARCHAR, division_west VARCHAR)
SELECT player FROM table_name_32 WHERE to_par = "+1" AND country = "england"
Which player was from England with a to par of +1?
CREATE TABLE table_name_32 (player VARCHAR, to_par VARCHAR, country VARCHAR)
SELECT COUNT(candidates) FROM table_1342359_4 WHERE district = "Arkansas 4"
How many candidates ran in the election in the Arkansas 4 district?
CREATE TABLE table_1342359_4 (candidates VARCHAR, district VARCHAR)
SELECT date FROM table_name_94 WHERE result = "w" AND score = "3-0"
Which Date has a Result of w, and a Score of 3-0?
CREATE TABLE table_name_94 (date VARCHAR, result VARCHAR, score VARCHAR)
SELECT T3.name, T2.title, T1.stars, T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name, T2.title, T1.stars
Return reviewer name, movie title, stars, and ratingDate. And sort the data first by reviewer name, then by movie title, and lastly by number of stars.
CREATE TABLE Rating (stars VARCHAR, ratingDate VARCHAR, mID VARCHAR, rID VARCHAR); CREATE TABLE Reviewer (name VARCHAR, rID VARCHAR); CREATE TABLE Movie (title VARCHAR, mID VARCHAR)
SELECT location FROM table_name_61 WHERE team = "seve ballesteros & manuel piñero"
What is the Location when the team was seve ballesteros & manuel piñero?
CREATE TABLE table_name_61 (location VARCHAR, team VARCHAR)
SELECT year FROM table_name_59 WHERE wins = "2"
What year has 2 wins?
CREATE TABLE table_name_59 (year VARCHAR, wins VARCHAR)
SELECT mascot FROM table_name_25 WHERE school = "warsaw"
what is the mascot when the school is warsaw?
CREATE TABLE table_name_25 (mascot VARCHAR, school VARCHAR)
SELECT COUNT(season) FROM table_20398823_1 WHERE team = "team Bruichladdich"
Name the number of season for team bruichladdich
CREATE TABLE table_20398823_1 (season VARCHAR, team VARCHAR)
SELECT opponent FROM table_name_44 WHERE date = "august 26"
Who did they play on August 26?
CREATE TABLE table_name_44 (opponent VARCHAR, date VARCHAR)
SELECT average_speed__mph_ FROM table_2260452_1 WHERE race_time = "2:00:33"
If the race time is 2:00:33, what is the average speed?
CREATE TABLE table_2260452_1 (average_speed__mph_ VARCHAR, race_time VARCHAR)
SELECT score FROM table_name_81 WHERE venue = "pankritio stadium" AND date = "june 6, 2007"
What was the score at Pankritio Stadium on June 6, 2007?
CREATE TABLE table_name_81 (score VARCHAR, venue VARCHAR, date VARCHAR)
SELECT date FROM table_name_94 WHERE away_team = "crystal palace"
what is the date when the away team is crystal palace?
CREATE TABLE table_name_94 (date VARCHAR, away_team VARCHAR)
SELECT game_site FROM table_24786958_2 WHERE date = "Sunday, May 27"
Where was the game played that was on Sunday, May 27?
CREATE TABLE table_24786958_2 (game_site VARCHAR, date VARCHAR)
SELECT event_place FROM table_name_61 WHERE time = "61:32"
Where did someone run a 61:32
CREATE TABLE table_name_61 (event_place VARCHAR, time VARCHAR)
SELECT SUM(to_par) FROM table_name_56 WHERE player = "tony lema"
What is tony lema's to par?
CREATE TABLE table_name_56 (to_par INTEGER, player VARCHAR)
SELECT COUNT(record) FROM table_17386066_2 WHERE stadium = "Miami Orange Bowl"
How many games or records were played on the Miami Orange Bowl?
CREATE TABLE table_17386066_2 (record VARCHAR, stadium VARCHAR)
SELECT MAX(goals_against) FROM table_name_65 WHERE points < 26 AND goals_for < 38 AND position > 14 AND goal_difference < -32
Which Goals against has Points smaller than 26, and Goals for smaller than 38, and a Position larger than 14, and a Goal Difference smaller than -32?
CREATE TABLE table_name_65 (goals_against INTEGER, goal_difference VARCHAR, position VARCHAR, points VARCHAR, goals_for VARCHAR)
SELECT T1.Abbreviation, T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY COUNT(*) LIMIT 1
Find the abbreviation and country of the airline that has fewest number of flights?
CREATE TABLE FLIGHTS (Airline VARCHAR); CREATE TABLE AIRLINES (Abbreviation VARCHAR, Country VARCHAR, Airline VARCHAR, uid VARCHAR)
SELECT winning_score FROM table_name_64 WHERE tournament = "oldsmobile lpga classic"
What was the winning score for oldsmobile lpga classic?
CREATE TABLE table_name_64 (winning_score VARCHAR, tournament VARCHAR)
SELECT MAX(rank) FROM table_name_67 WHERE name = "jason kreis" AND matches < 305
What is the highest Rank for Jason Kreis, with less than 305 matches?
CREATE TABLE table_name_67 (rank INTEGER, name VARCHAR, matches VARCHAR)
SELECT TYPE, COUNT(*) FROM ship GROUP BY TYPE
Show different types of ships and the number of ships of each type.
CREATE TABLE ship (TYPE VARCHAR)
SELECT event FROM table_name_35 WHERE opponent = "yasuhito namekawa" AND method = "decision"
Which event had an opponent of Yasuhito Namekawa with a decision method?
CREATE TABLE table_name_35 (event VARCHAR, opponent VARCHAR, method VARCHAR)
SELECT chassis FROM table_name_53 WHERE year > 1972 AND pts > 0
Which chassis is more recent than 1972 and has more than 0 Pts. ?
CREATE TABLE table_name_53 (chassis VARCHAR, year VARCHAR, pts VARCHAR)
SELECT COUNT(train_number) FROM table_29301050_1 WHERE frequency = "Daily" AND arrival_lonavla = "12:25"
how many trains run daily to lonavla and arrive at 12:25
CREATE TABLE table_29301050_1 (train_number VARCHAR, frequency VARCHAR, arrival_lonavla VARCHAR)
SELECT successor FROM table_225200_4 WHERE date_successor_seated = "Not filled this congress"
Name the successor for not filled this congress
CREATE TABLE table_225200_4 (successor VARCHAR, date_successor_seated VARCHAR)