answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT T2.apt_type_code, T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = "Kyle"
Show the apartment type codes and apartment numbers in the buildings managed by "Kyle".
CREATE TABLE Apartment_Buildings (building_id VARCHAR, building_manager VARCHAR); CREATE TABLE Apartments (apt_type_code VARCHAR, apt_number VARCHAR, building_id VARCHAR)
SELECT team FROM table_name_9 WHERE season > 2008
What team won after 2008?
CREATE TABLE table_name_9 (team VARCHAR, season INTEGER)
SELECT school_name FROM table_name_64 WHERE students < 389 AND grades = "10-12"
Which School name has students smaller than 389, and grades of 10-12?
CREATE TABLE table_name_64 (school_name VARCHAR, students VARCHAR, grades VARCHAR)
SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Badlands"
How many instruments does the song "Badlands" use?
CREATE TABLE instruments (songid VARCHAR); CREATE TABLE songs (songid VARCHAR)
SELECT venue FROM table_name_25 WHERE competition = "2010 fifa world cup qualification" AND result = "won" AND date = "14 june 2008"
What is Venue, when Competition is 2010 FIFA World Cup Qualification, when Result is Won, and when Date is 14 June 2008?
CREATE TABLE table_name_25 (venue VARCHAR, date VARCHAR, competition VARCHAR, result VARCHAR)
SELECT tournament FROM table_name_15 WHERE opponents_in_the_final = "rod laver fred stolle"
What is the Tournament with a Opponents in the final with rod laver fred stolle?
CREATE TABLE table_name_15 (tournament VARCHAR, opponents_in_the_final VARCHAR)
SELECT entered_office_as_head_of_state_or_government FROM table_10026563_1 WHERE office = "Prime Minister of Italy"
When did the Prime Minister of Italy take office?
CREATE TABLE table_10026563_1 (entered_office_as_head_of_state_or_government VARCHAR, office VARCHAR)
SELECT MAX(score) FROM table_1506950_4
What is the worst (highest) score?
CREATE TABLE table_1506950_4 (score INTEGER)
SELECT lane FROM table_name_37 WHERE swimmer = "goksu bicer"
Which lane is Goksu Bicer in?
CREATE TABLE table_name_37 (lane VARCHAR, swimmer VARCHAR)
SELECT date FROM table_name_65 WHERE save = "aguilera (5)"
What was the date when the game had a save by Aguilera (5)?
CREATE TABLE table_name_65 (date VARCHAR, save VARCHAR)
SELECT first_elected FROM table_2668347_14 WHERE candidates = "Thomas Lawyer (DR) 54.9% William Beekman (F) 45.1%"
when was the first elected when the candidates is thomas lawyer (dr) 54.9% william beekman (f) 45.1%?
CREATE TABLE table_2668347_14 (first_elected VARCHAR, candidates VARCHAR)
SELECT MAX(league_apps__sub_) FROM table_1112176_1 WHERE total_goals = 11
When total goals is 11 what was the league apps (sub)?
CREATE TABLE table_1112176_1 (league_apps__sub_ INTEGER, total_goals VARCHAR)
SELECT drivers FROM table_name_33 WHERE position = 27
Which drivers have the position of 27?
CREATE TABLE table_name_33 (drivers VARCHAR, position VARCHAR)
SELECT hometown FROM table_name_45 WHERE height = "6-4"
What's the hometown of the player who is 6-4?
CREATE TABLE table_name_45 (hometown VARCHAR, height VARCHAR)
SELECT location FROM table_name_25 WHERE game < 57 AND points > 50
Which game has a number lower than 57 and more than 50 points?
CREATE TABLE table_name_25 (location VARCHAR, game VARCHAR, points VARCHAR)
SELECT year FROM table_name_16 WHERE entrant = "trio brdeact wind allass"
What year was trio brdeact wind allass the entrant?
CREATE TABLE table_name_16 (year VARCHAR, entrant VARCHAR)
SELECT week FROM table_name_39 WHERE date = "december 10, 1989"
What was the week on December 10, 1989?
CREATE TABLE table_name_39 (week VARCHAR, date VARCHAR)
SELECT continent FROM table_name_30 WHERE country = "united states"
What is the Continent that also has the United States listed as a country?
CREATE TABLE table_name_30 (continent VARCHAR, country VARCHAR)
SELECT constructor FROM table_name_22 WHERE laps < 3 AND grid = 15
What constructor has less than 3 laps and grid 15?
CREATE TABLE table_name_22 (constructor VARCHAR, laps VARCHAR, grid VARCHAR)
SELECT year FROM table_name_99 WHERE finish = "champions"
In what Year was the Finish Champions?
CREATE TABLE table_name_99 (year VARCHAR, finish VARCHAR)
SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3
Show the details of the top 3 most expensive hotels.
CREATE TABLE HOTELS (other_hotel_details VARCHAR, price_range VARCHAR)
SELECT main_cast_seasons FROM table_12441518_1 WHERE portrayed_by = "Kevin Jonas"
What seasons does Kevin Jonas appear?
CREATE TABLE table_12441518_1 (main_cast_seasons VARCHAR, portrayed_by VARCHAR)
SELECT MIN(sexual_abuse_1) FROM table_15652027_1 WHERE conflict = "Second Sudanese Civil War"
What is the sexual abuse rate where the conflict is the Second Sudanese Civil War?
CREATE TABLE table_15652027_1 (sexual_abuse_1 INTEGER, conflict VARCHAR)
SELECT location_attendance FROM table_name_31 WHERE record = "1-4"
What is the Location Attendance with a Record that is 1-4?
CREATE TABLE table_name_31 (location_attendance VARCHAR, record VARCHAR)
SELECT MAX(game) FROM table_20849830_1
How many games were there in the 1966 season?
CREATE TABLE table_20849830_1 (game INTEGER)
SELECT record FROM table_name_10 WHERE score = "118–105"
What was the Record of the game with a Score of 118–105?
CREATE TABLE table_name_10 (record VARCHAR, score VARCHAR)
SELECT SUM(lost) FROM table_name_2 WHERE years > 122 AND total_games > 1244
How many losses had more than 122 years and more than 1244 total games?
CREATE TABLE table_name_2 (lost INTEGER, years VARCHAR, total_games VARCHAR)
SELECT COUNT(original_airdate) FROM table_23392257_4 WHERE _number = 22
What date did Episode 22 originally air?
CREATE TABLE table_23392257_4 (original_airdate VARCHAR, _number VARCHAR)
SELECT MAX(top_25) FROM table_name_28 WHERE events > 2 AND wins < 0
What is his highest number of top 25s when eh played over 2 events and under 0 wins?
CREATE TABLE table_name_28 (top_25 INTEGER, events VARCHAR, wins VARCHAR)
SELECT frequency FROM table_name_68 WHERE format = "contemporary christian music"
what is the frequency when the format is contemporary christian music?
CREATE TABLE table_name_68 (frequency VARCHAR, format VARCHAR)
SELECT engine FROM table_name_86 WHERE points = "17"
What engine scored 17 points?
CREATE TABLE table_name_86 (engine VARCHAR, points VARCHAR)
SELECT COUNT(publisher) FROM table_16907214_1 WHERE hardcover = "ISBN 193700788X"
How many publishers put out isbn 193700788x?
CREATE TABLE table_16907214_1 (publisher VARCHAR, hardcover VARCHAR)
SELECT MIN(rank) FROM table_name_91 WHERE rider = "darren gilpin"
What is the lowest rank of rider darren gilpin?
CREATE TABLE table_name_91 (rank INTEGER, rider VARCHAR)
SELECT first_game FROM table_name_89 WHERE lost > 4
When was the first game associated with over 4 losses?
CREATE TABLE table_name_89 (first_game VARCHAR, lost INTEGER)
SELECT shooter FROM table_name_40 WHERE score_points = "olympic silver medalist"
Which Shooter has Score points of olympic silver medalist?
CREATE TABLE table_name_40 (shooter VARCHAR, score_points VARCHAR)
SELECT COUNT(DISTINCT T2.id), COUNT(DISTINCT T3.id), T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name
Find the total number of students and total number of instructors for each department.
CREATE TABLE department (dept_name VARCHAR); CREATE TABLE student (id VARCHAR, dept_name VARCHAR); CREATE TABLE instructor (dept_name VARCHAR, id VARCHAR)
SELECT opponents FROM table_name_13 WHERE score_f_a = "3–0" AND date = "31 july 2007"
Score F–A of 3–0, and a Date of 31 july 2007 had what opponents?
CREATE TABLE table_name_13 (opponents VARCHAR, score_f_a VARCHAR, date VARCHAR)
SELECT score FROM table_name_57 WHERE loss = "hideo nomo (3–5)"
What was the score when the loss was hideo nomo (3–5)?
CREATE TABLE table_name_57 (score VARCHAR, loss VARCHAR)
SELECT MIN(weight) FROM table_13312864_1 WHERE player = "Enrique de la Fuente"
What's Enrique de la Fuente's weight?
CREATE TABLE table_13312864_1 (weight INTEGER, player VARCHAR)
SELECT contestant_name FROM contestants WHERE contestant_name LIKE "%al%"
Return the names of the contestants whose names contain the substring 'Al' .
CREATE TABLE contestants (contestant_name VARCHAR)
SELECT 2008 FROM table_name_69 WHERE 2011 = "olympic games"
Tell me the 2008 of 2001 olympic games
CREATE TABLE table_name_69 (Id VARCHAR)
SELECT seasons FROM table_name_67 WHERE entries < 215 AND driver = "jackie stewart"
Which season did jackie stewart enter with entries less than 215?
CREATE TABLE table_name_67 (seasons VARCHAR, entries VARCHAR, driver VARCHAR)
SELECT COUNT(*) FROM device
How many devices are there?
CREATE TABLE device (Id VARCHAR)
SELECT MAX(gold) FROM table_name_13 WHERE bronze = 2 AND nation = "hungary" AND total > 7
What's the largest number of Gold medals won when bronze won are 2 and total won are over 7 by Hungary?
CREATE TABLE table_name_13 (gold INTEGER, total VARCHAR, bronze VARCHAR, nation VARCHAR)
SELECT date FROM table_name_10 WHERE away_team = "north melbourne"
What was the date of the game when North Melbourne was the away team?
CREATE TABLE table_name_10 (date VARCHAR, away_team VARCHAR)
SELECT SUM(population) FROM table_name_54 WHERE area_km_2 < 130.68 AND official_name = "mcadam"
With an Area km 2 of less than 130.68, what is McAdam's Population?
CREATE TABLE table_name_54 (population INTEGER, area_km_2 VARCHAR, official_name VARCHAR)
SELECT location FROM table_name_76 WHERE frequency = "92.3mhz"
What is the location where the frequency is 92.3mhz?
CREATE TABLE table_name_76 (location VARCHAR, frequency VARCHAR)
SELECT MAX(time) FROM table_name_35 WHERE country = "spain" AND lane > 8
Tell me the highest time for spain and lane larger than 8
CREATE TABLE table_name_35 (time INTEGER, country VARCHAR, lane VARCHAR)
SELECT MIN(crowd) FROM table_name_83 WHERE venue = "vfl park"
What was the smallest crowd of vfl park?
CREATE TABLE table_name_83 (crowd INTEGER, venue VARCHAR)
SELECT date FROM table_name_11 WHERE score = "6–1 7–6 (8–6)"
Which Date has a Score of 6–1 7–6 (8–6)?
CREATE TABLE table_name_11 (date VARCHAR, score VARCHAR)
SELECT team FROM table_22883210_11 WHERE series = "1-1"
When 1-1 is the series who is the team?
CREATE TABLE table_22883210_11 (team VARCHAR, series VARCHAR)
SELECT writer_s_ FROM table_26702078_1 WHERE no_in_series = 46
Name the writers for 46 in series
CREATE TABLE table_26702078_1 (writer_s_ VARCHAR, no_in_series VARCHAR)
SELECT MAX(number_of_seasons_in_liga_mx) FROM table_name_33 WHERE club = "cruz azul" AND number_of_seasons_in_top_division > 68
What is the highest Number of seasons in Liga MX for Club cruz azul, when their season in the top division is higher than 68?
CREATE TABLE table_name_33 (number_of_seasons_in_liga_mx INTEGER, club VARCHAR, number_of_seasons_in_top_division VARCHAR)
SELECT country FROM table_name_41 WHERE builder = "royal dockyard" AND ship = "pegasus"
What country was the Pegasus, build by Royal Dockyard, from?
CREATE TABLE table_name_41 (country VARCHAR, builder VARCHAR, ship VARCHAR)
SELECT us_viewers__million_ FROM table_26464364_1 WHERE production_code = "3X6004"
How many million U.S. viewers watched the episode with the production code 3x6004?
CREATE TABLE table_26464364_1 (us_viewers__million_ VARCHAR, production_code VARCHAR)
SELECT MIN(joined) FROM table_261954_1
What is the least value of joined?
CREATE TABLE table_261954_1 (joined INTEGER)
SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Louisville , Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Hiram , Georgia'
Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia.
CREATE TABLE member (member_id VARCHAR, Hometown VARCHAR); CREATE TABLE branch (name VARCHAR, branch_id VARCHAR); CREATE TABLE membership_register_branch (branch_id VARCHAR, member_id VARCHAR)
SELECT year FROM table_name_44 WHERE award = "drama desk award" AND result = "won" AND nominee = "george hearn"
What year was the Drama Desk award won by nominee George Hearn?
CREATE TABLE table_name_44 (year VARCHAR, nominee VARCHAR, award VARCHAR, result VARCHAR)
SELECT draws FROM table_name_61 WHERE losses > 8 AND points = 13
What is the number of draws for the team with more than 8 losses and 13 points?
CREATE TABLE table_name_61 (draws VARCHAR, losses VARCHAR, points VARCHAR)
SELECT chassis FROM table_name_33 WHERE year = 1961
Name the chassis of 1961
CREATE TABLE table_name_33 (chassis VARCHAR, year VARCHAR)
SELECT name FROM table_name_19 WHERE country = "sco"
What is the person's name that is from the country of SCO?
CREATE TABLE table_name_19 (name VARCHAR, country VARCHAR)
SELECT team FROM table_11960196_3 WHERE date = "April 25"
What is the team of april 25?
CREATE TABLE table_11960196_3 (team VARCHAR, date VARCHAR)
SELECT male FROM table_name_79 WHERE year < 2004 AND female = "dido"
Which male is paired with dido in 2004?
CREATE TABLE table_name_79 (male VARCHAR, year VARCHAR, female VARCHAR)
SELECT date FROM table_name_84 WHERE opponent = "@ carolina hurricanes"
What is Date, when Opponent is @ Carolina Hurricanes?
CREATE TABLE table_name_84 (date VARCHAR, opponent VARCHAR)
SELECT ihsaa_class FROM table_name_1 WHERE mascot = "musketeers"
What's the IHSAA Class when the mascot was the Musketeers?
CREATE TABLE table_name_1 (ihsaa_class VARCHAR, mascot VARCHAR)
SELECT points_for FROM table_name_76 WHERE points_against = "571"
What is Points For, when Points Against is 571?
CREATE TABLE table_name_76 (points_for VARCHAR, points_against VARCHAR)
SELECT date__from_ FROM table_name_18 WHERE traction_type = "electric" AND location = "calgary"
what is the date for traction type electric with calgary location?
CREATE TABLE table_name_18 (date__from_ VARCHAR, traction_type VARCHAR, location VARCHAR)
SELECT oklahoma_vs FROM table_name_15 WHERE current_streak = "l 1" AND at_neutral_site = "osu, 7-6"
What is Oklahoma vs. when Current Streak is l 1, and Neutral Site is osu, 7-6?
CREATE TABLE table_name_15 (oklahoma_vs VARCHAR, current_streak VARCHAR, at_neutral_site VARCHAR)
SELECT opponent FROM table_name_27 WHERE record = "17-19-4"
Who is the opponent when the record is 17-19-4?
CREATE TABLE table_name_27 (opponent VARCHAR, record VARCHAR)
SELECT representative_work FROM table_name_20 WHERE year > 2005 AND result = "nominated" AND award = "best variety show host"
What is the name of the Representative Work in a year later than 2005 with a Result of nominated, and an Award of best variety show host?
CREATE TABLE table_name_20 (representative_work VARCHAR, award VARCHAR, year VARCHAR, result VARCHAR)
SELECT station FROM table_1847523_2 WHERE city_of_license__market = "Cincinnati"
What are all the stations with a license in Cincinnati?
CREATE TABLE table_1847523_2 (station VARCHAR, city_of_license__market 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 date FROM table_name_41 WHERE opponent_in_the_final = "kenneth carlsen"
What is the Date of the match with Opponent in the final Kenneth Carlsen?
CREATE TABLE table_name_41 (date VARCHAR, opponent_in_the_final VARCHAR)
SELECT college_junior_club_team__league_ FROM table_name_45 WHERE player = "brett sonne"
Which college/junior/club team (league) did Brett Sonne play in?
CREATE TABLE table_name_45 (college_junior_club_team__league_ VARCHAR, player VARCHAR)
SELECT result_games FROM table_21436373_6 WHERE date_year = "Sun 11/28/10"
What is the result/games of Sun 11/28/10 as the date/year?
CREATE TABLE table_21436373_6 (result_games VARCHAR, date_year VARCHAR)
SELECT start FROM table_name_12 WHERE rank = "3" AND year = "1936"
What was the start with a rank of 3 in 1936?
CREATE TABLE table_name_12 (start VARCHAR, rank VARCHAR, year VARCHAR)
SELECT MIN(grid) FROM table_name_30 WHERE time_retired = "+ 5 laps" AND laps < 161
What grid is the lowest when the time/retired is + 5 laps and the laps is less than 161?
CREATE TABLE table_name_30 (grid INTEGER, time_retired VARCHAR, laps VARCHAR)
SELECT COUNT(season) FROM table_27654988_1 WHERE opponent = "Vamos Idaliou Krka Novo Mesto SV Neulengbach"
How many seasons was the opponent Vamos Idaliou Krka Novo Mesto SV Neulengbach?
CREATE TABLE table_27654988_1 (season VARCHAR, opponent VARCHAR)
SELECT AVG(total) FROM table_name_89 WHERE position < 4 AND b_score > 9.125 AND a_score < 6.6
What total has a position smaller than 4, a B score higher than 9.125, and an A score less than 6.6?
CREATE TABLE table_name_89 (total INTEGER, a_score VARCHAR, position VARCHAR, b_score VARCHAR)
SELECT COUNT(position) FROM table_16441561_5 WHERE player = "Jeff Brown"
How many players named Jeff Brown were drafted
CREATE TABLE table_16441561_5 (position VARCHAR, player VARCHAR)
SELECT score FROM table_name_9 WHERE record = "22-28-7-4"
What score has a record of 22-28-7-4?
CREATE TABLE table_name_9 (score VARCHAR, record VARCHAR)
SELECT COUNT(title) FROM table_28802668_3 WHERE no_in_season = 19
How many episode titles does episode 19 in the season have?
CREATE TABLE table_28802668_3 (title VARCHAR, no_in_season VARCHAR)
SELECT part_3 FROM table_1745843_10 WHERE class = "4"
What is part 1 of the verb in class 4
CREATE TABLE table_1745843_10 (part_3 VARCHAR, class VARCHAR)
SELECT name FROM table_name_78 WHERE position < 4 AND lost = 2
Which name was in a position less than 4 with 2 losses?
CREATE TABLE table_name_78 (name VARCHAR, position VARCHAR, lost VARCHAR)
SELECT away_team FROM table_name_13 WHERE home_team = "richmond"
Which Away team is associated with the Richmond Home team?
CREATE TABLE table_name_13 (away_team VARCHAR, home_team VARCHAR)
SELECT score FROM table_name_21 WHERE date = "april 27"
What was the result of April 27's game?
CREATE TABLE table_name_21 (score VARCHAR, date VARCHAR)
SELECT place FROM table_name_78 WHERE player = "mark o'meara"
WHAT IS THE PLACE WITH PLAYER mark o'meara?
CREATE TABLE table_name_78 (place VARCHAR, player VARCHAR)
SELECT 2012 FROM table_name_13 WHERE 2010 = "1r" AND 2006 = "2r"
What is the 2012 value with 1r in 2010 and 2r in 2006?
CREATE TABLE table_name_13 (Id VARCHAR)
SELECT removal_treaty__year_signed_ FROM table_name_32 WHERE nation = "chickasaw"
Which removal treaty covered the chickasaw nation?
CREATE TABLE table_name_32 (removal_treaty__year_signed_ VARCHAR, nation VARCHAR)
SELECT who_two FROM table_1015914_24 WHERE you_and_i = "ngœban"
What is who-two where you and i is ngœban?
CREATE TABLE table_1015914_24 (who_two VARCHAR, you_and_i VARCHAR)
SELECT SUM(finalists) FROM table_name_47 WHERE years_won = "2008" AND _percentage_won > 33
How many finalists were there when the years won was 2008 and the won % was greater than 33?
CREATE TABLE table_name_47 (finalists INTEGER, years_won VARCHAR, _percentage_won VARCHAR)
SELECT result FROM table_name_99 WHERE year > 2009 AND category = "album of the year"
What was album of the year after 2009?
CREATE TABLE table_name_99 (result VARCHAR, year VARCHAR, category VARCHAR)
SELECT round FROM table_name_32 WHERE location = "finland" AND method = "draw"
What is the round in Finland with a draw for method?
CREATE TABLE table_name_32 (round VARCHAR, location VARCHAR, method VARCHAR)
SELECT record FROM table_27756572_10 WHERE team = "Philadelphia"
What was the record when the Clippers played Philadelphia?
CREATE TABLE table_27756572_10 (record VARCHAR, team VARCHAR)
SELECT COUNT(rank) FROM table_name_21 WHERE points > 120.44 AND nation = "east germany" AND sp + fs = 3
What is the rank for more than 120.44 points in East Germany and a SP+FS of 3?
CREATE TABLE table_name_21 (rank VARCHAR, points VARCHAR, nation VARCHAR, sp VARCHAR, fs VARCHAR)
SELECT zx_spectrum FROM table_name_7 WHERE c = 64 = c64 AND title = "ankh"
Which ZX Spectrum has a C=64 of c64, and a Title of ankh?
CREATE TABLE table_name_7 (zx_spectrum VARCHAR, c64 VARCHAR, title VARCHAR, c VARCHAR)
SELECT capital FROM table_name_88 WHERE hanja = "漢州"
What is the capital of the province with 漢州 in Hanja?
CREATE TABLE table_name_88 (capital VARCHAR, hanja VARCHAR)
SELECT score FROM table_name_38 WHERE site_stadium = "harmon stadium" AND date = "february 24"
What was the score of the game played at Harmon Stadium on February 24?
CREATE TABLE table_name_38 (score VARCHAR, site_stadium VARCHAR, date VARCHAR)
SELECT AVG(lost) FROM table_name_65 WHERE points > 3 AND played > 14
What was the average losses for team with points larger than 3 and played larger thna 14?
CREATE TABLE table_name_65 (lost INTEGER, points VARCHAR, played VARCHAR)
SELECT week__number FROM table_name_42 WHERE result = "safe" AND theme = "dolly parton"
Which week had safe as the result and Dolly Parton as the theme?
CREATE TABLE table_name_42 (week__number VARCHAR, result VARCHAR, theme VARCHAR)