answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT AVG(crowd) FROM table_name_8 WHERE home_team = "hawthorn"
What is the average crowd size for games with hawthorn as the home side?
CREATE TABLE table_name_8 (crowd INTEGER, home_team VARCHAR)
SELECT result FROM table_name_73 WHERE opponent = "everton"
What is the result against everton?
CREATE TABLE table_name_73 (result VARCHAR, opponent VARCHAR)
SELECT rank FROM table_171666_1 WHERE area__sq_mi_ = 456800
What is the rank of the division with an area of 456800 sq mi?
CREATE TABLE table_171666_1 (rank VARCHAR, area__sq_mi_ VARCHAR)
SELECT COUNT(round) FROM table_name_75 WHERE time = "n/a" AND location = "canton, ohio, usa"
What is the total number of Round(s), when Time is "n/a", and when Location is "Canton, Ohio, USA"?
CREATE TABLE table_name_75 (round VARCHAR, time VARCHAR, location VARCHAR)
SELECT name FROM table_name_96 WHERE laid_down = "july 1823" AND built_by_hm_dockyard = "portsmouth"
What is the name that has July 1823 as the Laid down, and portsmouth as the built by hm dockyard?
CREATE TABLE table_name_96 (name VARCHAR, laid_down VARCHAR, built_by_hm_dockyard VARCHAR)
SELECT COUNT(preston_north_end) FROM table_name_90 WHERE blackpool < 0
How much Preston North End has a Blackpool smaller than 0?
CREATE TABLE table_name_90 (preston_north_end VARCHAR, blackpool INTEGER)
SELECT TYPE, COUNT(*) FROM store GROUP BY TYPE
Find all types of store and number of them.
CREATE TABLE store (TYPE VARCHAR)
SELECT T1.Title, T2.Publication_Date FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID
Show the title and publication dates of books.
CREATE TABLE book (Title VARCHAR, Book_ID VARCHAR); CREATE TABLE publication (Publication_Date VARCHAR, Book_ID VARCHAR)
SELECT Publisher FROM publication WHERE Price > 10000000 INTERSECT SELECT Publisher FROM publication WHERE Price < 5000000
Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000.
CREATE TABLE publication (Publisher VARCHAR, Price INTEGER)
SELECT marriage FROM table_name_67 WHERE death = "29 december 1829"
What is the marriage date for the Habsburg-Lorraine house member who died 29 December 1829?
CREATE TABLE table_name_67 (marriage VARCHAR, death VARCHAR)
SELECT county FROM table_20453681_1 WHERE obama_percentage = "37.1%"
Where did Obama get 37.1%?
CREATE TABLE table_20453681_1 (county VARCHAR, obama_percentage VARCHAR)
SELECT tournament FROM table_name_55 WHERE date = "july 6, 1987"
What was the tournament that was on july 6, 1987?
CREATE TABLE table_name_55 (tournament VARCHAR, date VARCHAR)
SELECT name FROM table_name_16 WHERE rank > 48 AND last = 2005
Who had a rank more than 48, and a last in 2005?
CREATE TABLE table_name_16 (name VARCHAR, rank VARCHAR, last VARCHAR)
SELECT place FROM table_name_63 WHERE score > 68 AND player = "david ogrin"
Which Place has a Score larger than 68, and a Player of david ogrin?
CREATE TABLE table_name_63 (place VARCHAR, score VARCHAR, player VARCHAR)
SELECT MIN(steals) FROM table_23346303_5 WHERE player = "Jasmine Wynne"
If the player is Jasmine Wynne, what is the minimum number of steals?
CREATE TABLE table_23346303_5 (steals INTEGER, player VARCHAR)
SELECT MIN(wins) FROM table_name_11 WHERE year < 1999 AND draws > 1 AND points > 17
What is the lowest wins that has a year prior to 1999, with draws greater than 1, and points greater than 17?
CREATE TABLE table_name_11 (wins INTEGER, points VARCHAR, year VARCHAR, draws VARCHAR)
SELECT previous_club FROM table_27998152_1 WHERE name = "Ben Williams"
for the ben williams name what was the previous club
CREATE TABLE table_27998152_1 (previous_club VARCHAR, name VARCHAR)
SELECT bello FROM table_name_35 WHERE liscumb = "27" AND libweshya = "6539"
What Bello has a 27 Liscumb and 6539 Libweshya?
CREATE TABLE table_name_35 (bello VARCHAR, liscumb VARCHAR, libweshya VARCHAR)
SELECT record FROM table_name_23 WHERE high_rebounds = "marc gasol (8)"
what is the record when marc gasol (8) had the high rebounds?
CREATE TABLE table_name_23 (record VARCHAR, high_rebounds VARCHAR)
SELECT COUNT(1961) FROM table_name_47 WHERE macedonian_population_in_vojvodina = "plandište" AND 1981 > 1027
What is the total 1961 number of the plandište Macedonian population with a 1981 value greater than 1027?
CREATE TABLE table_name_47 (macedonian_population_in_vojvodina VARCHAR)
SELECT loss FROM table_name_57 WHERE date = "august 21"
What loss occurred on August 21?
CREATE TABLE table_name_57 (loss VARCHAR, date VARCHAR)
SELECT division FROM table_name_83 WHERE team = "traktor tashkent" AND season = "2005"
What division is Traktor Tashkent in 2005?
CREATE TABLE table_name_83 (division VARCHAR, team VARCHAR, season VARCHAR)
SELECT competition FROM table_name_72 WHERE date = "january 11, 1996" AND venue = "san diego , united states"
What is Competition, when Date is "January 11, 1996", when Venue is "San Diego , United States"?
CREATE TABLE table_name_72 (competition VARCHAR, date VARCHAR, venue VARCHAR)
SELECT MAX(position) FROM table_18597302_1 WHERE team = "Atl. Colegiales"
What was the position of the Atl. Colegiales team?
CREATE TABLE table_18597302_1 (position INTEGER, team VARCHAR)
SELECT COUNT(*), address FROM member GROUP BY address
Find the number of members living in each address.
CREATE TABLE member (address VARCHAR)
SELECT d_45 FROM table_name_40 WHERE d_44 = "d 53"
Name the D 45 which has D 44 of d 53
CREATE TABLE table_name_40 (d_45 VARCHAR, d_44 VARCHAR)
SELECT AVG(pos) FROM table_name_91 WHERE car__number < 18 AND driver = "mike skinner"
Which Pos has a Car # smaller than 18, and a Driver of mike skinner?
CREATE TABLE table_name_91 (pos INTEGER, car__number VARCHAR, driver VARCHAR)
SELECT record FROM table_name_9 WHERE attendance = "22,713"
What was the record when the attendance was 22,713?
CREATE TABLE table_name_9 (record VARCHAR, attendance VARCHAR)
SELECT place_of_issue FROM table_15635768_1 WHERE ecosystem = "Kelp Forest"
Which location has the ecosystem of kelp forest?
CREATE TABLE table_15635768_1 (place_of_issue VARCHAR, ecosystem VARCHAR)
SELECT new_wnba_team FROM table_name_52 WHERE pick > 7
What was the new WNBA team of the player selected with a pick over 7?
CREATE TABLE table_name_52 (new_wnba_team VARCHAR, pick INTEGER)
SELECT position FROM table_name_35 WHERE player = "patrick macdonald"
Which Position has a Player of patrick macdonald?
CREATE TABLE table_name_35 (position VARCHAR, player VARCHAR)
SELECT manner_of_departure FROM table_name_92 WHERE outgoing_manager = "davide ballardini"
What was the manner of departure for the outgoing manager, davide ballardini?
CREATE TABLE table_name_92 (manner_of_departure VARCHAR, outgoing_manager VARCHAR)
SELECT name_of_award FROM table_24446718_3 WHERE language = "Marathi"
Name the name of award for marathi
CREATE TABLE table_24446718_3 (name_of_award VARCHAR, language VARCHAR)
SELECT venue FROM table_1520559_1 WHERE champion = "Lorena Ochoa"
At what venues did Lorena Ochoa win the championship?
CREATE TABLE table_1520559_1 (venue VARCHAR, champion VARCHAR)
SELECT round FROM table_name_31 WHERE event = "ufc 86"
What round did the event UFC 86 take place?
CREATE TABLE table_name_31 (round VARCHAR, event VARCHAR)
SELECT country FROM table_name_77 WHERE catalogue__number = "asw 50248 (724385024825)"
What Country is Catalogue # ASW 50248 (724385024825) from?
CREATE TABLE table_name_77 (country VARCHAR, catalogue__number VARCHAR)
SELECT loss FROM table_name_98 WHERE date = "august 7"
Who recorded the loss on august 7?
CREATE TABLE table_name_98 (loss VARCHAR, date VARCHAR)
SELECT TMS AS number FROM table_1166023_1 WHERE year_built = 1923
What where the tms numbers built in 1923
CREATE TABLE table_1166023_1 (TMS VARCHAR, year_built VARCHAR)
SELECT AVG(bronze) FROM table_name_15 WHERE silver = 2 AND total < 5
Which Bronze has a Silver of 2, and a Total smaller than 5?
CREATE TABLE table_name_15 (bronze INTEGER, silver VARCHAR, total VARCHAR)
SELECT away_team FROM table_name_46 WHERE tie_no = "48"
Which away team that had 48 as a Tie no?
CREATE TABLE table_name_46 (away_team VARCHAR, tie_no VARCHAR)
SELECT grand_finalist FROM table_name_89 WHERE year > 1979 AND margin < 30 AND winners = "essendon"
What grand finalist had a year after 1979, a margin smaller than 30, and winners of essendon?
CREATE TABLE table_name_89 (grand_finalist VARCHAR, winners VARCHAR, year VARCHAR, margin VARCHAR)
SELECT MIN(goals_conceded) FROM table_18018214_2 WHERE points = 58
List the number of goals scored to equal 58.
CREATE TABLE table_18018214_2 (goals_conceded INTEGER, points VARCHAR)
SELECT original_artist FROM table_name_64 WHERE length = "2:38"
What is the Original Artis of the Track with a Length of 2:38?
CREATE TABLE table_name_64 (original_artist VARCHAR, length VARCHAR)
SELECT MAX(production_code) FROM table_2453243_3 WHERE no_in_season = 3
What is the production code for episode 3 in the season?
CREATE TABLE table_2453243_3 (production_code INTEGER, no_in_season VARCHAR)
SELECT COUNT(written_by) FROM table_22570439_1 WHERE directed_by = "Wendey Stanzler"
How many written by have wendey stanzler as the director?
CREATE TABLE table_22570439_1 (written_by VARCHAR, directed_by VARCHAR)
SELECT content FROM table_name_6 WHERE package_option = "sky cinema" AND language = "italian originale"
What is Content, when Package/Option is sky cinema, and when Language is italian originale?
CREATE TABLE table_name_6 (content VARCHAR, package_option VARCHAR, language VARCHAR)
SELECT COUNT(celebrity) FROM table_11642945_1 WHERE original_air_date = "18October2007"
How many celebrities had an 18October2007 Original air Date?
CREATE TABLE table_11642945_1 (celebrity VARCHAR, original_air_date VARCHAR)
SELECT d_46_√ FROM table_name_14 WHERE d_50_√ = "d 50 √"
What is the D 46 √ when the D 50 √ is d 50 √?
CREATE TABLE table_name_14 (d_46_√ VARCHAR, d_50_√ VARCHAR)
SELECT 1987 AS _88 FROM table_14460085_3 WHERE team = "Racing de Córdoba"
How many points in 87/88 for racing de córdoba?
CREATE TABLE table_14460085_3 (team VARCHAR)
SELECT COUNT(innings) FROM table_23316034_16 WHERE average = "45.65"
If the average is 45.65, what is the total number of innings?
CREATE TABLE table_23316034_16 (innings VARCHAR, average VARCHAR)
SELECT team FROM table_2150776_1 WHERE date = "June 16" AND driver = "Jeff Gordon"
Name the team for june 16 jeff gordon
CREATE TABLE table_2150776_1 (team VARCHAR, date VARCHAR, driver VARCHAR)
SELECT COUNT(issues) FROM table_1420954_1 WHERE writer = "Elaine Lee"
elaine lee worked on how many issues
CREATE TABLE table_1420954_1 (issues VARCHAR, writer VARCHAR)
SELECT money_requested__£_ FROM table_name_59 WHERE company_or_product_name = "reestore"
How much money did reestore request ?
CREATE TABLE table_name_59 (money_requested__£_ VARCHAR, company_or_product_name VARCHAR)
SELECT 3 AS ’utr_sequence FROM table_14332822_1 WHERE variant_id = "AD'6A 4"
What is the 3'utr sequence with a variant id of ad'6a 4?
CREATE TABLE table_14332822_1 (variant_id VARCHAR)
SELECT names FROM table_name_98 WHERE class = "glencar"
What is the name of the locomotive with a Glencar class?
CREATE TABLE table_name_98 (names VARCHAR, class VARCHAR)
SELECT away_team AS score FROM table_name_92 WHERE venue = "glenferrie oval"
What was the away teams score at Glenferrie Oval?
CREATE TABLE table_name_92 (away_team VARCHAR, venue VARCHAR)
SELECT COUNT(points) FROM table_13282157_3 WHERE country = "South Korea"
Name the number of points for south korea
CREATE TABLE table_13282157_3 (points VARCHAR, country VARCHAR)
SELECT MAX(clock_rate__mhz_) FROM table_142573_1
Name the maximum clock rate mhz
CREATE TABLE table_142573_1 (clock_rate__mhz_ INTEGER)
SELECT run_1 FROM table_name_89 WHERE athletes = "theo kitt & friedrich kuhn"
What is Run 1, when Athletes is "Theo Kitt & Friedrich Kuhn"?
CREATE TABLE table_name_89 (run_1 VARCHAR, athletes VARCHAR)
SELECT winner FROM table_name_71 WHERE semi_finalists = "£2,000"
Which Winner has Semi-Finalists of £2,000?
CREATE TABLE table_name_71 (winner VARCHAR, semi_finalists VARCHAR)
SELECT total FROM table_name_13 WHERE to_par < 14 AND finish = "t12" AND player = "julius boros"
What is the Total, when To Par is less than 14, when Finish is T12, and when Player is "Julius Boros"?
CREATE TABLE table_name_13 (total VARCHAR, player VARCHAR, to_par VARCHAR, finish VARCHAR)
SELECT T1.name, T1.id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING AVG(T2.bikes_available) > 14 UNION SELECT name, id FROM station WHERE installation_date LIKE "12/%"
What are the names and ids of stations that had more than 14 bikes available on average or were installed in December?
CREATE TABLE station (name VARCHAR, id VARCHAR); CREATE TABLE station (name VARCHAR, id VARCHAR, installation_date VARCHAR); CREATE TABLE status (station_id VARCHAR, bikes_available INTEGER)
SELECT date FROM table_name_2 WHERE home_team = "st kilda"
On which date was St Kilda the home team?
CREATE TABLE table_name_2 (date VARCHAR, home_team VARCHAR)
SELECT opponent FROM table_name_73 WHERE record = "86-62"
What opponent has a record of 86-62?
CREATE TABLE table_name_73 (opponent VARCHAR, record VARCHAR)
SELECT COUNT(total) FROM table_name_2 WHERE silver = 0 AND rank = 8 AND gold > 1
What's the total of rank 8 when Silver medals are 0 and gold is more than 1?
CREATE TABLE table_name_2 (total VARCHAR, gold VARCHAR, silver VARCHAR, rank 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 conference FROM table_14609295_4 WHERE postseason = "CBI Champions"
What was the Ram's conference record when they were the CBI champions?
CREATE TABLE table_14609295_4 (conference VARCHAR, postseason VARCHAR)
SELECT country FROM table_name_58 WHERE score = 68 - 70 = 138
WHAT COUNTRY HAS A SCORE OF 68-70=138?
CREATE TABLE table_name_58 (country VARCHAR, score VARCHAR)
SELECT COUNT(tourism_receipts__2011___us) AS $_per_capita_ FROM table_18524_6 WHERE tourism_receipts__2003___as__percentage_of_gdp_ = "13.5"
Name the total number of tourism receipts 2011 where tourism receipts 2003 13.5
CREATE TABLE table_18524_6 (tourism_receipts__2011___us VARCHAR, tourism_receipts__2003___as__percentage_of_gdp_ VARCHAR)
SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = "Metallica"
Hom many albums does the artist "Metallica" have?
CREATE TABLE ARTIST (ArtistId VARCHAR, Name VARCHAR); CREATE TABLE ALBUM (ArtistId VARCHAR)
SELECT score FROM table_name_12 WHERE record = "58–47"
What was the score of the game when the record was 58–47?
CREATE TABLE table_name_12 (score VARCHAR, record VARCHAR)
SELECT opponent FROM table_name_62 WHERE time = "2:05 p.m." AND result = "w 26–20"
What is the Opponent with a time of 2:05 p.m., and the results were w 26–20?
CREATE TABLE table_name_62 (opponent VARCHAR, time VARCHAR, result VARCHAR)
SELECT top_speed FROM table_name_69 WHERE model_name = "d14/4 supreme d14/4 sports & bushman"
Which Top Speed has a Model Name of d14/4 supreme d14/4 sports & bushman?
CREATE TABLE table_name_69 (top_speed VARCHAR, model_name VARCHAR)
SELECT MAX(attendance) FROM table_name_82 WHERE season < 1957 AND venue = "varsity stadium"
Before 1957, what was the largest in Attendance at Varsity Stadium?
CREATE TABLE table_name_82 (attendance INTEGER, season VARCHAR, venue VARCHAR)
SELECT season FROM table_name_54 WHERE date = "30 august 1980"
What season had a date of 30 august 1980
CREATE TABLE table_name_54 (season VARCHAR, date VARCHAR)
SELECT finish FROM table_name_54 WHERE player = "tom weiskopf"
What was Tom Weiskopf's Finish?
CREATE TABLE table_name_54 (finish VARCHAR, player VARCHAR)
SELECT nominating_festival FROM table_name_93 WHERE film = "un cartus de kent si un pachet de cafea"
Name the nominating festival for un cartus de kent si un pachet de cafea
CREATE TABLE table_name_93 (nominating_festival VARCHAR, film VARCHAR)
SELECT rank FROM table_name_95 WHERE silver > 1 AND total > 13
Which Rank has a Silver larger than 1 and a Total larger than 13?
CREATE TABLE table_name_95 (rank VARCHAR, silver VARCHAR, total VARCHAR)
SELECT tonnage FROM table_name_81 WHERE date = "27 september 1941" AND ship = "hmsspringbank"
Name Tonnage on 27 september 1941 and a Ship of hmsspringbank?
CREATE TABLE table_name_81 (tonnage VARCHAR, date VARCHAR, ship VARCHAR)
SELECT drawn FROM table_name_49 WHERE points_for = "416" AND points_against = "533"
What drawn has 416 as the points for and 533 as the points against?
CREATE TABLE table_name_49 (drawn VARCHAR, points_for VARCHAR, points_against VARCHAR)
SELECT city_of_license FROM table_name_80 WHERE frequency > 1380
What is City of License, when Frequency is greater than 1380?
CREATE TABLE table_name_80 (city_of_license VARCHAR, frequency INTEGER)
SELECT MIN(points) FROM table_24108789_6 WHERE _number = 6
Name the least points for number 6
CREATE TABLE table_24108789_6 (points INTEGER, _number VARCHAR)
SELECT location_attendance FROM table_23211041_10 WHERE team = "Utah"
Name the location attendance for utah
CREATE TABLE table_23211041_10 (location_attendance VARCHAR, team VARCHAR)
SELECT opponent FROM table_name_42 WHERE year = 1999 AND partner = "choong tan fook"
Who was Choong Tan Fook's opponent in 1999?
CREATE TABLE table_name_42 (opponent VARCHAR, year VARCHAR, partner VARCHAR)
SELECT COUNT(week_2) FROM table_28946565_2 WHERE week_7 = 40 + 40 = 80
How many week 2 scores have a week 7 score of 40 + 40 = 80?
CREATE TABLE table_28946565_2 (week_2 VARCHAR, week_7 VARCHAR)
SELECT title FROM table_name_22 WHERE others = "amstrad cpc" AND genre = "arcade"
Which Title has Others of amstrad cpc, and a Genre of arcade?
CREATE TABLE table_name_22 (title VARCHAR, others VARCHAR, genre VARCHAR)
SELECT SUM(drawn) FROM table_name_94 WHERE goals = "274-357"
What is the sum of draws with 274-357 goals?
CREATE TABLE table_name_94 (drawn INTEGER, goals VARCHAR)
SELECT date FROM table_name_38 WHERE score = "2-1"
On what date was the score 2-1?
CREATE TABLE table_name_38 (date VARCHAR, score VARCHAR)
SELECT circuit FROM table_name_46 WHERE date = "september 20"
What was the circuit had a race on September 20.
CREATE TABLE table_name_46 (circuit VARCHAR, date VARCHAR)
SELECT bowler FROM table_22962745_35 WHERE batsmen = "Dwaraka Ravi Teja RP Singh Pragyan Ojha"
Who was the bowler when the batsmen was dwaraka ravi teja rp singh pragyan ojha?
CREATE TABLE table_22962745_35 (bowler VARCHAR, batsmen VARCHAR)
SELECT isbn_uk FROM table_name_38 WHERE author = "dave martin" AND isbn_us = "n/a"
What is ISBN UK, when Author is "Dave Martin", and when ISBN US is "N/A"?
CREATE TABLE table_name_38 (isbn_uk VARCHAR, author VARCHAR, isbn_us VARCHAR)
SELECT MIN(kerry__number) FROM table_13606924_1 WHERE bush__percentage = "78.40%"
what is the minimum kerry # with bush % being 78.40%
CREATE TABLE table_13606924_1 (kerry__number INTEGER, bush__percentage VARCHAR)
SELECT last_final_won FROM table_name_13 WHERE runners_up = 1 AND club = "rijeka"
what is the last final won when runners-up is 1 and club is rijeka?
CREATE TABLE table_name_13 (last_final_won VARCHAR, runners_up VARCHAR, club VARCHAR)
SELECT COUNT(draw) FROM table_name_65 WHERE points = 8 AND place > 8
How many times is the points 8 and the place larger than 8?
CREATE TABLE table_name_65 (draw VARCHAR, points VARCHAR, place VARCHAR)
SELECT line FROM table_1612760_1 WHERE service_pattern = "Fast to Norwood Junction"
Which line offers Fast to Norwood Junction?
CREATE TABLE table_1612760_1 (line VARCHAR, service_pattern VARCHAR)
SELECT induction FROM table_name_93 WHERE years = "1975–1976"
What is the inductioin for 1975–1976?
CREATE TABLE table_name_93 (induction VARCHAR, years VARCHAR)
SELECT time FROM table_name_66 WHERE record = "10-1"
What is the time where the record is 10-1?
CREATE TABLE table_name_66 (time VARCHAR, record VARCHAR)
SELECT period_active FROM table_name_87 WHERE genre = "pop"
What was the active period for the pop genre?
CREATE TABLE table_name_87 (period_active VARCHAR, genre VARCHAR)
SELECT COUNT(host) FROM table_1149495_1 WHERE fourth_place = "Chenoa"
How many people hosted the show in the year when Chenoa ended up in fourth place?
CREATE TABLE table_1149495_1 (host VARCHAR, fourth_place VARCHAR)
SELECT ag FROM table_name_73 WHERE d3 & 4 = "46" AND transmitter = "seaham"
What is the A.G. value associated with D3&4 of 46 and transmitter of Seaham?
CREATE TABLE table_name_73 (ag VARCHAR, transmitter VARCHAR, d3 VARCHAR)