answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT AVG(price_in_euros), MIN(price_in_euros) FROM catalog_contents
What are the average and minimum price (in Euro) of all products?
CREATE TABLE catalog_contents (price_in_euros INTEGER)
SELECT rowers FROM table_name_51 WHERE rank < 4 AND country = "china"
Who were the rowers from china wh had a rank smaller than 4?
CREATE TABLE table_name_51 (rowers VARCHAR, rank VARCHAR, country VARCHAR)
SELECT COUNT(year) FROM table_name_42 WHERE result = "nominated"
How many years have a Result of nominated?
CREATE TABLE table_name_42 (year VARCHAR, result VARCHAR)
SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = "Heilo"
Find all the instruments ever used by the musician with last name "Heilo"?
CREATE TABLE instruments (bandmateid VARCHAR); CREATE TABLE Band (id VARCHAR, lastname VARCHAR)
SELECT namesake FROM table_16768245_2 WHERE longitude = "147.1W"
When the longitude is 147.1w what is the namesake of the feature?
CREATE TABLE table_16768245_2 (namesake VARCHAR, longitude VARCHAR)
SELECT AVG(events_won__us_series_) FROM table_name_83 WHERE name = "jason bennett"
How many US events did jason bennett win?
CREATE TABLE table_name_83 (events_won__us_series_ INTEGER, name VARCHAR)
SELECT viewers__millions_ FROM table_23397386_2 WHERE rating / SHARE(18 AS –49) = 2.6 / 7
How many million viewers watched the episode that had a 2.6/7 rating/share (18-49)
CREATE TABLE table_23397386_2 (viewers__millions_ VARCHAR, rating VARCHAR)
SELECT championships__years_ FROM table_name_96 WHERE league = "milb, florida state league" AND venue = "ed smith stadium"
Which Championships (Years) have a League of milb, florida state league, and a Venue of ed smith stadium?
CREATE TABLE table_name_96 (championships__years_ VARCHAR, league VARCHAR, venue VARCHAR)
SELECT area_served FROM table_name_46 WHERE on_air_id = "abc canberra"
Name the area served for on-air ID of abc canberra
CREATE TABLE table_name_46 (area_served VARCHAR, on_air_id VARCHAR)
SELECT opponents_in_the_final FROM table_name_67 WHERE partner = "jiří novák"
What is Opponents In The Final, when Partner is "Jiří Novák"?
CREATE TABLE table_name_67 (opponents_in_the_final VARCHAR, partner VARCHAR)
SELECT first_runner_up FROM table_name_40 WHERE miss_maja_pilipinas = "nanette prodigalidad"
What First runner-up has a Miss Maja Pilipinas of nanette prodigalidad?
CREATE TABLE table_name_40 (first_runner_up VARCHAR, miss_maja_pilipinas VARCHAR)
SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'
which countries' tv channels are not playing any cartoon written by Todd Casey?
CREATE TABLE TV_Channel (country VARCHAR, id VARCHAR); CREATE TABLE TV_Channel (country VARCHAR); CREATE TABLE cartoon (Channel VARCHAR, written_by VARCHAR)
SELECT grid FROM table_name_96 WHERE driver = "mark webber"
What was the grid when the driver was Mark Webber?
CREATE TABLE table_name_96 (grid VARCHAR, driver VARCHAR)
SELECT opponent FROM table_name_46 WHERE result = "l 20–17"
Who was the opponent at the Steelers game that had a result of l 20–17?
CREATE TABLE table_name_46 (opponent VARCHAR, result VARCHAR)
SELECT score FROM table_name_33 WHERE record = "55-51"
What was the score of the game when the Indians ended up with a record of 55-51?
CREATE TABLE table_name_33 (score VARCHAR, record VARCHAR)
SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student
Show ids for the faculty members who don't advise any student.
CREATE TABLE Faculty (FacID VARCHAR, advisor VARCHAR); CREATE TABLE Student (FacID VARCHAR, advisor VARCHAR)
SELECT right_ascension___j2000__ FROM table_name_71 WHERE apparent_magnitude = 10.5
When the apparent magnitude is 10.5, what is the right ascension?
CREATE TABLE table_name_71 (right_ascension___j2000__ VARCHAR, apparent_magnitude VARCHAR)
SELECT per_capita_income FROM table_name_61 WHERE median_family_income = "$40,492"
What is the per capita income of the county with a median family income of $40,492?
CREATE TABLE table_name_61 (per_capita_income VARCHAR, median_family_income VARCHAR)
SELECT SUM(a_score) FROM table_name_92 WHERE t_score < 7.3 AND e_score > 7.1
What's the sum of A Score that also has a score lower than 7.3 and an E Score larger than 7.1?
CREATE TABLE table_name_92 (a_score INTEGER, t_score VARCHAR, e_score VARCHAR)
SELECT COUNT(*) FROM Rating WHERE stars > 3
What is the total number of ratings that has more than 3 stars?
CREATE TABLE Rating (stars INTEGER)
SELECT date FROM table_name_57 WHERE location = "prague" AND competition = "world group, consolation round"
what is the date for the game in prague for the world group, consolation round competition?
CREATE TABLE table_name_57 (date VARCHAR, location VARCHAR, competition VARCHAR)
SELECT cmp_att_int FROM table_name_61 WHERE gp_gs = "3-0"
Which Cmp-Att-Int has a GP-GS of 3-0?
CREATE TABLE table_name_61 (cmp_att_int VARCHAR, gp_gs VARCHAR)
SELECT claimant FROM table_name_7 WHERE rank = 200
Which claimant's rank is 200?
CREATE TABLE table_name_7 (claimant VARCHAR, rank VARCHAR)
SELECT animal_name FROM table_name_98 WHERE tv_series = "yes" AND species = "terrapins"
What animal was yes for tv series and was a terrapins?
CREATE TABLE table_name_98 (animal_name VARCHAR, tv_series VARCHAR, species VARCHAR)
SELECT MIN(points) FROM table_name_2 WHERE class = "50cc" AND year = 1965 AND wins < 0
What is the lowest Points, when Class is 50cc, when Year is 1965, and when Wins is less than 0?
CREATE TABLE table_name_2 (points INTEGER, wins VARCHAR, class VARCHAR, year VARCHAR)
SELECT interview_subject FROM table_name_60 WHERE centerfold_model = "athena lundberg"
Which Interview subject has a Centerfold model of athena lundberg?
CREATE TABLE table_name_60 (interview_subject VARCHAR, centerfold_model VARCHAR)
SELECT COUNT(games_played) FROM table_2387461_1 WHERE points_per_game = "4.7"
How many games played have 4.7 points per game?
CREATE TABLE table_2387461_1 (games_played VARCHAR, points_per_game VARCHAR)
SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000
Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats.
CREATE TABLE track (LOCATION VARCHAR, seating INTEGER)
SELECT MIN(bangladeshi_population) FROM table_19149550_9 WHERE rank = 7
How many Bangladeshi citizens are there in the borough ranked at number 7?
CREATE TABLE table_19149550_9 (bangladeshi_population INTEGER, rank VARCHAR)
SELECT wins FROM table_17246160_1 WHERE series = "Formula BMW World Final"
How many wins did the player have in the Formula BMW World Final?
CREATE TABLE table_17246160_1 (wins VARCHAR, series VARCHAR)
SELECT date FROM table_name_32 WHERE team = "phoenix"
What day did Phoenix play?
CREATE TABLE table_name_32 (date VARCHAR, team VARCHAR)
SELECT total FROM table_name_80 WHERE set_2 = "25-18"
What is the total for the set 2 of 25-18?
CREATE TABLE table_name_80 (total VARCHAR, set_2 VARCHAR)
SELECT MIN(episode_no) FROM table_24399615_4 WHERE cable_rank = "8"
What episode number had a cable ranking of 8?
CREATE TABLE table_24399615_4 (episode_no INTEGER, cable_rank VARCHAR)
SELECT away_team FROM table_name_74 WHERE home_team = "newton heath"
Who was the away team against Newton Heath?
CREATE TABLE table_name_74 (away_team VARCHAR, home_team VARCHAR)
SELECT MIN(bronze) FROM table_name_66 WHERE total = 4 AND gold < 1
What is the low bronze total for the team with 4 total and under 1 gold?
CREATE TABLE table_name_66 (bronze INTEGER, total VARCHAR, gold VARCHAR)
SELECT coach FROM table_name_6 WHERE location = "port pirie"
Who is the coach of the team from Port Pirie?
CREATE TABLE table_name_6 (coach VARCHAR, location VARCHAR)
SELECT MAX(runs_scored) FROM table_21486890_1
Name the most runs scored
CREATE TABLE table_21486890_1 (runs_scored INTEGER)
SELECT AVG(defenses) FROM table_name_57 WHERE days_held = "404" AND reign > 1
What is the average defenses a champion with 404 days held and a reign larger than 1 has?
CREATE TABLE table_name_57 (defenses INTEGER, days_held VARCHAR, reign VARCHAR)
SELECT name FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review)
Find the names of users who did not leave any review.
CREATE TABLE review (name VARCHAR, u_id VARCHAR); CREATE TABLE useracct (name VARCHAR, u_id VARCHAR)
SELECT COUNT(week) FROM table_name_96 WHERE date = "october 31, 1954"
How many weeks have october 31, 1954 as the date?
CREATE TABLE table_name_96 (week VARCHAR, date VARCHAR)
SELECT place FROM table_name_21 WHERE country = "spain"
What place is the golfer in who is from Spain?
CREATE TABLE table_name_21 (place VARCHAR, country VARCHAR)
SELECT AVG(against) FROM table_name_28 WHERE status = "five nations" AND date = "16/03/1996"
What is the average Against, when Status is "Five Nations", and when Date is "16/03/1996"?
CREATE TABLE table_name_28 (against INTEGER, status VARCHAR, date VARCHAR)
SELECT date FROM table_name_34 WHERE record = "1-4"
Which Date has a Record of 1-4?
CREATE TABLE table_name_34 (date VARCHAR, record VARCHAR)
SELECT written_by FROM table_16432167_1 WHERE production_code = "942A"
Who wrote the episode with the production code of 942A?
CREATE TABLE table_16432167_1 (written_by VARCHAR, production_code VARCHAR)
SELECT reward FROM table_24233848_2 WHERE eliminated = "Hilca"
Name the reward eliminated hilca
CREATE TABLE table_24233848_2 (reward VARCHAR, eliminated VARCHAR)
SELECT opponent FROM table_name_43 WHERE season = "2008–09" AND final_score = "2–3 l"
What team was the opponent in the 2008–09 season, with a final score of 2–3 l?
CREATE TABLE table_name_43 (opponent VARCHAR, season VARCHAR, final_score VARCHAR)
SELECT round FROM table_name_99 WHERE venue = "ullevaal"
What Round is in Ullevaal?
CREATE TABLE table_name_99 (round VARCHAR, venue VARCHAR)
SELECT T1.first_name, T1.last_name, T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id
List each owner's first name, last name, and the size of his for her dog.
CREATE TABLE Owners (first_name VARCHAR, last_name VARCHAR, owner_id VARCHAR); CREATE TABLE Dogs (size_code VARCHAR, owner_id VARCHAR)
SELECT date FROM table_name_26 WHERE week < 15 AND result = "bye"
When was the game before week 15 with the result of bye?
CREATE TABLE table_name_26 (date VARCHAR, week VARCHAR, result VARCHAR)
SELECT type FROM table_name_57 WHERE manufacturer = "unknown"
Which type had an unknown manufacturer?
CREATE TABLE table_name_57 (type VARCHAR, manufacturer VARCHAR)
SELECT score FROM table_name_28 WHERE to_par = "–3" AND country = "united states"
WHich Score has a To par of –3, and a Country of united states?
CREATE TABLE table_name_28 (score VARCHAR, to_par VARCHAR, country VARCHAR)
SELECT l2_cache FROM table_name_38 WHERE release_price___usd__ = "$496"
What was the L2 Cache for the processor with a release price of $496?
CREATE TABLE table_name_38 (l2_cache VARCHAR, release_price___usd__ VARCHAR)
SELECT opponent FROM table_name_94 WHERE date = "may 30"
Which Opponent has a Date of may 30?
CREATE TABLE table_name_94 (opponent VARCHAR, date VARCHAR)
SELECT COUNT(seats_forfeited) FROM table_20728138_1 WHERE party = "Revolutionary Socialist party"
How many seats were forfeited in the revolutionary socialist party?
CREATE TABLE table_20728138_1 (seats_forfeited VARCHAR, party VARCHAR)
SELECT record FROM table_name_37 WHERE visitor = "quebec nordiques" AND score = "7–5"
WHich Record has a Visitor of quebec nordiques with a Score of 7–5?
CREATE TABLE table_name_37 (record VARCHAR, visitor VARCHAR, score VARCHAR)
SELECT location FROM table_11214772_2 WHERE year = 2007
Where was the final game played in 2007
CREATE TABLE table_11214772_2 (location VARCHAR, year VARCHAR)
SELECT prize_money FROM table_12454156_1 WHERE runner_up = "Fabrizio Baldassari"
When Fabrizio Baldassari is the runner-up what is the total prize money?
CREATE TABLE table_12454156_1 (prize_money VARCHAR, runner_up VARCHAR)
SELECT AVG(total) FROM table_name_8 WHERE parallel_bars = "14.625"
With a parallel bars score of 14.625 what is the average total?
CREATE TABLE table_name_8 (total INTEGER, parallel_bars VARCHAR)
SELECT show FROM table_name_39 WHERE date = "9 june"
Which Show is dated 9 June?
CREATE TABLE table_name_39 (show VARCHAR, date VARCHAR)
SELECT COUNT(export_volume_of_goods_and_services__percent_change_) FROM table_30133_1 WHERE gdp_at_constant_prices__thb_trillions_ = "3.072"
How many export volume of goods/services values are associated with GDP at constant prices values of 3.072?
CREATE TABLE table_30133_1 (export_volume_of_goods_and_services__percent_change_ VARCHAR, gdp_at_constant_prices__thb_trillions_ VARCHAR)
SELECT COUNT(game) FROM table_23308178_8 WHERE record = "39-12-6"
How many games did they have a record of 39-12-6?
CREATE TABLE table_23308178_8 (game VARCHAR, record VARCHAR)
SELECT name FROM browser ORDER BY market_share DESC
List the name of browsers in descending order by market share.
CREATE TABLE browser (name VARCHAR, market_share VARCHAR)
SELECT rank__all__2012 FROM table_23950611_2 WHERE name = "Cenovus Energy"
What was the Forbers rank (all companies) in 2012 for cenovus energy?
CREATE TABLE table_23950611_2 (rank__all__2012 VARCHAR, name VARCHAR)
SELECT res FROM table_name_1 WHERE record = "4-4"
What was the result of the bout that led to a 4-4 record?
CREATE TABLE table_name_1 (res VARCHAR, record VARCHAR)
SELECT apogee FROM table_name_5 WHERE date = "1959-02-20"
Which Apogee was on 1959-02-20?
CREATE TABLE table_name_5 (apogee VARCHAR, date VARCHAR)
SELECT 2 AS nd_leg FROM table_14219514_2 WHERE home__2nd_leg_ = "Platense"
When platense is the home (2nd leg) what is the 2nd leg?
CREATE TABLE table_14219514_2 (home__2nd_leg_ VARCHAR)
SELECT nation FROM table_name_46 WHERE total > 4 AND bronze < 4
Name the nation when bronze is less than 4 and the total is more than 4
CREATE TABLE table_name_46 (nation VARCHAR, total VARCHAR, bronze VARCHAR)
SELECT length__miles_ FROM table_1817879_2 WHERE endpoints = "Westlake/MacArthur Park to Wilshire/Western"
What is the lenth (miles) of endpoints westlake/macarthur park to wilshire/western?
CREATE TABLE table_1817879_2 (length__miles_ VARCHAR, endpoints VARCHAR)
SELECT COUNT(position) FROM table_name_22 WHERE pts_agst = 572 AND pts_for > 346
Pts Agst of 572, and a Pts For larger than 346 has what total number of position?
CREATE TABLE table_name_22 (position VARCHAR, pts_agst VARCHAR, pts_for VARCHAR)
SELECT COUNT(total) FROM table_name_4 WHERE bronze > 1 AND silver = 1
What is the total number of totals for nations with 1 silver and more than 1 bronze?
CREATE TABLE table_name_4 (total VARCHAR, bronze VARCHAR, silver VARCHAR)
SELECT status FROM table_name_84 WHERE authors = "del corro"
What is the status of Author Del Corro?
CREATE TABLE table_name_84 (status VARCHAR, authors VARCHAR)
SELECT week_3 FROM table_name_2 WHERE week_9 = "ejected (day 3)"
Which Week 3 has a Week 9 of ejected (day 3)?
CREATE TABLE table_name_2 (week_3 VARCHAR, week_9 VARCHAR)
SELECT club FROM table_12792876_2 WHERE points_against = "714"
Which club gave up 714 points?
CREATE TABLE table_12792876_2 (club VARCHAR, points_against VARCHAR)
SELECT engine FROM table_name_74 WHERE chassis = "minardi m187"
What engine was paired with Minardi m187?
CREATE TABLE table_name_74 (engine VARCHAR, chassis VARCHAR)
SELECT status FROM table_name_71 WHERE opposing_teams = "france"
What status has France as the opposing teams?
CREATE TABLE table_name_71 (status VARCHAR, opposing_teams VARCHAR)
SELECT 1956 AS _1968 FROM table_name_31 WHERE 1969 = "qf"
What did the tournament with a QF in 1969 get in 1956-1968?
CREATE TABLE table_name_31 (Id VARCHAR)
SELECT launched FROM table_name_36 WHERE builder = "fujinagata shipyards, japan" AND laid_down = "20 october 1924"
when was the ship launched when it was laid down 20 october 1924 and built by fujinagata shipyards, japan?
CREATE TABLE table_name_36 (launched VARCHAR, builder VARCHAR, laid_down VARCHAR)
SELECT COUNT(athlete) FROM table_17289604_38 WHERE round_of_64 = "Llagostera Vives ( ESP ) L 6–2, 3–6, 5–7"
How many number of athletes were in round of 64 was llagostera Vives ( esp ) l 6–2, 3–6, 5–7?
CREATE TABLE table_17289604_38 (athlete VARCHAR, round_of_64 VARCHAR)
SELECT SUM(lane) FROM table_name_91 WHERE time = "dns" AND name = "christian kubusch" AND heat > 2
What was Christian Kubusch's lane when the heat was more than 2 and time was DNS?
CREATE TABLE table_name_91 (lane INTEGER, heat VARCHAR, time VARCHAR, name VARCHAR)
SELECT slalom FROM table_name_2 WHERE country = "switzerland"
What Slalom was Switzerland in?
CREATE TABLE table_name_2 (slalom VARCHAR, country VARCHAR)
SELECT date FROM table_name_16 WHERE record = "53-75"
What date was 53-75 recorded?
CREATE TABLE table_name_16 (date VARCHAR, record VARCHAR)
SELECT to_par FROM table_name_47 WHERE country = "united states" AND place = "t3" AND player = "tim herron"
What is the to par of player Tim Herron from the United States with a t3 place?
CREATE TABLE table_name_47 (to_par VARCHAR, player VARCHAR, country VARCHAR, place VARCHAR)
SELECT time_retired FROM table_name_14 WHERE driver = "emerson fittipaldi"
What is the Time/Retired for emerson fittipaldi?
CREATE TABLE table_name_14 (time_retired VARCHAR, driver VARCHAR)
SELECT county FROM table_24329520_8 WHERE members = 1 AND franchise_type = "Corporation" AND borough = "Ennis"
Which county has a membership of 1, a franchise type of corporation and a borough of Ennis?
CREATE TABLE table_24329520_8 (county VARCHAR, borough VARCHAR, members VARCHAR, franchise_type VARCHAR)
SELECT runners_up FROM table_28962227_1 WHERE finale = "16 October 2012"
List all the runners-up on 16 October 2012?
CREATE TABLE table_28962227_1 (runners_up VARCHAR, finale VARCHAR)
SELECT city FROM table_18159601_1 WHERE charter_date = "December 4, 2011"
in which city was charter date december 4, 2011
CREATE TABLE table_18159601_1 (city VARCHAR, charter_date VARCHAR)
SELECT home FROM table_name_80 WHERE date = "april 15"
On April 15 who is the Home team?
CREATE TABLE table_name_80 (home VARCHAR, date VARCHAR)
SELECT date FROM table_name_72 WHERE format = "cd" AND catalog = "alca-274"
What date has the format of CD and catalog of alca-274?
CREATE TABLE table_name_72 (date VARCHAR, format VARCHAR, catalog VARCHAR)
SELECT height_m___feet FROM table_name_97 WHERE name = "shanghai x-1 financial building"
What is the height for shanghai x-1 financial building?
CREATE TABLE table_name_97 (height_m___feet VARCHAR, name VARCHAR)
SELECT format FROM table_name_55 WHERE date = "april 16, 2009"
What format was released April 16, 2009?
CREATE TABLE table_name_55 (format VARCHAR, date VARCHAR)
SELECT new_points FROM table_27615896_18 WHERE rk = 26
How many new points were earned by rk 26?
CREATE TABLE table_27615896_18 (new_points VARCHAR, rk VARCHAR)
SELECT callsign FROM table_12547903_2 WHERE location__transmitter_site_ = "Tuguegarao"
What is the callsign of tuguegarao
CREATE TABLE table_12547903_2 (callsign VARCHAR, location__transmitter_site_ VARCHAR)
SELECT party FROM table_name_97 WHERE name = "marie-dominique simonet"
What party is Marie-Dominique Simonet part of?
CREATE TABLE table_name_97 (party VARCHAR, name VARCHAR)
SELECT time_retired FROM table_name_89 WHERE constructor = "source:"
What's the time/retired for constructor source:?
CREATE TABLE table_name_89 (time_retired VARCHAR, constructor VARCHAR)
SELECT high_assists FROM table_name_1 WHERE game < 60
What was the high amount of assists before game 60?
CREATE TABLE table_name_1 (high_assists VARCHAR, game INTEGER)
SELECT name FROM table_name_19 WHERE pick__number = 10
What is the Name of draft Pick #10?
CREATE TABLE table_name_19 (name VARCHAR, pick__number VARCHAR)
SELECT years_played FROM table_10023387_1 WHERE player = "Im Chung-Yang"
what years are played for player  im chung-yang
CREATE TABLE table_10023387_1 (years_played VARCHAR, player VARCHAR)
SELECT term_in_office FROM table_name_74 WHERE member = "hon les johnson"
When was Hon Les Johnson in office?
CREATE TABLE table_name_74 (term_in_office VARCHAR, member VARCHAR)
SELECT 2006 FROM table_name_13 WHERE team = "tacuary"
What is 2006, when Team is "Tacuary"?
CREATE TABLE table_name_13 (team VARCHAR)
SELECT longitude FROM table_name_61 WHERE name = "raskova paterae"
What is Longitude, when Name is Raskova Paterae?
CREATE TABLE table_name_61 (longitude VARCHAR, name VARCHAR)