answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT elevated FROM table_name_23 WHERE elector = "matteo orsini rosso"
Which Elevated has an Elector of matteo orsini rosso?
CREATE TABLE table_name_23 (elevated VARCHAR, elector VARCHAR)
SELECT MAX(drawn) FROM table_17357929_1 WHERE goals_for = 72
How many games drawn for the team that had 72 goals for?
CREATE TABLE table_17357929_1 (drawn INTEGER, goals_for VARCHAR)
SELECT MIN(bronze) FROM table_name_75 WHERE silver > 0 AND rank < 4 AND nation = "jamaica" AND total < 22
What is the leowest number of Bronze medals for Jamaica who ranked less than 4 and had more than 0 silver medals and a total of less than 22 medals?
CREATE TABLE table_name_75 (bronze INTEGER, total VARCHAR, nation VARCHAR, silver VARCHAR, rank VARCHAR)
SELECT height FROM table_10966926_2 WHERE weight = 320
What is the height of the person that weighs 320 pounds?
CREATE TABLE table_10966926_2 (height VARCHAR, weight VARCHAR)
SELECT tie_no FROM table_name_52 WHERE home_team = "brighton & hove albion"
WHAT IS NO TIE FROM brighton & hove albion?
CREATE TABLE table_name_52 (tie_no VARCHAR, home_team VARCHAR)
SELECT COUNT(final_score) FROM table_24776075_2 WHERE date = "Sunday, May 12"
How many final score datas are there on Sunday, May 12?
CREATE TABLE table_24776075_2 (final_score VARCHAR, date VARCHAR)
SELECT release_date FROM table_name_5 WHERE location = "us"
What is the US release date?
CREATE TABLE table_name_5 (release_date VARCHAR, location VARCHAR)
SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*) >= 2
Show the names of products that are in at least two events.
CREATE TABLE Products (Product_Name VARCHAR, Product_ID VARCHAR); CREATE TABLE Products_in_Events (Product_ID VARCHAR)
SELECT kinka_developer FROM table_name_70 WHERE kinka_pre_release = "no*"
Who is the developer when the pre-release is no*?
CREATE TABLE table_name_70 (kinka_developer VARCHAR, kinka_pre_release VARCHAR)
SELECT team_chassis FROM table_name_66 WHERE pts < 65
Which Team/Chassis has less than 65 points?
CREATE TABLE table_name_66 (team_chassis VARCHAR, pts INTEGER)
SELECT home FROM table_name_93 WHERE competition = "uefa cup" AND season = "2000-2001" AND round = "second round"
What is the home team of the UEFA cup in the 2000-2001 season with a second round?
CREATE TABLE table_name_93 (home VARCHAR, round VARCHAR, competition VARCHAR, season VARCHAR)
SELECT days_held FROM table_name_33 WHERE current_champion_s_ = "dean ambrose"
Name the days for current champions of dean ambrose
CREATE TABLE table_name_33 (days_held VARCHAR, current_champion_s_ VARCHAR)
SELECT visitor FROM table_name_69 WHERE record = "24–14–2"
Who was the visitor when the record was 24–14–2?
CREATE TABLE table_name_69 (visitor VARCHAR, record VARCHAR)
SELECT injured FROM table_name_16 WHERE country = "venezuela"
What was the injured entry for Venezuela?
CREATE TABLE table_name_16 (injured VARCHAR, country VARCHAR)
SELECT joined_opec FROM table_166346_1 WHERE production___bbl__day_ = "1,213,000 (21st)"
When did the country that produced 1,213,000 (21st) bbl/day join Opec?
CREATE TABLE table_166346_1 (joined_opec VARCHAR, production___bbl__day_ VARCHAR)
SELECT location FROM table_name_25 WHERE goal = "2"
Which location has a Goal of 2?
CREATE TABLE table_name_25 (location VARCHAR, goal VARCHAR)
SELECT college FROM "t" AS able_name_20 WHERE pick__number > 13 AND position = "t"
What college did the T who was pick after 13 go to?
CREATE TABLE t (Id VARCHAR)
SELECT team FROM table_name_52 WHERE rank > 2 AND name = "paolo maldini"
Ranking higher than 2, what Team has Player Paolo Maldini?
CREATE TABLE table_name_52 (team VARCHAR, rank VARCHAR, name VARCHAR)
SELECT date FROM table_18904831_6 WHERE high_rebounds = "Dydek (11)"
When dydek (11) has the highest rebounds what is the date?
CREATE TABLE table_18904831_6 (date VARCHAR, high_rebounds VARCHAR)
SELECT COUNT(original_air_date) FROM table_28859177_3 WHERE directed_by = "Bethany Rooney"
How many original air dates did the episode directed by Bethany rooney have?
CREATE TABLE table_28859177_3 (original_air_date VARCHAR, directed_by VARCHAR)
SELECT outcome FROM table_name_97 WHERE date = "19 september 2012"
What is Outcome, when Date is "19 September 2012"?
CREATE TABLE table_name_97 (outcome VARCHAR, date VARCHAR)
SELECT MAX(money___) AS £__ FROM table_name_44 WHERE country = "south africa"
What shows for money (£) when South Africa is the country?
CREATE TABLE table_name_44 (money___ INTEGER, country VARCHAR)
SELECT 2004 FROM table_name_4 WHERE 2010 = "sf"
What is the 2004 value with a sf in 2010?
CREATE TABLE table_name_4 (Id VARCHAR)
SELECT nationality FROM table_name_43 WHERE school_club_team = "louisville"
What is the nationality of the School/Club team of Louisville?
CREATE TABLE table_name_43 (nationality VARCHAR, school_club_team VARCHAR)
SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking'
Find the ids of the students who participate in Canoeing and Kayaking.
CREATE TABLE activity (actid VARCHAR, activity_name VARCHAR); CREATE TABLE participates_in (stuid VARCHAR)
SELECT MIN(first_elected) FROM table_1342315_12 WHERE incumbent = "Leo E. Allen"
When was incumbent Leo E. Allen first elected?
CREATE TABLE table_1342315_12 (first_elected INTEGER, incumbent VARCHAR)
SELECT AVG(first_downs) FROM table_name_82 WHERE date = "december 4"
What is the average First Downs for december 4?
CREATE TABLE table_name_82 (first_downs INTEGER, date VARCHAR)
SELECT date FROM table_name_33 WHERE result = "1-0"
On what date was the Result 1-0?
CREATE TABLE table_name_33 (date VARCHAR, result VARCHAR)
SELECT COUNT(winning_driver) FROM table_22379931_2 WHERE circuit = "Suzuka circuit" AND pole_position = "Loïc Duval"
How many drivers drove on Suzuka Circuit where Loïc Duval took pole position?
CREATE TABLE table_22379931_2 (winning_driver VARCHAR, circuit VARCHAR, pole_position VARCHAR)
SELECT name FROM table_name_3 WHERE stage = "ss11"
What is the Name of the SS11 Stage?
CREATE TABLE table_name_3 (name VARCHAR, stage VARCHAR)
SELECT nationality FROM table_name_97 WHERE pick = 100
What country is Pick 100?
CREATE TABLE table_name_97 (nationality VARCHAR, pick VARCHAR)
SELECT digital_channel FROM table_1404984_1 WHERE network = "JCTV"
What is JCTV's digital channel?
CREATE TABLE table_1404984_1 (digital_channel VARCHAR, network VARCHAR)
SELECT race FROM table_name_47 WHERE event = "goodwood trophy" AND driver = "reg parnell"
At which race did reg parnell win the goodwood trophy?
CREATE TABLE table_name_47 (race VARCHAR, event VARCHAR, driver VARCHAR)
SELECT COUNT(gold) FROM table_name_38 WHERE bronze > 1 AND silver > 2
How much Gold has a Bronze larger than 1, and a Silver larger than 2?
CREATE TABLE table_name_38 (gold VARCHAR, bronze VARCHAR, silver VARCHAR)
SELECT 2006 FROM table_name_52 WHERE 2002 = "grand slam tournaments"
What shows for 2006 when 2002 is Grand Slam Tournaments?
CREATE TABLE table_name_52 (Id VARCHAR)
SELECT chassis FROM table_name_73 WHERE engine = "cosworth" AND drivers = "gordon johncock"
What chassis did Gordon Johncock use with his cosworth engine?
CREATE TABLE table_name_73 (chassis VARCHAR, engine VARCHAR, drivers VARCHAR)
SELECT SUM(grid) FROM table_name_91 WHERE rider = "ryuichi kiyonari"
How many Grid has a Rider of ryuichi kiyonari?
CREATE TABLE table_name_91 (grid INTEGER, rider VARCHAR)
SELECT series FROM table_name_39 WHERE editor = "dargaud" AND albums = "27"
Which series with a total of 27 albums did Dargaud edit?
CREATE TABLE table_name_39 (series VARCHAR, editor VARCHAR, albums VARCHAR)
SELECT season FROM table_name_6 WHERE country = "china" AND team = "dalian shide" AND apps > 8 AND goals = 2
What is Season, when Country is China, when Team is Dalian Shide, when Apps is greater than 8, and when Goals is 2?
CREATE TABLE table_name_6 (season VARCHAR, goals VARCHAR, apps VARCHAR, country VARCHAR, team VARCHAR)
SELECT COUNT(_number) FROM table_22904752_1 WHERE us_viewers__million_ = "17.44"
What is the # when u.s. viewers (million) is 17.44?
CREATE TABLE table_22904752_1 (_number VARCHAR, us_viewers__million_ VARCHAR)
SELECT COUNT(elevation__m_) FROM table_name_18 WHERE prominence__m_ > 2 OFFSET 876
How much Elevation (m) has a Prominence (m) larger than 2,876?
CREATE TABLE table_name_18 (elevation__m_ VARCHAR, prominence__m_ INTEGER)
SELECT results FROM table_name_94 WHERE record = "28-12"
What Results has the Record of 28-12?
CREATE TABLE table_name_94 (results VARCHAR, record VARCHAR)
SELECT COUNT(number) FROM table_name_99 WHERE name = "jamar jackson"
for the name of jamar jackson what is the total of Number?
CREATE TABLE table_name_99 (number VARCHAR, name VARCHAR)
SELECT club FROM table_name_88 WHERE head_coach = "manuel fernandes"
What club does Manuel Fernandes coach?
CREATE TABLE table_name_88 (club VARCHAR, head_coach VARCHAR)
SELECT player FROM table_name_4 WHERE position = "centre"
The Position of Centre is what Player?
CREATE TABLE table_name_4 (player VARCHAR, position VARCHAR)
SELECT purpose FROM table_name_37 WHERE elevation_ + _height = "0 + metres (ft)" AND location = "bikini, namu (charlie)" AND yield = "220 kt"
Which Purpose has an Elevation + Height of 0 + metres (ft), a Location of bikini, namu (charlie), and a Yield of 220 kt?
CREATE TABLE table_name_37 (purpose VARCHAR, yield VARCHAR, location VARCHAR, elevation_ VARCHAR, _height VARCHAR)
SELECT location FROM table_name_60 WHERE listed = "1977-09-15"
What location was listed on 1977-09-15?
CREATE TABLE table_name_60 (location VARCHAR, listed VARCHAR)
SELECT position FROM table_15463188_1 WHERE name = "judy-ann ramirez"
Name the position for judy-ann ramirez
CREATE TABLE table_15463188_1 (position VARCHAR, name VARCHAR)
SELECT location FROM table_name_68 WHERE position_in_2012_13 = "13th, third division"
When the position in 2012-13 is 13th, third division what is the location?
CREATE TABLE table_name_68 (location VARCHAR, position_in_2012_13 VARCHAR)
SELECT naturalisation_by_marriage FROM table_11214212_1 WHERE numer_of_jamaicans_granted_british_citizenship = 3165
what's the naturalisation by marriage with numer of jamaicans granted british citizenship being 3165
CREATE TABLE table_11214212_1 (naturalisation_by_marriage VARCHAR, numer_of_jamaicans_granted_british_citizenship VARCHAR)
SELECT MAX(_number) FROM table_2985714_2
What is the maximum overall number?
CREATE TABLE table_2985714_2 (_number INTEGER)
SELECT video_coding FROM table_name_69 WHERE format_name = "dvcam"
What type of video coding has a format name of dvcam?
CREATE TABLE table_name_69 (video_coding VARCHAR, format_name VARCHAR)
SELECT year FROM table_name_56 WHERE league = "usl a-league" AND playoffs = "conference finals"
when did the usl a-league have conference finals?
CREATE TABLE table_name_56 (year VARCHAR, league VARCHAR, playoffs VARCHAR)
SELECT COUNT(height) FROM table_25360865_1 WHERE _number = 32
Name the total number of height for number 32
CREATE TABLE table_25360865_1 (height VARCHAR, _number VARCHAR)
SELECT visitor FROM table_name_85 WHERE date = "february 15"
What team was visiting on February 15?
CREATE TABLE table_name_85 (visitor VARCHAR, date VARCHAR)
SELECT AVG(students) FROM table_name_25 WHERE pupil_teacher_ratio = 25.1
What is the average number of students for schools with a pupil to teacher ratio of 25.1?
CREATE TABLE table_name_25 (students INTEGER, pupil_teacher_ratio VARCHAR)
SELECT date FROM table_name_94 WHERE tournament = "outback steakhouse pro-am"
What is the date of the Outback Steakhouse Pro-Am Tournament?
CREATE TABLE table_name_94 (date VARCHAR, tournament VARCHAR)
SELECT SUM(1992) FROM table_name_14 WHERE 1999 > 1 AND 2008 < 2 AND 2003 < 2
what is the listing for 1992 when 1999 is more than 1, 2008 is less than 2 and 2003 is less than 2?
CREATE TABLE table_name_14 (Id VARCHAR)
SELECT result FROM table_name_66 WHERE competition = "1998 fifa world cup qualification" AND venue = "bangkok"
What's the Result of the Competition of 1998 FIFA World Cup Qualification with the Venue of Bangkok?
CREATE TABLE table_name_66 (result VARCHAR, competition VARCHAR, venue VARCHAR)
SELECT pos FROM table_name_66 WHERE from_club = "chelsea" AND date = "30 july 2008"
What is Pos., when From Club is "Chelsea", and when Date is "30 July 2008"?
CREATE TABLE table_name_66 (pos VARCHAR, from_club VARCHAR, date VARCHAR)
SELECT date FROM table_name_10 WHERE road_team = "st. louis" AND game = "game 5"
What is the Date of Game 5 with Road Team St. Louis?
CREATE TABLE table_name_10 (date VARCHAR, road_team VARCHAR, game VARCHAR)
SELECT finish FROM table_name_32 WHERE race = "kentucky derby"
What was the finish of the Kentucky Derby?
CREATE TABLE table_name_32 (finish VARCHAR, race VARCHAR)
SELECT COUNT(round) FROM table_name_73 WHERE pick__number > 10 AND college = "appalachian state"
How many rounds had a pick number of more than 10 and Appalachian State as a college?
CREATE TABLE table_name_73 (round VARCHAR, pick__number VARCHAR, college VARCHAR)
SELECT team AS captain FROM table_26593762_2 WHERE manager = "Neil Warnock"
Who is the captain of Neil Warnock's team?
CREATE TABLE table_26593762_2 (team VARCHAR, manager VARCHAR)
SELECT chilean FROM table_name_78 WHERE castilian = "ordenador"
What Chilean word is used for the Castilian word ordenador?
CREATE TABLE table_name_78 (chilean VARCHAR, castilian VARCHAR)
SELECT COUNT(crowd) FROM table_name_72 WHERE away_team = "hawthorn"
What is the listed crowd when hawthorn is away?
CREATE TABLE table_name_72 (crowd VARCHAR, away_team VARCHAR)
SELECT location FROM table_name_95 WHERE rank_final = "1st" AND score_qualifying < 28.975
What was the location of the competition with a Rank-Final of 1st and a Score-Qualifying under 28.975?
CREATE TABLE table_name_95 (location VARCHAR, rank_final VARCHAR, score_qualifying VARCHAR)
SELECT T1.Name, SUM(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name
Show the names of singers and the total sales of their songs.
CREATE TABLE singer (Name VARCHAR, Singer_ID VARCHAR); CREATE TABLE song (Sales INTEGER, Singer_ID VARCHAR)
SELECT japanese_title FROM table_18539834_2 WHERE tv_station = "TV Asahi"
What are the japanese title(s) for tv asahi?
CREATE TABLE table_18539834_2 (japanese_title VARCHAR, tv_station VARCHAR)
SELECT COUNT(*) FROM pilot
How many pilots are there?
CREATE TABLE pilot (Id VARCHAR)
SELECT AVG(rank) FROM table_name_26 WHERE candidate_name = "antun salman"
What is the average rank for antun salman?
CREATE TABLE table_name_26 (rank INTEGER, candidate_name VARCHAR)
SELECT COUNT(lecturers) FROM table_name_71 WHERE assistant_professors > 8 AND professors > 14 AND associate_professors < 35 AND total > 81
How may lecturers are there in the case when there are more than 8 assistant professors, fewer than 35 associate professors, more than 14 professors and total of more than 81?
CREATE TABLE table_name_71 (lecturers VARCHAR, total VARCHAR, associate_professors VARCHAR, assistant_professors VARCHAR, professors VARCHAR)
SELECT type FROM table_11934032_1 WHERE location = "St Ives, Cambridgeshire"
what are all the type where location is st ives, cambridgeshire
CREATE TABLE table_11934032_1 (type VARCHAR, location VARCHAR)
SELECT MIN(no_in_season) FROM table_18481791_3 WHERE directed_by = "Bryan Spicer"
How many seasons were directed by Bryan Spicer?
CREATE TABLE table_18481791_3 (no_in_season INTEGER, directed_by VARCHAR)
SELECT original_title FROM table_20061872_1 WHERE film_title_used_in_nomination = "The New Land"
What's the original title of The New Land?
CREATE TABLE table_20061872_1 (original_title VARCHAR, film_title_used_in_nomination VARCHAR)
SELECT year FROM table_name_73 WHERE actor = "richard farnsworth"
What year did actor Richard Farnsworth get nominated for an award?
CREATE TABLE table_name_73 (year VARCHAR, actor VARCHAR)
SELECT pole_position FROM table_name_93 WHERE round = 1
What is the pole position of the grand prix with 1 round?
CREATE TABLE table_name_93 (pole_position VARCHAR, round VARCHAR)
SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1
Show the transaction type code that occurs the most frequently.
CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR)
SELECT type FROM table_name_97 WHERE newspaper_magazine = "telecoms & it magazine"
What is Type, when Newspaper/Magazine is Telecoms & It Magazine?
CREATE TABLE table_name_97 (type VARCHAR, newspaper_magazine VARCHAR)
SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id
Find the last name of the students who currently live in the state of North Carolina but have not registered in any degree program.
CREATE TABLE Addresses (address_id VARCHAR, state_province_county VARCHAR); CREATE TABLE Students (last_name VARCHAR, current_address_id VARCHAR); CREATE TABLE Students (last_name VARCHAR, student_id VARCHAR); CREATE TABLE Student_Enrolment (student_id VARCHAR)
SELECT MIN(wins) FROM table_name_49 WHERE year < 1964 AND points > 7
What is the least amount of wins earlier than 1964 with more than 7 points?
CREATE TABLE table_name_49 (wins INTEGER, year VARCHAR, points VARCHAR)
SELECT mens_doubles FROM table_13553701_1 WHERE womens_singles = "Wang Shixian"
Who are the mens doubles and womens singles is wang shixian?
CREATE TABLE table_13553701_1 (mens_doubles VARCHAR, womens_singles VARCHAR)
SELECT lost FROM table_name_58 WHERE points = "36" AND points_against = "489"
when points were 36 and points against 489 what is the lost?
CREATE TABLE table_name_58 (lost VARCHAR, points VARCHAR, points_against VARCHAR)
SELECT label FROM table_name_24 WHERE region = "germany"
What label does Germany have?
CREATE TABLE table_name_24 (label VARCHAR, region VARCHAR)
SELECT second FROM table_name_18 WHERE sixth = "victoria"
What is SECOND, when SIXTH is Victoria?
CREATE TABLE table_name_18 (second VARCHAR, sixth VARCHAR)
SELECT nationality FROM table_name_33 WHERE player = "claude periard"
What is the nationality when Claude Periard is the player?
CREATE TABLE table_name_33 (nationality VARCHAR, player VARCHAR)
SELECT candidates FROM table_1434788_5 WHERE incumbent = "John Beatty"
Who were the candidates in the election where John Beatty was the incumbent?
CREATE TABLE table_1434788_5 (candidates VARCHAR, incumbent VARCHAR)
SELECT SUM(gold) FROM table_name_26 WHERE total = 14 AND bronze > 6
How many gold(s) for teams with a total of 14, and over 6 bronze medals?
CREATE TABLE table_name_26 (gold INTEGER, total VARCHAR, bronze VARCHAR)
SELECT game FROM table_name_31 WHERE record = "1-2"
Which game number includes a record of 1-2?
CREATE TABLE table_name_31 (game VARCHAR, record VARCHAR)
SELECT democratic_ticket FROM table_name_43 WHERE liberal_ticket = "erastus corning 2nd"
What is the name on the Democratic ticket when the Liberal ticket is erastus corning 2nd?
CREATE TABLE table_name_43 (democratic_ticket VARCHAR, liberal_ticket VARCHAR)
SELECT leading_scorer FROM table_name_66 WHERE home = "grizzlies" AND record = "10–28"
Which leading scorer has a Home of grizzlies, and a Record of 10–28?
CREATE TABLE table_name_66 (leading_scorer VARCHAR, home VARCHAR, record VARCHAR)
SELECT MIN(enrollment) FROM table_1974443_1 WHERE founded = 1880
What is the smallest enrollment for institutions founded in exactly 1880?
CREATE TABLE table_1974443_1 (enrollment INTEGER, founded VARCHAR)
SELECT SUM(against) FROM table_name_97 WHERE played > 22
How many games were played against when the team played more than 22 total?
CREATE TABLE table_name_97 (against INTEGER, played INTEGER)
SELECT MIN(uci_rating) FROM table_name_3 WHERE race_name = "vuelta a ecuador"
What is Vuelta a Ecuador's lowest UCI Rating?
CREATE TABLE table_name_3 (uci_rating INTEGER, race_name VARCHAR)
SELECT college FROM table_name_29 WHERE cfl_team = "calgary stampeders"
Which college did the Calgary Stampeders recruit from?
CREATE TABLE table_name_29 (college VARCHAR, cfl_team VARCHAR)
SELECT COUNT(overall) FROM table_name_30 WHERE player = "angelo craig"
What is the number for overall for angelo craig?
CREATE TABLE table_name_30 (overall VARCHAR, player VARCHAR)
SELECT year FROM table_2333416_2 WHERE position = "78th"
What year did Ken Bouchard finish in 78th place?
CREATE TABLE table_2333416_2 (year VARCHAR, position VARCHAR)
SELECT date FROM table_name_54 WHERE away_team = "carlton"
What date did Carlton play as the away team?
CREATE TABLE table_name_54 (date VARCHAR, away_team VARCHAR)
SELECT nominating_festival FROM table_name_72 WHERE director_s_ = "olga baillif"
Which nominating festival did Olga Baillif enter?
CREATE TABLE table_name_72 (nominating_festival VARCHAR, director_s_ VARCHAR)
SELECT AVG(area__km²_) FROM table_name_10 WHERE density___km²_ = 263
What's the Area with a Density of 263?
CREATE TABLE table_name_10 (area__km²_ INTEGER, density___km²_ VARCHAR)