answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy'
Find the number of routes with destination airports in Italy.
CREATE TABLE routes (dst_apid VARCHAR); CREATE TABLE airports (apid VARCHAR, country VARCHAR)
SELECT away_team FROM table_name_68 WHERE home_team = "hawthorn"
Who was Hawthorn's away opponent?
CREATE TABLE table_name_68 (away_team VARCHAR, home_team VARCHAR)
SELECT MAX(year_set) FROM table_name_67 WHERE event = "100m freestyle"
What was the latest year that had a 100m freestyle?
CREATE TABLE table_name_67 (year_set INTEGER, event VARCHAR)
SELECT saka_era FROM table_name_31 WHERE sign_of_zodiac = "virgo"
WHAT IS THE SAKA ERA OF VIRGO?
CREATE TABLE table_name_31 (saka_era VARCHAR, sign_of_zodiac VARCHAR)
SELECT attendance FROM table_name_96 WHERE game > 4
What was the attendance for the game after game 4?
CREATE TABLE table_name_96 (attendance VARCHAR, game INTEGER)
SELECT country FROM table_name_34 WHERE icao = "lemd"
Which country is Lemd the ICAO of?
CREATE TABLE table_name_34 (country VARCHAR, icao VARCHAR)
SELECT MAX(year) FROM table_name_37 WHERE chassis = "emeryson 1006" AND points > 0
What is the latest year for a Emeryson 1006 chassis with more than 0 points?
CREATE TABLE table_name_37 (year INTEGER, chassis VARCHAR, points VARCHAR)
SELECT nationality FROM table_2850912_3 WHERE player = "Trent Yawney"
What country is Trent Yawney from?
CREATE TABLE table_2850912_3 (nationality VARCHAR, player VARCHAR)
SELECT date FROM table_1139087_2 WHERE location = "Jerez"
What day was the grand prix in jerez?
CREATE TABLE table_1139087_2 (date VARCHAR, location VARCHAR)
SELECT candidates FROM table_2668336_17 WHERE district = "North Carolina 10"
In district North Carolina 10, what are the candidates?
CREATE TABLE table_2668336_17 (candidates VARCHAR, district VARCHAR)
SELECT chassis FROM table_name_4 WHERE driver = "john watson"
What chassis did John Watson drive?
CREATE TABLE table_name_4 (chassis VARCHAR, driver VARCHAR)
SELECT MIN(nick_prod__number) FROM table_2655016_4
What is the lowest Nick production number?
CREATE TABLE table_2655016_4 (nick_prod__number INTEGER)
SELECT COUNT(title) FROM table_11951237_2 WHERE original_air_date = "August 31, 1995"
How many episodes originally aired on August 31, 1995?
CREATE TABLE table_11951237_2 (title VARCHAR, original_air_date VARCHAR)
SELECT team FROM table_name_22 WHERE start = 8 AND year < 2008
Which team had a start of 8 in years under 2008?
CREATE TABLE table_name_22 (team VARCHAR, start VARCHAR, year VARCHAR)
SELECT change FROM table_name_71 WHERE share = "2.9%"
Name the change with share of 2.9%
CREATE TABLE table_name_71 (change VARCHAR, share VARCHAR)
SELECT date FROM table_name_72 WHERE visiting_team = "denver broncos"
Name the date for visiting team of denver broncos
CREATE TABLE table_name_72 (date VARCHAR, visiting_team VARCHAR)
SELECT away_team AS score FROM table_name_67 WHERE away_team = "melbourne"
In the game where Melbourne was the away team, what did they score?
CREATE TABLE table_name_67 (away_team VARCHAR)
SELECT AVG(overall) FROM table_name_38 WHERE name = "john ayres" AND pick__number > 4
What is the average overall of John Ayres, who had a pick # greater than 4?
CREATE TABLE table_name_38 (overall INTEGER, name VARCHAR, pick__number VARCHAR)
SELECT call_sign FROM table_name_34 WHERE format = "country" AND frequency = "fm 93.1"
What is the call sign for country station fm 93.1?
CREATE TABLE table_name_34 (call_sign VARCHAR, format VARCHAR, frequency VARCHAR)
SELECT home_team FROM table_name_73 WHERE crowd > 19 OFFSET 000
Which home team has more than 19,000 spectators?
CREATE TABLE table_name_73 (home_team VARCHAR, crowd INTEGER)
SELECT round_of_32 FROM table_name_62 WHERE conference = "southland"
Tell me the round of 32 for conference of southland
CREATE TABLE table_name_62 (round_of_32 VARCHAR, conference VARCHAR)
SELECT lap_by_lap FROM table_name_29 WHERE year < 1994 AND ratings = "8.0/21"
Who was the lap-by-lap broadcaster before 1994 who garnered ratings of 8.0/21?
CREATE TABLE table_name_29 (lap_by_lap VARCHAR, year VARCHAR, ratings VARCHAR)
SELECT date FROM table_name_32 WHERE result = "bye"
When was there a bye result?
CREATE TABLE table_name_32 (date VARCHAR, result VARCHAR)
SELECT result FROM table_name_75 WHERE incumbent = "william elliott"
When the incumbent was William Elliott, what was the result?
CREATE TABLE table_name_75 (result VARCHAR, incumbent VARCHAR)
SELECT AVG(lost) FROM table_name_14 WHERE games < 82 AND points < 95 AND pct__percentage < 0.506
What is the average Lost, when Games is less than 82, when Points is less than 95, and when Pct % is less than 0.506?
CREATE TABLE table_name_14 (lost INTEGER, pct__percentage VARCHAR, games VARCHAR, points VARCHAR)
SELECT COUNT(report) FROM table_10527215_3 WHERE pole_position = "Al Unser" AND winning_team = "Penske Racing"
What's the report on Penske Racing winning while the pole position was Al Unser?
CREATE TABLE table_10527215_3 (report VARCHAR, pole_position VARCHAR, winning_team VARCHAR)
SELECT SUM(bronze) FROM table_name_30 WHERE total < 4 AND gold > 0 AND silver = 0
Who has a total of the Bronze less than 4, gold more than 0, and no silver?
CREATE TABLE table_name_30 (bronze INTEGER, silver VARCHAR, total VARCHAR, gold VARCHAR)
SELECT tv_network_s_ FROM table_name_92 WHERE country = "bulgaria"
What is the name of Bulgaria's TV network?
CREATE TABLE table_name_92 (tv_network_s_ VARCHAR, country VARCHAR)
SELECT results FROM table_1341423_36 WHERE incumbent = "Ernest Istook"
What was the results when the incumbent was ernest istook?
CREATE TABLE table_1341423_36 (results VARCHAR, incumbent VARCHAR)
SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orde...
Find the names of customers who ordered both products Latte and Americano.
CREATE TABLE products (product_id VARCHAR, product_details VARCHAR); CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)
SELECT position FROM table_2508633_4 WHERE nfl_team = "New Orleans Saints"
What were the pick numbers of the defensive tackles chosen by the New Orleans Saints in the 1983 draft?
CREATE TABLE table_2508633_4 (position VARCHAR, nfl_team VARCHAR)
SELECT COUNT(points) FROM table_13015539_1 WHERE lost = 8
What is the total points for the tean with 8 losses?
CREATE TABLE table_13015539_1 (points VARCHAR, lost VARCHAR)
SELECT model FROM table_name_98 WHERE specification = "dl-718"
Which model had a Specification of dl-718?
CREATE TABLE table_name_98 (model VARCHAR, specification VARCHAR)
SELECT novelty FROM table_name_37 WHERE authors = "galton"
What is the Novelty of the dinosaur, whose naming Author was Galton?
CREATE TABLE table_name_37 (novelty VARCHAR, authors VARCHAR)
SELECT venue FROM table_name_32 WHERE date = "3,4,5,6,7 june 1993"
What was the venue for the matches played on the dates 3,4,5,6,7 June 1993?
CREATE TABLE table_name_32 (venue VARCHAR, date VARCHAR)
SELECT accolade FROM table_name_8 WHERE country = "united states" AND year = 1999
What is Accolade, when Country is "United States", and when Year is "1999"?
CREATE TABLE table_name_8 (accolade VARCHAR, country VARCHAR, year VARCHAR)
SELECT home_team FROM table_name_96 WHERE away_team = "essendon"
Who is the home team of the game against Essendon?
CREATE TABLE table_name_96 (home_team VARCHAR, away_team VARCHAR)
SELECT rank_world FROM table_2248784_3 WHERE rank_subcontinent = 7
Name the rank world for 7 rank subcontinent
CREATE TABLE table_2248784_3 (rank_world VARCHAR, rank_subcontinent VARCHAR)
SELECT market_value__billion_$_ FROM table_1682026_7 WHERE assets__billion_$_ = "1,380.88"
What is the market value in billions when the assets totaled 1,380.88?
CREATE TABLE table_1682026_7 (market_value__billion_$_ VARCHAR, assets__billion_$_ VARCHAR)
SELECT extra FROM table_name_90 WHERE tournament = "commonwealth games"
What was the extra info for the Commonwealth Games?
CREATE TABLE table_name_90 (extra VARCHAR, tournament VARCHAR)
SELECT COUNT(bronze) FROM table_name_97 WHERE silver > 0 AND total = 7 AND gold < 1
What is the total number of bronze a team with more than 0 silver, a total of 7 medals, and less than 1 gold medal has?
CREATE TABLE table_name_97 (bronze VARCHAR, gold VARCHAR, silver VARCHAR, total VARCHAR)
SELECT latitude FROM table_name_18 WHERE diameter__km_ = 0
What is the latitude of the 0 diameter?
CREATE TABLE table_name_18 (latitude VARCHAR, diameter__km_ VARCHAR)
SELECT COUNT(yards) FROM table_19418696_3 WHERE qb_rating = "72.3"
How many yardage figures for the player with 72.3 QB rating?
CREATE TABLE table_19418696_3 (yards VARCHAR, qb_rating VARCHAR)
SELECT nickname FROM table_2538117_7 WHERE founding_university = "Charlotte, NC"
If the founding university is in Charlotte, NC, what is the nickname?
CREATE TABLE table_2538117_7 (nickname VARCHAR, founding_university VARCHAR)
SELECT hometown FROM table_name_68 WHERE player = "tre madden"
What is the hometown for tre madden?
CREATE TABLE table_name_68 (hometown VARCHAR, player VARCHAR)
SELECT driver FROM table_name_2 WHERE time_retired = "fuel system"
Which driver had a time/retired of fuel system?
CREATE TABLE table_name_2 (driver VARCHAR, time_retired VARCHAR)
SELECT sspec_number FROM table_name_68 WHERE model_number = "atom n475"
What is sSpec Number, when Model Number is Atom N475?
CREATE TABLE table_name_68 (sspec_number VARCHAR, model_number VARCHAR)
SELECT COUNT(attendance) FROM table_11452830_2 WHERE record = "1-3"
How many crowds watched the game where the record was 1-3?
CREATE TABLE table_11452830_2 (attendance VARCHAR, record VARCHAR)
SELECT nationality FROM table_name_41 WHERE round > 4 AND position = "right wing"
What is the nationality of the player with a round after 4 and plays right wing?
CREATE TABLE table_name_41 (nationality VARCHAR, round VARCHAR, position VARCHAR)
SELECT home_team AS score FROM table_name_13 WHERE venue = "junction oval"
What was the home team's score at the game held at Junction Oval?
CREATE TABLE table_name_13 (home_team VARCHAR, venue VARCHAR)
SELECT machine FROM table_name_95 WHERE place = 5
What machine has 5 as the place?
CREATE TABLE table_name_95 (machine VARCHAR, place VARCHAR)
SELECT vacator FROM table_224844_4 WHERE district = "Connecticut At-large"
Who left a seat open for the district of connecticut at-large
CREATE TABLE table_224844_4 (vacator VARCHAR, district VARCHAR)
SELECT archive FROM table_2102714_1 WHERE run_time = "25:24"
What was the archive for the episode with a run time of 25:24?
CREATE TABLE table_2102714_1 (archive VARCHAR, run_time VARCHAR)
SELECT MIN(season) FROM table_name_34 WHERE super_g = "33"
What is the oldest season that had a listed Super G score of 33?
CREATE TABLE table_name_34 (season INTEGER, super_g VARCHAR)
SELECT MIN(silver) FROM table_name_17 WHERE total < 5 AND gold < 4
What is the least amount of silvers for a team with less than 4 golds and less than 5 total medals?
CREATE TABLE table_name_17 (silver INTEGER, total VARCHAR, gold VARCHAR)
SELECT winner FROM table_name_1 WHERE score = "7–6(4), 6–4"
Who wins with a score 7–6(4), 6–4
CREATE TABLE table_name_1 (winner VARCHAR, score VARCHAR)
SELECT COUNT(ranking_la__2_) FROM table_19948664_2 WHERE world_ranking__1_ = "21st"
How many items were under ranking l.a.(2) when the world ranking was 21st?
CREATE TABLE table_19948664_2 (ranking_la__2_ VARCHAR, world_ranking__1_ VARCHAR)
SELECT money_raised, _2q FROM table_name_28 WHERE total_receipts = "$63,075,927"
How much money was raised in the 2Q when the total receipts were $63,075,927?
CREATE TABLE table_name_28 (money_raised VARCHAR, _2q VARCHAR, total_receipts VARCHAR)
SELECT SUM(year) FROM table_name_40 WHERE director = "erik clausen" AND english_title = "the dark side of the moon"
What is the submission Year of the Film The Dark Side of the Moon directed by Erik Clausen?
CREATE TABLE table_name_40 (year INTEGER, director VARCHAR, english_title VARCHAR)
SELECT opponent FROM table_name_93 WHERE loss = "hendrickson (0-1)"
Who was the opponent at the game that had a loss of Hendrickson (0-1)?
CREATE TABLE table_name_93 (opponent VARCHAR, loss VARCHAR)
SELECT date FROM table_name_82 WHERE record = "6-6"
Which Date has a Record of 6-6?
CREATE TABLE table_name_82 (date VARCHAR, record VARCHAR)
SELECT away_team AS score FROM table_name_28 WHERE home_team = "hawthorn"
What was the away team score at Hawthorn's home game?
CREATE TABLE table_name_28 (away_team VARCHAR, home_team VARCHAR)
SELECT season FROM table_name_12 WHERE lead = "michael goodfellow"
What is Season, when Lead is "Michael Goodfellow"?
CREATE TABLE table_name_12 (season VARCHAR, lead VARCHAR)
SELECT MAX(peru_vs_world__percent_) FROM table_11727969_1 WHERE species_in_the_world = 9672
what's the maximum peru vs. world (percent) with 9672 species in the world 
CREATE TABLE table_11727969_1 (peru_vs_world__percent_ INTEGER, species_in_the_world VARCHAR)
SELECT district FROM table_name_33 WHERE party = "republican" AND first_elected = 1998
In which district is the incumbent a republican first elected in 1998?
CREATE TABLE table_name_33 (district VARCHAR, party VARCHAR, first_elected VARCHAR)
SELECT australian FROM table_name_67 WHERE british = "ɪ" AND letter = "æ /i/"
What is the Australian letter with a British of ɪ and a letter of æ /i/??
CREATE TABLE table_name_67 (australian VARCHAR, british VARCHAR, letter VARCHAR)
SELECT meet FROM table_name_67 WHERE date = "3 august 2012"
what is the meet when the date is 3 august 2012?
CREATE TABLE table_name_67 (meet VARCHAR, date VARCHAR)
SELECT name, LOCATION FROM station ORDER BY Annual_entry_exit, Annual_interchanges
List the names and locations of all stations ordered by their yearly entry exit and interchange amounts.
CREATE TABLE station (name VARCHAR, LOCATION VARCHAR, Annual_entry_exit VARCHAR, Annual_interchanges VARCHAR)
SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1)
What are all the customer phone numbers under the most popular policy type?
CREATE TABLE available_policies (customer_phone VARCHAR, policy_type_code VARCHAR)
SELECT director FROM table_name_94 WHERE title = "fish tales"
Who is the Director of Fish Tales?
CREATE TABLE table_name_94 (director VARCHAR, title VARCHAR)
SELECT T1.name, AVG(trust) FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id GROUP BY T2.target_u_id
Find each target user's name and average trust score.
CREATE TABLE trust (target_u_id VARCHAR); CREATE TABLE useracct (name VARCHAR, u_id VARCHAR)
SELECT losing_team FROM table_name_44 WHERE total = 24 AND winning_team = "sydney roosters"
Who was the losing team with a total of 24 when the winning team was Sydney Roosters?
CREATE TABLE table_name_44 (losing_team VARCHAR, total VARCHAR, winning_team VARCHAR)
SELECT COUNT(wheels) FROM table_15412381_5 WHERE lms_nos = "16377-9"
How many figures are there for wheels for LMS numbers 16377-9?
CREATE TABLE table_15412381_5 (wheels VARCHAR, lms_nos VARCHAR)
SELECT series FROM table_21795846_1 WHERE position = "12th"
If the position is 12th, what was the series?
CREATE TABLE table_21795846_1 (series VARCHAR, position VARCHAR)
SELECT team FROM table_name_39 WHERE player = "oliver dobbins"
What team does Oliver Dobbins play for?
CREATE TABLE table_name_39 (team VARCHAR, player VARCHAR)
SELECT SUM(joined) FROM table_name_61 WHERE nickname = "knights" AND enrollment > 2 OFFSET 960
Which Joined has a Nickname of knights, and an Enrollment larger than 2,960?
CREATE TABLE table_name_61 (joined INTEGER, nickname VARCHAR, enrollment VARCHAR)
SELECT enrollment FROM table_name_9 WHERE mascot = "fighting '59ers"
What is the enrollment for the school with the mascot of the Fighting '59ers?
CREATE TABLE table_name_9 (enrollment VARCHAR, mascot VARCHAR)
SELECT name FROM table_name_48 WHERE dates_active = "season aggregates"
What is the name of the storm active during season aggregates?
CREATE TABLE table_name_48 (name VARCHAR, dates_active VARCHAR)
SELECT AVG(draws) FROM table_name_97 WHERE losses < 2
What is the average Draws, when Losses is less than 2?
CREATE TABLE table_name_97 (draws INTEGER, losses INTEGER)
SELECT surface FROM table_29127804_3 WHERE location = "Dehradun , Uttarakhand, India"
what is the material of the surface in the dehradun , uttarakhand, india location
CREATE TABLE table_29127804_3 (surface VARCHAR, location VARCHAR)
SELECT COUNT(bleeding_time) FROM table_221653_1 WHERE condition = "Disseminated intravascular coagulation"
What is the bleeding time for the disseminated intravascular coagulation condition?
CREATE TABLE table_221653_1 (bleeding_time VARCHAR, condition VARCHAR)
SELECT MAX(obama_number) FROM table_20468206_1 WHERE mccain_number = 29266
Name the most abama number for mccain being 29266
CREATE TABLE table_20468206_1 (obama_number INTEGER, mccain_number VARCHAR)
SELECT MIN(position) FROM table_name_47 WHERE points > 11 AND name = "ea schongau" AND lost < 3
what is the lowest position when points is more than 11, name is ea schongau and lost is less than 3?
CREATE TABLE table_name_47 (position INTEGER, lost VARCHAR, points VARCHAR, name VARCHAR)
SELECT attendance FROM table_name_57 WHERE loss = "volquez (1–4)"
How many in attendance with a loss of volquez (1–4)?
CREATE TABLE table_name_57 (attendance VARCHAR, loss VARCHAR)
SELECT MIN(division) FROM table_1990460_1 WHERE regular_season = "6th, Great Lakes"
What's the lowest division number of the 6th, Great Lakes season?
CREATE TABLE table_1990460_1 (division INTEGER, regular_season VARCHAR)
SELECT date FROM table_name_35 WHERE final_score = "7-23"
What game had the date was it with the final score of 7-23
CREATE TABLE table_name_35 (date VARCHAR, final_score VARCHAR)
SELECT election FROM table_286271_1 WHERE _percentage_of_popular_vote = "4.48%"
Name the election for the percent of popular vote being 4.48%
CREATE TABLE table_286271_1 (election VARCHAR, _percentage_of_popular_vote VARCHAR)
SELECT SUM(decile) FROM table_name_44 WHERE authority = "state" AND name = "pokuru school" AND roll < 109
What is the total amount of decile with the authority of state around the Pokuru School and a roll smaller than 109?
CREATE TABLE table_name_44 (decile INTEGER, roll VARCHAR, authority VARCHAR, name VARCHAR)
SELECT college_junior_club_team__league_ FROM table_name_28 WHERE player = "jeff staples"
Jeff Staples player for which College, Junior or Club league?
CREATE TABLE table_name_28 (college_junior_club_team__league_ VARCHAR, player VARCHAR)
SELECT date FROM table_name_35 WHERE opponents = "police" AND venue = "selayang municipal council stadium"
Opponents of police, and a Venue of selayang municipal council stadium had what date?
CREATE TABLE table_name_35 (date VARCHAR, opponents VARCHAR, venue VARCHAR)
SELECT opponent FROM table_name_52 WHERE record = "55-14"
Who was the opponent when the record was 55-14?
CREATE TABLE table_name_52 (opponent VARCHAR, record VARCHAR)
SELECT champion FROM table_name_65 WHERE year = 2008
What is the Champion with a Year that is 2008?
CREATE TABLE table_name_65 (champion VARCHAR, year VARCHAR)
SELECT MAX(population___2010__) FROM table_name_22 WHERE territory = "puerto rico"
What was the population of Puerto Rico in 2010?
CREATE TABLE table_name_22 (population___2010__ INTEGER, territory VARCHAR)
SELECT AVG(gold) FROM table_name_99 WHERE rank = "15" AND total < 2
Which Gold has a Rank of 15, and a Total smaller than 2?
CREATE TABLE table_name_99 (gold INTEGER, rank VARCHAR, total VARCHAR)
SELECT MIN(week) FROM table_name_70 WHERE date = "september 19, 1965" AND attendance < 46 OFFSET 941
What is the lowest week that has September 19, 1965 as the date, with an attendance less than 46,941?
CREATE TABLE table_name_70 (week INTEGER, date VARCHAR, attendance VARCHAR)
SELECT record FROM table_name_76 WHERE score = "7-10"
What was the record at the game that had a score of 7-10?
CREATE TABLE table_name_76 (record VARCHAR, score VARCHAR)
SELECT nation FROM table_name_77 WHERE rank > 9
Name the nation with rank more than 9
CREATE TABLE table_name_77 (nation VARCHAR, rank INTEGER)
SELECT player FROM table_name_88 WHERE team = "east perth"
Tell me the player for east perth
CREATE TABLE table_name_88 (player VARCHAR, team VARCHAR)
SELECT AVG(attendance) FROM table_name_97 WHERE loss = "de la rosa (8–8)"
Loss of de la rosa (8–8) has what average attendance?
CREATE TABLE table_name_97 (attendance INTEGER, loss VARCHAR)
SELECT district FROM table_2668416_7 WHERE party = "Federalist" AND candidates = "William Craik (F) 51.0% Benjamin Edwards 49.0%"
What is the district for the party federalist and the candidates are william craik (f) 51.0% benjamin edwards 49.0%?
CREATE TABLE table_2668416_7 (district VARCHAR, party VARCHAR, candidates VARCHAR)