answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT AVG(poles) FROM table_name_59 WHERE races < 4
What Poles have Races smaller than 4?
CREATE TABLE table_name_59 (poles INTEGER, races INTEGER)
SELECT director FROM table_22265716_1 WHERE original_title = "Три летња дана"
Who directed the film with the original title of три летња дана?
CREATE TABLE table_22265716_1 (director VARCHAR, original_title VARCHAR)
SELECT race FROM table_name_99 WHERE tyre = "p" AND winning_driver = "juan manuel fangio"
What is the race that had a tyre of p and Juan Manuel Fangio as the winning driver?
CREATE TABLE table_name_99 (race VARCHAR, tyre VARCHAR, winning_driver VARCHAR)
SELECT english_title FROM table_name_80 WHERE year < 1999 AND role = "kim da-rim"
What is the english title of the film before 1999 with a role of kim da-rim?
CREATE TABLE table_name_80 (english_title VARCHAR, year VARCHAR, role VARCHAR)
SELECT COUNT(*) FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id WHERE T1.name = "England"
How many leagues are there in England?
CREATE TABLE League (country_id VARCHAR); CREATE TABLE Country (id VARCHAR, name VARCHAR)
SELECT MAX(pick__number) FROM table_2508633_2 WHERE position = "Guard" AND nfl_team = "Kansas City Chiefs"
Name the most pick number for guard and kansas city chiefs
CREATE TABLE table_2508633_2 (pick__number INTEGER, position VARCHAR, nfl_team VARCHAR)
SELECT time FROM table_name_57 WHERE country = "kazakhstan"
What is the time for Kazakhstan?
CREATE TABLE table_name_57 (time VARCHAR, country VARCHAR)
SELECT version FROM table_name_1 WHERE length = "4:58"
What is the version shown for the Length of 4:58?
CREATE TABLE table_name_1 (version VARCHAR, length VARCHAR)
SELECT chassis FROM table_name_26 WHERE tyres = "g" AND year < 1987
What Chassis has g Tyres before 1987?
CREATE TABLE table_name_26 (chassis VARCHAR, tyres VARCHAR, year VARCHAR)
SELECT firefox FROM table_name_22 WHERE opera = "1.8%" AND date = "30 july 2007"
What is the firefox value with a 1.8% opera on 30 July 2007?
CREATE TABLE table_name_22 (firefox VARCHAR, opera VARCHAR, date VARCHAR)
SELECT format FROM table_134729_3 WHERE call_sign = "K213CL"
What station has the call number K213cl
CREATE TABLE table_134729_3 (format VARCHAR, call_sign VARCHAR)
SELECT score FROM table_name_8 WHERE player = "vijay singh"
Name the score for vijay singh
CREATE TABLE table_name_8 (score VARCHAR, player VARCHAR)
SELECT score FROM table_name_17 WHERE venue = "hampden park" AND runners_up = "rangers" AND winners = "hibernian"
What is the Score of the Rangers' Runner-ups and Hibernian Winners in Hampden Park?
CREATE TABLE table_name_17 (score VARCHAR, winners VARCHAR, venue VARCHAR, runners_up VARCHAR)
SELECT COUNT(goals_for) FROM table_name_10 WHERE lost < 7 AND position = 2
how many times is lost less than 7 and the position 2?
CREATE TABLE table_name_10 (goals_for VARCHAR, lost VARCHAR, position VARCHAR)
SELECT director FROM table_name_99 WHERE title = "wallace & gromit: the curse of the were-rabbit"
Who is the director of Wallace & Gromit: The Curse of the Were-Rabbit?
CREATE TABLE table_name_99 (director VARCHAR, title VARCHAR)
SELECT school FROM table_14115168_4 WHERE national_titles = 14
which school has 14 large championships
CREATE TABLE table_14115168_4 (school VARCHAR, national_titles VARCHAR)
SELECT MIN(season) FROM table_29471472_1 WHERE podiums = 7
What season shows podium 7?
CREATE TABLE table_29471472_1 (season INTEGER, podiums VARCHAR)
SELECT away_team AS score FROM table_name_89 WHERE away_team = "melbourne"
What is the Away team score for Away team Melbourne?
CREATE TABLE table_name_89 (away_team VARCHAR)
SELECT country FROM table_name_49 WHERE player = "chad campbell"
What country is Chad Campbell from?
CREATE TABLE table_name_49 (country VARCHAR, player VARCHAR)
SELECT producer FROM table_name_31 WHERE director = "richard clark"
Who is the producer for the director Richard Clark?
CREATE TABLE table_name_31 (producer VARCHAR, director VARCHAR)
SELECT party FROM table_2668254_22 WHERE candidates = "George McDuffie (J)"
What party did candidate george mcduffie (j) represent?
CREATE TABLE table_2668254_22 (party VARCHAR, candidates VARCHAR)
SELECT venue FROM table_name_47 WHERE home_team = "essendon"
Which Venue has a Home team of essendon?
CREATE TABLE table_name_47 (venue VARCHAR, home_team VARCHAR)
SELECT t2.product_details, t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY SUM(t1.order_quantity) LIMIT 1
Find the name and ID of the product whose total order quantity is the largest.
CREATE TABLE order_items (product_id VARCHAR, order_quantity INTEGER); CREATE TABLE products (product_details VARCHAR, product_id VARCHAR)
SELECT player FROM table_name_72 WHERE place = "t10"
Which player placed t10?
CREATE TABLE table_name_72 (player VARCHAR, place VARCHAR)
SELECT original_artist FROM table_26250155_1 WHERE theme = "Group Performance"
Who was the original artist of the group performance theme?
CREATE TABLE table_26250155_1 (original_artist VARCHAR, theme VARCHAR)
SELECT customer_name, customer_phone FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM mailshot_customers)
Show the name and phone of the customer without any mailshot.
CREATE TABLE customers (customer_name VARCHAR, customer_phone VARCHAR, customer_id VARCHAR); CREATE TABLE mailshot_customers (customer_name VARCHAR, customer_phone VARCHAR, customer_id VARCHAR)
SELECT MIN(goals) FROM table_name_91 WHERE player = "sid o'neill" AND games > 1
What is the lowest goals listed for player Sid O'neill, with Games larger than 1?
CREATE TABLE table_name_91 (goals INTEGER, player VARCHAR, games VARCHAR)
SELECT audition_city FROM table_28793672_1 WHERE venue = "UPI Convention Center"
Where is the audition city when the venue is upi convention center?
CREATE TABLE table_28793672_1 (audition_city VARCHAR, venue VARCHAR)
SELECT position FROM table_name_96 WHERE pick > 94 AND team = "boston patriots"
What was the position of the player picked after 94, by the Boston Patriots?
CREATE TABLE table_name_96 (position VARCHAR, pick VARCHAR, team VARCHAR)
SELECT winner FROM table_12261714_2 WHERE young_rider_classification = "Francesco Casagrande" AND stage = "1a"
Who's the winner in stage 1a, where the leader in the young rider classification is Francesco Casagrande?
CREATE TABLE table_12261714_2 (winner VARCHAR, young_rider_classification VARCHAR, stage VARCHAR)
SELECT acc_home FROM table_16372911_1 WHERE acc__percentage = ".813"
what was the ACC home game record for the team who's ACC winning percentage was .813?
CREATE TABLE table_16372911_1 (acc_home VARCHAR, acc__percentage VARCHAR)
SELECT away_team AS score FROM table_name_75 WHERE home_team = "north melbourne"
What was the score of the team North Melbourne played at Arden Street Oval?
CREATE TABLE table_name_75 (away_team VARCHAR, home_team VARCHAR)
SELECT city_of_license FROM table_name_64 WHERE call_sign = "w220ba"
Which City of license has a Call sign of w220ba?
CREATE TABLE table_name_64 (city_of_license VARCHAR, call_sign VARCHAR)
SELECT run_1 FROM table_name_15 WHERE team = "italy (ita) italy i"
What is Run 1, when Team is "Italy (ITA) Italy I"?
CREATE TABLE table_name_15 (run_1 VARCHAR, team VARCHAR)
SELECT MIN(against) FROM table_name_74 WHERE losses < 3 AND draws > 0
What is the lowest against when the draws are more than 0 and the losses are less than 3?
CREATE TABLE table_name_74 (against INTEGER, losses VARCHAR, draws VARCHAR)
SELECT us_viewers__millions_ FROM table_26914076_3 WHERE story_by = "David Simon & Mari Kornhauser"
How many viewers watched the episode with a story by david simon & mari kornhauser?
CREATE TABLE table_26914076_3 (us_viewers__millions_ VARCHAR, story_by VARCHAR)
SELECT v_band FROM table_186468_1 WHERE k_band = "2"
When 2 is the k-band what is the v-band?
CREATE TABLE table_186468_1 (v_band VARCHAR, k_band VARCHAR)
SELECT club FROM table_name_37 WHERE drawn = "0" AND points_for = "617"
Who is the club that had 617 points and a draw of 0?
CREATE TABLE table_name_37 (club VARCHAR, drawn VARCHAR, points_for VARCHAR)
SELECT size_of_rest_bit_field FROM table_name_12 WHERE leading_bits > 110 AND start_address = "224.0.0.0"
What is the size of the rest bit field when the leading bits are more than 110 and the start address is 224.0.0.0?
CREATE TABLE table_name_12 (size_of_rest_bit_field VARCHAR, leading_bits VARCHAR, start_address VARCHAR)
SELECT final_placing FROM table_name_12 WHERE poles = 0 AND races > 16 AND podiums = 16
What is the final placing of the team with 0 ples, more than 16 races, and 16 podiums?
CREATE TABLE table_name_12 (final_placing VARCHAR, podiums VARCHAR, poles VARCHAR, races VARCHAR)
SELECT format FROM table_name_31 WHERE city_of_license = "st. george" AND frequency = "0 107.3 fm"
Which format is in St. George with a frequency of 0 107.3 fm?
CREATE TABLE table_name_31 (format VARCHAR, city_of_license VARCHAR, frequency VARCHAR)
SELECT MIN(pole) FROM table_name_49 WHERE flap > 5 AND race < 155
What is the lowest pole with a Flap larger than 5, and a before race 155?
CREATE TABLE table_name_49 (pole INTEGER, flap VARCHAR, race VARCHAR)
SELECT MIN(silver) FROM table_name_19 WHERE gold = 1 AND total < 4 AND bronze < 0
Gold of 1, and a Total smaller than 4, and a Bronze smaller than 0 has the lowest silver?
CREATE TABLE table_name_19 (silver INTEGER, bronze VARCHAR, gold VARCHAR, total VARCHAR)
SELECT Name, Score FROM WINE
List the names and scores of all wines.
CREATE TABLE WINE (Name VARCHAR, Score VARCHAR)
SELECT MIN(pick__number) FROM table_name_62 WHERE position = "rec" AND cfl_team = "hamilton tiger-cats"
What is the lowest Pick #, when Position is REC, and when CFL Team is Hamilton Tiger-Cats?
CREATE TABLE table_name_62 (pick__number INTEGER, position VARCHAR, cfl_team VARCHAR)
SELECT location FROM table_26847237_1 WHERE opposition = "East Coast"
What was the location when the opposition was East Coast?
CREATE TABLE table_26847237_1 (location VARCHAR, opposition VARCHAR)
SELECT muzzle_energy FROM table_name_40 WHERE max_pressure = "40,000 psi"
What is the muzzle energy with 40,000 psi max pressure?
CREATE TABLE table_name_40 (muzzle_energy VARCHAR, max_pressure VARCHAR)
SELECT SUM(week) FROM table_name_71 WHERE attendance = "39,923"
In what Week was the Attendance 39,923?
CREATE TABLE table_name_71 (week INTEGER, attendance VARCHAR)
SELECT crowd FROM table_name_84 WHERE away_team = "hawthorn"
What was the crowd size of the match featuring Hawthorn as the Away team?
CREATE TABLE table_name_84 (crowd VARCHAR, away_team VARCHAR)
SELECT challenger FROM table_23982399_12 WHERE winner = "Kimio Nonaga"
Who was the challenger when winner was kimio nonaga?
CREATE TABLE table_23982399_12 (challenger VARCHAR, winner VARCHAR)
SELECT performance FROM table_name_49 WHERE season > 2003 AND discipline = "3000 m"
What were the performance lengths in the 3000 m events in and after 2003?
CREATE TABLE table_name_49 (performance VARCHAR, season VARCHAR, discipline VARCHAR)
SELECT operator FROM table_name_20 WHERE rank = 7
Which operator has a rank of 7?
CREATE TABLE table_name_20 (operator VARCHAR, rank VARCHAR)
SELECT COUNT(swimsuit) FROM table_name_32 WHERE evening_gown > 9 AND interview > 8.405
How many swimsuits have an Evening Gown larger than 9, and an Interview larger than 8.405?
CREATE TABLE table_name_32 (swimsuit VARCHAR, evening_gown VARCHAR, interview VARCHAR)
SELECT year FROM table_name_55 WHERE class = "125cc"
Tell me the year for class of 125cc
CREATE TABLE table_name_55 (year VARCHAR, class VARCHAR)
SELECT MIN(goals_for) FROM table_name_43 WHERE goals_against = 37 AND victories < 15
What is the lowest goal for a goal against 37 and less than 15 victories?
CREATE TABLE table_name_43 (goals_for INTEGER, goals_against VARCHAR, victories VARCHAR)
SELECT party FROM table_1341690_21 WHERE candidates = "Edward Boland (D) Unopposed"
what is the party where the candidates are edward boland (d) unopposed?
CREATE TABLE table_1341690_21 (party VARCHAR, candidates VARCHAR)
SELECT home_team FROM table_name_82 WHERE tie_no = "6"
What home team has 6 as the tie no.?
CREATE TABLE table_name_82 (home_team VARCHAR, tie_no VARCHAR)
SELECT position FROM table_name_78 WHERE years_for_jazz = "1982-84"
What position did someone play from 1982-84?
CREATE TABLE table_name_78 (position VARCHAR, years_for_jazz VARCHAR)
SELECT steals FROM table_19722664_5 WHERE player = "Nicole Levandusky"
How many steals did Nicole Levandusky make?
CREATE TABLE table_19722664_5 (steals VARCHAR, player VARCHAR)
SELECT rank FROM table_24765815_2 WHERE competition = "UEFA Euro 2012 qualifying Group A"
What is the ranking of the UEFA Euro 2012 qualifying Group A competition?
CREATE TABLE table_24765815_2 (rank VARCHAR, competition VARCHAR)
SELECT 2010 FROM table_name_24 WHERE 2006 = "3r"
what is 2010 when 2006 is 3r?
CREATE TABLE table_name_24 (Id VARCHAR)
SELECT tries_for FROM table_name_14 WHERE tries_against = "140"
WHAT TRIES HAVE TRIES AGAINST AT 140?
CREATE TABLE table_name_14 (tries_for VARCHAR, tries_against VARCHAR)
SELECT position FROM table_14655757_1 WHERE player = "Jessie Clark"
What position is Jessie Clark?
CREATE TABLE table_14655757_1 (position VARCHAR, player VARCHAR)
SELECT runners_up FROM table_12303563_2 WHERE nation = "Malaysia"
what's the runners-up with nation being malaysia
CREATE TABLE table_12303563_2 (runners_up VARCHAR, nation VARCHAR)
SELECT COUNT(season__number) FROM table_26866519_1 WHERE director = "Ricardo Mendez Matta"
How many episodes are directed by ricardo mendez matta?
CREATE TABLE table_26866519_1 (season__number VARCHAR, director VARCHAR)
SELECT best_finish FROM table_29499399_2 WHERE money_list_rank = "206"
What was the best finish for 206 on the money list?
CREATE TABLE table_29499399_2 (best_finish VARCHAR, money_list_rank VARCHAR)
SELECT licence_award_date FROM table_10712301_5 WHERE region = "North East England"
What is the license award date for North East England?
CREATE TABLE table_10712301_5 (licence_award_date VARCHAR, region VARCHAR)
SELECT date FROM table_name_40 WHERE circuit = "sepang international circuit" AND round = "3"
What was the date for the Sepang International circuit, round 3?
CREATE TABLE table_name_40 (date VARCHAR, circuit VARCHAR, round VARCHAR)
SELECT rank FROM table_name_74 WHERE run_2 = "2:06.62"
What is Rank, when Run 2 is 2:06.62?
CREATE TABLE table_name_74 (rank VARCHAR, run_2 VARCHAR)
SELECT opponent FROM table_name_86 WHERE attendance = "26,880"
What Opponent has an Attendance that is 26,880?
CREATE TABLE table_name_86 (opponent VARCHAR, attendance VARCHAR)
SELECT COUNT(aux_in) FROM table_24384861_1 WHERE version = "SoundDock series II"
How many times did the sounddock series II aux in?
CREATE TABLE table_24384861_1 (aux_in VARCHAR, version VARCHAR)
SELECT season FROM table_name_24 WHERE score = "0–2 (a), 3–1 (h)"
What is the Season of the game with a Score of 0–2 (a), 3–1 (h)?
CREATE TABLE table_name_24 (season VARCHAR, score VARCHAR)
SELECT title FROM table_name_62 WHERE presentation_of_credentials = "april 10, 1907"
Name the title with presentation of credentials of april 10, 1907
CREATE TABLE table_name_62 (title VARCHAR, presentation_of_credentials VARCHAR)
SELECT visitor FROM table_name_10 WHERE record = "5–8–4"
What was the visitor with a record of 5–8–4?
CREATE TABLE table_name_10 (visitor VARCHAR, record VARCHAR)
SELECT COUNT(round) FROM table_26137666_3 WHERE fastest_lap = "Fabio Carbone"
How many rounds have Fabio Carbone for fastest lap?
CREATE TABLE table_26137666_3 (round VARCHAR, fastest_lap VARCHAR)
SELECT round FROM table_name_40 WHERE venue = "canberra stadium"
What round was in canberra stadium?
CREATE TABLE table_name_40 (round VARCHAR, venue VARCHAR)
SELECT visiting_team FROM table_name_41 WHERE date = "september 15"
Who was the visiting team that played on September 15?
CREATE TABLE table_name_41 (visiting_team VARCHAR, date VARCHAR)
SELECT COUNT(season_no) FROM table_29154676_1 WHERE written_by = "Warren Leight"
How many episodes were written by Warren Leight?
CREATE TABLE table_29154676_1 (season_no VARCHAR, written_by VARCHAR)
SELECT 2012 FROM table_name_91 WHERE 2007 = "a" AND 2011 = "a"
Which tournament in 2012 had a 2007 and 2011 finishes of "A"?
CREATE TABLE table_name_91 (Id VARCHAR)
SELECT ht_brewer FROM table_1320857_1 WHERE je_armstrong = "A.J. Wilson"
Who is h.t. brewer when j.e. armstrong is a.j. wilson?
CREATE TABLE table_1320857_1 (ht_brewer VARCHAR, je_armstrong VARCHAR)
SELECT time FROM table_name_50 WHERE nation = "kenya" AND athlete = "lineth chepkurui"
What is the time when the race was in Kenya and Lineth Chepkurui was the athlete?
CREATE TABLE table_name_50 (time VARCHAR, nation VARCHAR, athlete VARCHAR)
SELECT COUNT(length__miles_) FROM table_name_95 WHERE east_or_north_terminus = "ne 2 in lincoln"
what is the length (miles) when the east or north terminus is ne 2 in lincoln?
CREATE TABLE table_name_95 (length__miles_ VARCHAR, east_or_north_terminus VARCHAR)
SELECT COUNT(purse__) AS $__ FROM table_11622255_1 WHERE winner = "Jimmy Powell (2)"
what is the total number of purse( $ ) where winner is jimmy powell (2)
CREATE TABLE table_11622255_1 (purse__ VARCHAR, winner VARCHAR)
SELECT 2003 FROM table_name_59 WHERE 2008 = "2r" AND 2011 = "1r"
What is the 2003 value with 2r in 2008 and 1r in 2011?
CREATE TABLE table_name_59 (Id VARCHAR)
SELECT result FROM table_name_87 WHERE week < 11 AND attendance = "17,568"
Which Result has a Week smaller than 11, and Attendance of 17,568?
CREATE TABLE table_name_87 (result VARCHAR, week VARCHAR, attendance VARCHAR)
SELECT manufacturer FROM table_name_34 WHERE wheel_arrangement = "4-6-6-4" AND class = "z-7"
What manufacturer has a wheel arrangement of 4-6-6-4, and a Class of z-7?
CREATE TABLE table_name_34 (manufacturer VARCHAR, wheel_arrangement VARCHAR, class VARCHAR)
SELECT first_leg FROM table_name_78 WHERE round = "semi-final"
What was the first leg of the semi-final?
CREATE TABLE table_name_78 (first_leg VARCHAR, round VARCHAR)
SELECT province FROM table_1717824_1 WHERE south_asians_2001 = 210295
Which province had population of 210295 South Asians in 2001?
CREATE TABLE table_1717824_1 (province VARCHAR, south_asians_2001 VARCHAR)
SELECT p FROM table_17634290_7 WHERE type = "Free agent 1"
What is listed in p when the type is listed as free agent 1?
CREATE TABLE table_17634290_7 (p VARCHAR, type VARCHAR)
SELECT nationality FROM table_name_79 WHERE rank = 27
What is the nationality for rank 27?
CREATE TABLE table_name_79 (nationality VARCHAR, rank VARCHAR)
SELECT region_name FROM region ORDER BY region_name
List all region names in alphabetical order.
CREATE TABLE region (region_name VARCHAR)
SELECT score FROM table_name_21 WHERE date = "march 19"
What is the Score of the game on March 19?
CREATE TABLE table_name_21 (score VARCHAR, date VARCHAR)
SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE "%gmail.com%"
How many customers have email that contains "gmail.com"?
CREATE TABLE CUSTOMER (Email VARCHAR)
SELECT MIN(year) FROM table_name_9 WHERE result = "12th"
What was the first year he placed 12th
CREATE TABLE table_name_9 (year INTEGER, result VARCHAR)
SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = "Data base"
What is the template type code of the template used by document with the name "Data base"?
CREATE TABLE Templates (template_type_code VARCHAR, template_id VARCHAR); CREATE TABLE Documents (template_id VARCHAR, document_name VARCHAR)
SELECT winning_driver FROM table_name_78 WHERE name = "kraco car stereo 150"
Who was the winning driver of the Kraco Car Stereo 150?
CREATE TABLE table_name_78 (winning_driver VARCHAR, name VARCHAR)
SELECT venue FROM table_name_27 WHERE competition = "european indoor championships" AND year > 1979
After 1979, where was the European Indoor Championships held?
CREATE TABLE table_name_27 (venue VARCHAR, competition VARCHAR, year VARCHAR)
SELECT rank FROM table_name_93 WHERE year = "2000" AND chassis = "dallara"
What rank did the dallara chassis finish in 2000?
CREATE TABLE table_name_93 (rank VARCHAR, year VARCHAR, chassis VARCHAR)
SELECT AVG(off_site_atms) FROM table_name_66 WHERE bank_type = "foreign banks" AND on_site_atms < 218
With foreign banks as the bank type, and on-site ATMS less than 218, what is the average off-site ATMs?
CREATE TABLE table_name_66 (off_site_atms INTEGER, bank_type VARCHAR, on_site_atms VARCHAR)
SELECT year FROM table_name_80 WHERE first_publisher = "kodansha novels" AND english_title = "tokyo nightmare"
What is the Year of Kodansha Novels' Tokyo Nightmare?
CREATE TABLE table_name_80 (year VARCHAR, first_publisher VARCHAR, english_title VARCHAR)