answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse
Find the names of nurses who are on call.
CREATE TABLE on_call (nurse VARCHAR); CREATE TABLE nurse (name VARCHAR, EmployeeID VARCHAR)
SELECT away_team FROM table_name_24 WHERE home_team = "grimsby town"
What team was the away team when the home team was Grimsby Town?
CREATE TABLE table_name_24 (away_team VARCHAR, home_team VARCHAR)
SELECT composer FROM tracks WHERE name = "Fast As a Shark"
Who is the composer of track Fast As a Shark?
CREATE TABLE tracks (composer VARCHAR, name VARCHAR)
SELECT MIN(year_opened) FROM table_name_52 WHERE main_span_feet = "1,640" AND country = "south korea"
What is the oldest year with a main span feet of 1,640 in South Korea?
CREATE TABLE table_name_52 (year_opened INTEGER, main_span_feet VARCHAR, country VARCHAR)
SELECT province_region FROM table_name_73 WHERE iata = "gmp"
Which province has gmp for an IATA?
CREATE TABLE table_name_73 (province_region VARCHAR, iata VARCHAR)
SELECT college FROM table_name_64 WHERE position = "ol" AND pick__number < 32
Which College has a Position of ol, and a Pick # smaller than 32?
CREATE TABLE table_name_64 (college VARCHAR, position VARCHAR, pick__number VARCHAR)
SELECT SUM(year) FROM table_name_67 WHERE award = "tony award" AND nominee = "bernadette peters"
What was the year Bernadette Peters was a nominee for the Tony award?
CREATE TABLE table_name_67 (year INTEGER, award VARCHAR, nominee VARCHAR)
SELECT SUM(year) FROM table_name_42 WHERE _aramac_ = 832 AND population__total_ < 3 OFFSET 762
What Year has an (Aramac) of 832 and a Population (Total) less than 3,762?
CREATE TABLE table_name_42 (year INTEGER, _aramac_ VARCHAR, population__total_ VARCHAR)
SELECT director FROM table_20404716_1 WHERE result = "Not Nominated" AND spanish_title = "Play"
Who was the director of the film that was not nominated and had the Spanish title of play?
CREATE TABLE table_20404716_1 (director VARCHAR, result VARCHAR, spanish_title VARCHAR)
SELECT country FROM table_name_70 WHERE place = "t7" AND score = 69 - 68 - 72 = 209
What is the country with a t7 place and a 69-68-72=209 score?
CREATE TABLE table_name_70 (country VARCHAR, place VARCHAR, score VARCHAR)
SELECT catalog_number FROM table_name_30 WHERE a_side = "venus demilo"
What is the catalog number of Venus Demilo's A-side?
CREATE TABLE table_name_30 (catalog_number VARCHAR, a_side VARCHAR)
SELECT reason_for_change FROM table_2417395_4 WHERE date_successor_seated = "December 13, 1880"
What was the reason for change to the successor that was seated on December 13, 1880?
CREATE TABLE table_2417395_4 (reason_for_change VARCHAR, date_successor_seated VARCHAR)
SELECT language FROM table_name_83 WHERE television_service = "sky tg 24 active"
What is the Language that has sky tg 24 active as the Television service?
CREATE TABLE table_name_83 (language VARCHAR, television_service VARCHAR)
SELECT score FROM table_name_63 WHERE game < 61 AND team = "new york"
What is the score of New York team before game 61?
CREATE TABLE table_name_63 (score VARCHAR, game VARCHAR, team VARCHAR)
SELECT AVG(silver) FROM table_name_87 WHERE bronze < 15 AND nation = "montenegro" AND total > 11
What is the average amount of silver medals Montenegro, who has less than 15 bronze and more than 11 total medals, has?
CREATE TABLE table_name_87 (silver INTEGER, total VARCHAR, bronze VARCHAR, nation VARCHAR)
SELECT MAX(pts) FROM table_name_85 WHERE engine = "ferrari v12" AND chassis = "ferrari 1512" AND year > 1965
How many points for the ferrari v12 engine and ferrari 1512 chassis, after 1965?
CREATE TABLE table_name_85 (pts INTEGER, year VARCHAR, engine VARCHAR, chassis VARCHAR)
SELECT film_title_used_in_nomination FROM table_17156199_1 WHERE original_title = "শ্যামল ছায়া (Shyamol Chhaya)"
What was the nominated film title of শ্যামল ছায়া (shyamol chhaya)?
CREATE TABLE table_17156199_1 (film_title_used_in_nomination VARCHAR, original_title VARCHAR)
SELECT MAX(played) FROM table_name_94 WHERE points = 5 AND drawn < 1
Which Played is the highest one that has Points of 5, and a Drawn smaller than 1?
CREATE TABLE table_name_94 (played INTEGER, points VARCHAR, drawn VARCHAR)
SELECT pct_route_available FROM table_2279413_1 WHERE type_of_protection = "short patent"
For short patent type of protections, what type of PCT route is available?
CREATE TABLE table_2279413_1 (pct_route_available VARCHAR, type_of_protection VARCHAR)
SELECT position FROM table_name_59 WHERE club_province = "meralomas" AND player = "david biddle"
Which position has a club of Meralomas and a player named David Biddle?
CREATE TABLE table_name_59 (position VARCHAR, club_province VARCHAR, player VARCHAR)
SELECT conv FROM table_name_37 WHERE player = "dick hyland"
What was Dick Hyland's conv?
CREATE TABLE table_name_37 (conv VARCHAR, player VARCHAR)
SELECT MIN(wins) FROM table_name_59 WHERE against > 1282 AND losses < 14
How many wins for the team with more than 1282 against and fewer than 14 losses?
CREATE TABLE table_name_59 (wins INTEGER, against VARCHAR, losses VARCHAR)
SELECT surface FROM table_16741821_8 WHERE opponent = "George Khrikadze"
WHAT WAS THE SURFACE MADE OF WHEN THE OPPONENT WAS GEORGE KHRIKADZE?
CREATE TABLE table_16741821_8 (surface VARCHAR, opponent VARCHAR)
SELECT MIN(points) FROM table_name_99 WHERE home = "toronto"
What is the lowest amount of points of the game with toronto as the home team?
CREATE TABLE table_name_99 (points INTEGER, home VARCHAR)
SELECT production_company FROM table_name_33 WHERE rank = "nominated" AND film = "badmouth"
What was the production company for the nominated film, Badmouth?
CREATE TABLE table_name_33 (production_company VARCHAR, rank VARCHAR, film VARCHAR)
SELECT SUM(crowd) FROM table_name_30 WHERE venue = "junction oval"
How big was the crowd size, at the Junction Oval venue?
CREATE TABLE table_name_30 (crowd INTEGER, venue VARCHAR)
SELECT last_performance FROM table_name_46 WHERE status = "past replacement"
What is the date of the Last Performance of Billy Elliot with a Cast Status of past replacement?
CREATE TABLE table_name_46 (last_performance VARCHAR, status VARCHAR)
SELECT match_points FROM table_27986200_3 WHERE eliminated_from_competition = "Bordeaux-Bègles"
What were the match points when Bordeaux-Bègles was eliminated from competition?
CREATE TABLE table_27986200_3 (match_points VARCHAR, eliminated_from_competition VARCHAR)
SELECT mm_×_mm FROM table_name_7 WHERE in_×_in = "11 × 17"
Which mm × mm has an in × in of 11 × 17?
CREATE TABLE table_name_7 (mm_×_mm VARCHAR, in_×_in VARCHAR)
SELECT base_10 FROM table_260938_1 WHERE peletier = "Bi llion"
Name the base 10 for peletier for bi llion
CREATE TABLE table_260938_1 (base_10 VARCHAR, peletier VARCHAR)
SELECT marks FROM table_name_89 WHERE season = "2005"
How many marks did he get in 2005?
CREATE TABLE table_name_89 (marks VARCHAR, season VARCHAR)
SELECT phoneme FROM table_name_78 WHERE example = "/umsʁ/"
Name the phoneme when the example is /umsʁ/
CREATE TABLE table_name_78 (phoneme VARCHAR, example VARCHAR)
SELECT COUNT(*) FROM Has_allergy WHERE Allergy = "Cat"
How many students have cat allergies?
CREATE TABLE Has_allergy (Allergy VARCHAR)
SELECT builder FROM table_name_49 WHERE ship = "zeehond"
The Zeehond was built by whom?
CREATE TABLE table_name_49 (builder VARCHAR, ship VARCHAR)
SELECT venue FROM table_name_91 WHERE home_team = "melbourne"
What was the venue of the Melbourne team?
CREATE TABLE table_name_91 (venue VARCHAR, home_team VARCHAR)
SELECT MIN(goals) FROM table_name_63 WHERE league = "major league soccer" AND season = "2005"
Which Major League Soccer team for the 2005 season has the lowest goals?
CREATE TABLE table_name_63 (goals INTEGER, league VARCHAR, season VARCHAR)
SELECT award FROM table_name_16 WHERE year = "2012"
Which award was given in 2012?
CREATE TABLE table_name_16 (award VARCHAR, year VARCHAR)
SELECT height FROM table_name_84 WHERE rank < 20 AND floors > 9 AND built = 2005 AND name = "the edge (c)"
What is Height, when Rank is less than 20, when Floors is greater than 9, when Built is 2005, and when Name is The Edge (C)?
CREATE TABLE table_name_84 (height VARCHAR, name VARCHAR, built VARCHAR, rank VARCHAR, floors VARCHAR)
SELECT COUNT(writer) FROM table_20345624_2 WHERE original_airdate = "15 July 1967"
Name the number of writers for airdate of 15 july 1967
CREATE TABLE table_20345624_2 (writer VARCHAR, original_airdate VARCHAR)
SELECT MIN(gain) FROM table_name_35 WHERE name = "toben opurum" AND avg_g < 54.1
What is the lowest gain that has toben opurum as the name, with an avg/g less than 54.1?
CREATE TABLE table_name_35 (gain INTEGER, name VARCHAR, avg_g VARCHAR)
SELECT 1973 FROM table_name_31 WHERE 1978 = "75%"
What 1973 has a 1978 of 75%?
CREATE TABLE table_name_31 (Id VARCHAR)
SELECT award FROM table_name_84 WHERE organisation = "lianhe zaobao"
Which award was given to Lianhe Zaobao?
CREATE TABLE table_name_84 (award VARCHAR, organisation VARCHAR)
SELECT visitor FROM table_name_24 WHERE date = "january 27"
Who was the visiting team on January 27?
CREATE TABLE table_name_24 (visitor VARCHAR, date VARCHAR)
SELECT opponent FROM table_name_34 WHERE round = "final"
What opponent has final as the round?
CREATE TABLE table_name_34 (opponent VARCHAR, round VARCHAR)
SELECT COUNT(new_democratic) FROM table_24778847_2 WHERE date_of_polling = "May 11–31, 2010"
How many figures are given for the New Democratic for the polling range May 11–31, 2010?
CREATE TABLE table_24778847_2 (new_democratic VARCHAR, date_of_polling VARCHAR)
SELECT TYPE, COUNT(*) FROM operate_company GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1
What is the most common company type, and how many are there?
CREATE TABLE operate_company (TYPE VARCHAR)
SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details
What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.
CREATE TABLE organisation_Types (organisation_type VARCHAR, organisation_type_description VARCHAR); CREATE TABLE Organisations (organisation_type VARCHAR)
SELECT away_captain FROM table_name_66 WHERE venue = "headingley"
Who is the Away Captain at headingley?
CREATE TABLE table_name_66 (away_captain VARCHAR, venue VARCHAR)
SELECT pick__number FROM table_name_49 WHERE college_junior_club_team = "edmonton oil kings (wchl)" AND position = "defence"
What is the Pick # for the College/junior/club team of edmonton oil kings (wchl), and the position if defence?
CREATE TABLE table_name_49 (pick__number VARCHAR, college_junior_club_team VARCHAR, position VARCHAR)
SELECT city, MAX(lat) FROM station GROUP BY city
For each city, return the highest latitude among its stations.
CREATE TABLE station (city VARCHAR, lat INTEGER)
SELECT team FROM table_name_22 WHERE start = "33"
What team has 33 starts?
CREATE TABLE table_name_22 (team VARCHAR, start VARCHAR)
SELECT location FROM table_name_33 WHERE event = "ramada perth masters"
What's the location of the Ramada Perth Masters event?
CREATE TABLE table_name_33 (location VARCHAR, event VARCHAR)
SELECT pakistanis FROM table_27257896_2 WHERE working_force_of_hk = "32.8%"
If the working force of HK is 32.8%, what are the Pakistanis' %?
CREATE TABLE table_27257896_2 (pakistanis VARCHAR, working_force_of_hk VARCHAR)
SELECT score FROM table_name_96 WHERE opponent_in_the_final = "mehdi tahiri"
Which Score has an Opponent in the final of mehdi tahiri?
CREATE TABLE table_name_96 (score VARCHAR, opponent_in_the_final VARCHAR)
SELECT sr_no FROM table_name_87 WHERE wheel_arrangement = "0-6-0t" AND year_made > 1874 AND year_withdrawn = 1963
Which SR number had a wheel arrangement of 0-6-0t, the year made was more recent than 1874, and the year withdrawn was 1963?
CREATE TABLE table_name_87 (sr_no VARCHAR, year_withdrawn VARCHAR, wheel_arrangement VARCHAR, year_made VARCHAR)
SELECT 2000 AS _population FROM table_name_71 WHERE state_s_ = "ok" AND percent_change__1990_2000_ = "a078 +17.22%"
What is the 2000 population in OK with a 1990-2000 percent change of A078 +17.22%?
CREATE TABLE table_name_71 (state_s_ VARCHAR, percent_change__1990_2000_ VARCHAR)
SELECT date FROM table_name_96 WHERE week = 13
What was the date of the week 13 game?
CREATE TABLE table_name_96 (date VARCHAR, week VARCHAR)
SELECT location FROM table_name_99 WHERE rules = "thai boxing" AND round = "n/a" AND opponent = "everton crawford"
Where has a Rules of thai boxing, and a Round of n/a, and an Opponent of everton crawford?
CREATE TABLE table_name_99 (location VARCHAR, opponent VARCHAR, rules VARCHAR, round VARCHAR)
SELECT ceased_to_be_duchess FROM table_name_34 WHERE birth = "9 october 1574"
Which duchess was born on 9 october 1574?
CREATE TABLE table_name_34 (ceased_to_be_duchess VARCHAR, birth VARCHAR)
SELECT home_team FROM table_name_15 WHERE venue = "corio oval"
What was the home team that played at Corio Oval?
CREATE TABLE table_name_15 (home_team VARCHAR, venue VARCHAR)
SELECT circuitid, LOCATION FROM circuits WHERE country = "France" OR country = "Belgium"
Find the id and location of circuits that belong to France or Belgium?
CREATE TABLE circuits (circuitid VARCHAR, LOCATION VARCHAR, country VARCHAR)
SELECT report FROM table_14312471_7 WHERE home_team = "North Melbourne"
Who made the report when the home team is north Melbourne?
CREATE TABLE table_14312471_7 (report VARCHAR, home_team VARCHAR)
SELECT COUNT(field_goals) FROM table_name_33 WHERE points > 5 AND touchdowns > 2 AND extra_points < 0
How many Field goals have Points larger than 5, and Touchdowns larger than 2, and an Extra points smaller than 0?
CREATE TABLE table_name_33 (field_goals VARCHAR, extra_points VARCHAR, points VARCHAR, touchdowns VARCHAR)
SELECT date FROM table_name_67 WHERE goal = 21
When did the team score 21 goals?
CREATE TABLE table_name_67 (date VARCHAR, goal VARCHAR)
SELECT charter_range FROM table_name_99 WHERE status = "inactive" AND state = "idaho"
What years were the inactive Idaho chapter active?
CREATE TABLE table_name_99 (charter_range VARCHAR, status VARCHAR, state VARCHAR)
SELECT home_team AS score FROM table_name_70 WHERE away_team = "collingwood"
What is the score of the home team that played Collingwood?
CREATE TABLE table_name_70 (home_team VARCHAR, away_team VARCHAR)
SELECT COUNT(time) FROM table_26842217_6 WHERE visiting_team = "Louisiana-Monroe"
How many times was Louisiana-Monroe a visiting team?
CREATE TABLE table_26842217_6 (time VARCHAR, visiting_team VARCHAR)
SELECT last FROM table_name_72 WHERE total > 26 AND first = "january 2001"
What is the last when the first was January 2001 and more than 26 total?
CREATE TABLE table_name_72 (last VARCHAR, total VARCHAR, first VARCHAR)
SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*) >= 2
Show names of teachers that teach at least two courses.
CREATE TABLE teacher (Name VARCHAR, Teacher_ID VARCHAR); CREATE TABLE course_arrange (Teacher_ID VARCHAR)
SELECT tournament_venue__city_ FROM table_22849575_6 WHERE conference = "Big Sky conference"
Name the tournament venue for big sky conference
CREATE TABLE table_22849575_6 (tournament_venue__city_ VARCHAR, conference VARCHAR)
SELECT result FROM table_name_14 WHERE stadium = "rich stadium"
What was the score of the game at RIch Stadium?
CREATE TABLE table_name_14 (result VARCHAR, stadium VARCHAR)
SELECT MIN(gold) FROM table_name_45 WHERE silver < 23 AND rank > 5 AND bronze = 6
What is the low gold total for nations with under 23 silvers, ranked beloe 5, and 6 bronzes?
CREATE TABLE table_name_45 (gold INTEGER, bronze VARCHAR, silver VARCHAR, rank VARCHAR)
SELECT MAX(score) FROM table_name_80 WHERE player = "tsuneyuki nakajima"
What is the top score for tsuneyuki nakajima?
CREATE TABLE table_name_80 (score INTEGER, player VARCHAR)
SELECT rider FROM table_name_56 WHERE time = "1:45.52.84" AND rank = 8
What is the name of the rider with a time of 1:45.52.84, and a Rank of 8?
CREATE TABLE table_name_56 (rider VARCHAR, time VARCHAR, rank VARCHAR)
SELECT title FROM table_name_21 WHERE appointed_by = "millard fillmore"
Which Title has an Appointed by of Millard Fillmore?
CREATE TABLE table_name_21 (title VARCHAR, appointed_by VARCHAR)
SELECT COUNT(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "English"
How many students attend course English?
CREATE TABLE student_course_attendance (course_id VARCHAR); CREATE TABLE courses (course_id VARCHAR, course_name VARCHAR)
SELECT winning_driver FROM table_25773116_2 WHERE date = "April 11"
Who won the April 11 race?
CREATE TABLE table_25773116_2 (winning_driver VARCHAR, date VARCHAR)
SELECT record FROM table_name_41 WHERE date = "january 18"
What is the record on January 18?
CREATE TABLE table_name_41 (record VARCHAR, date VARCHAR)
SELECT outgoing_manager FROM table_name_29 WHERE manner_of_departure = "resigned" AND team = "real zaragoza" AND replaced_by = "manolo villanova"
Tell me the outgoing manager for resigned and replaced by manolo villanova for real zaragoza
CREATE TABLE table_name_29 (outgoing_manager VARCHAR, replaced_by VARCHAR, manner_of_departure VARCHAR, team VARCHAR)
SELECT MIN(pick__number) FROM table_16441561_5 WHERE position = "LB"
Who was the lowest picked LB
CREATE TABLE table_16441561_5 (pick__number INTEGER, position VARCHAR)
SELECT points FROM table_name_13 WHERE tries_for = "21"
What is the Points with a Tries For that is 21?
CREATE TABLE table_name_13 (points VARCHAR, tries_for VARCHAR)
SELECT man_of_the_match FROM table_17120964_5 WHERE opponent = "Sheffield Scimitars"
Name the man of the maatch for sheffield scimitars
CREATE TABLE table_17120964_5 (man_of_the_match VARCHAR, opponent VARCHAR)
SELECT COUNT(championship) FROM table_26202788_7 WHERE date = "January 9, 2005"
How many championships are there on the date January 9, 2005?
CREATE TABLE table_26202788_7 (championship VARCHAR, date VARCHAR)
SELECT COUNT(year) FROM table_name_42 WHERE driver = "hans hartmann"
When did Hans Hartmann drive?
CREATE TABLE table_name_42 (year VARCHAR, driver VARCHAR)
SELECT date FROM table_27734769_8 WHERE high_assists = "Andre Miller (7)"
what is the date the high assists was andre miller (7)?
CREATE TABLE table_27734769_8 (date VARCHAR, high_assists 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 player FROM table_name_30 WHERE college_junior_club_team__league_ = "shawinigan dynamos (qmjhl)"
Who is the player that is part of the team Shawinigan Dynamos (Qmjhl)?
CREATE TABLE table_name_30 (player VARCHAR, college_junior_club_team__league_ VARCHAR)
SELECT COUNT(episode) FROM table_name_78 WHERE performer_1 = "jim sweeney" AND performer_2 = "steve steen"
What is the total number of episodes where jim sweeney was the 1st performer and steve steen was the 2nd performer?
CREATE TABLE table_name_78 (episode VARCHAR, performer_1 VARCHAR, performer_2 VARCHAR)
SELECT player FROM table_name_64 WHERE pl_gp > 0
What player has a number of playoff games played greater than 0?
CREATE TABLE table_name_64 (player VARCHAR, pl_gp INTEGER)
SELECT promotion FROM table_name_7 WHERE event = "acid-fest"
What is the promotion when the event was Acid-fest?
CREATE TABLE table_name_7 (promotion VARCHAR, event VARCHAR)
SELECT location FROM table_name_14 WHERE year > 1999 AND second = "anja huber"
In years after 1999, what was the location where Anja Huber finished 2nd?
CREATE TABLE table_name_14 (location VARCHAR, year VARCHAR, second VARCHAR)
SELECT podiums FROM table_10753917_1 WHERE team = "Williams" AND margin_of_defeat = "2"
Which podiums did the Williams team have with a margin of defeat of 2?
CREATE TABLE table_10753917_1 (podiums VARCHAR, team VARCHAR, margin_of_defeat VARCHAR)
SELECT bore FROM table_name_94 WHERE name = "9 adr"
Which Bore has a Name of 9 adr?
CREATE TABLE table_name_94 (bore VARCHAR, name VARCHAR)
SELECT MIN(population) FROM table_name_37 WHERE altitude__mslm_ < 197 AND city = "alessandria" AND density__inhabitants_km_2__ < 461.8
What is the lowest population of alessandria where the altitude is less than 197 and density is less than 461.8?
CREATE TABLE table_name_37 (population INTEGER, density__inhabitants_km_2__ VARCHAR, altitude__mslm_ VARCHAR, city VARCHAR)
SELECT record FROM table_name_54 WHERE loss = "kendrick (11–8)"
Loss of kendrick (11–8) had what record?
CREATE TABLE table_name_54 (record VARCHAR, loss VARCHAR)
SELECT opponent FROM table_16677887_2 WHERE bills_first_downs = 23
What team were the bills playing where their first down was 23?
CREATE TABLE table_16677887_2 (opponent VARCHAR, bills_first_downs VARCHAR)
SELECT casualties FROM table_name_33 WHERE sunk_by… = "u-125"
What were the casualties of the ship sunk by u-125?
CREATE TABLE table_name_33 (casualties VARCHAR, sunk_by… VARCHAR)
SELECT delegate FROM table_name_99 WHERE first_elected = 2006
When first elected was 2006, who was the delegate?
CREATE TABLE table_name_99 (delegate VARCHAR, first_elected VARCHAR)
SELECT language FROM table_name_69 WHERE number = "14"
Name the language that has number of 14
CREATE TABLE table_name_69 (language VARCHAR, number VARCHAR)
SELECT player FROM table_25353861_5 WHERE blocks = 9
Which player had 9 blocks?
CREATE TABLE table_25353861_5 (player VARCHAR, blocks VARCHAR)