answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY COUNT(*) LIMIT 1
What is the code of airport that has fewest number of flights?
CREATE TABLE FLIGHTS (DestAirport VARCHAR, SourceAirport VARCHAR); CREATE TABLE AIRPORTS (AirportCode VARCHAR)
SELECT class FROM table_name_56 WHERE date = "8/1954"
what class has the date of 8/1954?
CREATE TABLE table_name_56 (class VARCHAR, date VARCHAR)
SELECT AVG(podiums) FROM table_name_64 WHERE position = "32nd" AND wins < 0
What is the average number of podiums in the 32nd position with less than 0 wins?
CREATE TABLE table_name_64 (podiums INTEGER, position VARCHAR, wins VARCHAR)
SELECT year FROM table_name_55 WHERE rank = "#4" AND country = "us"
Which year's rank was #4 when the country was the US?
CREATE TABLE table_name_55 (year VARCHAR, rank VARCHAR, country VARCHAR)
SELECT MAX(wins) FROM table_name_61 WHERE against = 1940 AND byes > 0
Which Wins has an Against of 1940, and a Byes larger than 0?
CREATE TABLE table_name_61 (wins INTEGER, against VARCHAR, byes VARCHAR)
SELECT MIN(pd_per_game) FROM table_name_49 WHERE rank < 4 AND winning__percentage = "78.6%" AND streak = "w1" AND pa_per_game < 81.5
Which PD per game has a Rank smaller than 4, a Winning % of 78.6%, a Streak of w1, and a PA per game smaller than 81.5?
CREATE TABLE table_name_49 (pd_per_game INTEGER, pa_per_game VARCHAR, streak VARCHAR, rank VARCHAR, winning__percentage VARCHAR)
SELECT MIN(voted_yes) FROM table_120778_2 WHERE percent_no = "68.2"
what is the minimum voted yes where percent no is 68.2
CREATE TABLE table_120778_2 (voted_yes INTEGER, percent_no VARCHAR)
SELECT team FROM table_name_79 WHERE game = 34
Who was the team for game 34?
CREATE TABLE table_name_79 (team VARCHAR, game VARCHAR)
SELECT leading_scorer FROM table_name_40 WHERE date = "12 january 2008"
Name the leading scorer for 12 january 2008
CREATE TABLE table_name_40 (leading_scorer VARCHAR, date VARCHAR)
SELECT COUNT(assists) FROM table_17309500_1 WHERE blocks = "77"
Name the total number of assists for 77 blocks
CREATE TABLE table_17309500_1 (assists VARCHAR, blocks VARCHAR)
SELECT MAX(number) FROM table_name_13 WHERE year_start < 1874 AND year_end > 1873
Which Number has a Year Start smaller than 1874, and a Year End larger than 1873?
CREATE TABLE table_name_13 (number INTEGER, year_start VARCHAR, year_end VARCHAR)
SELECT AVG(played) FROM table_name_17 WHERE drawn > 1 AND against > 16
What is the average played that has a drawn greater than 1, with an against greater than 16?
CREATE TABLE table_name_17 (played INTEGER, drawn VARCHAR, against VARCHAR)
SELECT COUNT(nickname) FROM table_16734640_1 WHERE institution = "Andrew College"
Name the total number of nicknames for andrew college
CREATE TABLE table_16734640_1 (nickname VARCHAR, institution VARCHAR)
SELECT year FROM table_name_71 WHERE wins = "0"
What is Year, when Wins is "0"?
CREATE TABLE table_name_71 (year VARCHAR, wins VARCHAR)
SELECT east FROM table_name_9 WHERE south = "tus geretsried ii"
Who was in the East when TUS Geretsried II was in the South?
CREATE TABLE table_name_9 (east VARCHAR, south VARCHAR)
SELECT engine FROM table_name_1 WHERE entrant = "mercedes amg petronas f1 team" AND points = "93"
What engine has the Mercedes AMG Petronas f1 team, and 93 points?
CREATE TABLE table_name_1 (engine VARCHAR, entrant VARCHAR, points VARCHAR)
SELECT date FROM table_name_7 WHERE runner_s__up = "nick price"
On what date was Nick Price the runner-up?
CREATE TABLE table_name_7 (date VARCHAR, runner_s__up VARCHAR)
SELECT party FROM table_1342338_6 WHERE incumbent = "Richard J. Welch"
What is the party for richard j. welch?
CREATE TABLE table_1342338_6 (party VARCHAR, incumbent VARCHAR)
SELECT production_code FROM table_25390694_2 WHERE writer = "Brendan Cowell"
What was the production code of the episode written by Brendan Cowell?
CREATE TABLE table_25390694_2 (production_code VARCHAR, writer VARCHAR)
SELECT song_choice FROM table_27614571_1 WHERE theme = "Samba"
What was Barreto's song choice when the theme was samba?
CREATE TABLE table_27614571_1 (song_choice VARCHAR, theme VARCHAR)
SELECT district FROM table_name_4 WHERE first_elected = "1900"
when first elected was 1900 what was the district?
CREATE TABLE table_name_4 (district VARCHAR, first_elected VARCHAR)
SELECT integrated FROM table_11944282_1 WHERE component = "Customers"
What is the name of the integrated where the component are customers?
CREATE TABLE table_11944282_1 (integrated VARCHAR, component VARCHAR)
SELECT home_team FROM table_name_25 WHERE away_team = "collingwood"
Which Home team has an Away team of collingwood?
CREATE TABLE table_name_25 (home_team VARCHAR, away_team VARCHAR)
SELECT icao FROM table_name_90 WHERE country = "india" AND iata = "trz"
What is the ICAO in India with IATA TRZ?
CREATE TABLE table_name_90 (icao VARCHAR, country VARCHAR, iata VARCHAR)
SELECT creation FROM department GROUP BY creation ORDER BY COUNT(*) DESC LIMIT 1
In which year were most departments established?
CREATE TABLE department (creation VARCHAR)
SELECT team_2 FROM table_name_32 WHERE ground = "pailing sport park" AND result = "0-4"
What team is 2 when the game result is 0-4 at Pailing Sport Park?
CREATE TABLE table_name_32 (team_2 VARCHAR, ground VARCHAR, result VARCHAR)
SELECT category FROM table_name_37 WHERE year = 1998 AND role_episode = "david duchovny"
What's the category in 1998 with the role/episode of David Duchovny?
CREATE TABLE table_name_37 (category VARCHAR, year VARCHAR, role_episode VARCHAR)
SELECT mon_23_aug FROM table_26986076_2 WHERE fri_27_aug = "18' 59.25 119.226mph"
what is mon 23 aug when fri 27 aug is 18' 59.25 119.226mph?
CREATE TABLE table_26986076_2 (mon_23_aug VARCHAR, fri_27_aug VARCHAR)
SELECT location_attendance FROM table_name_17 WHERE game > 54 AND date = "february 25"
Name the location attendance for game more than 54 on february 25
CREATE TABLE table_name_17 (location_attendance VARCHAR, game VARCHAR, date VARCHAR)
SELECT pole_position FROM table_14638077_2 WHERE rnd = 16
who is the the pole position with rnd being 16
CREATE TABLE table_14638077_2 (pole_position VARCHAR, rnd VARCHAR)
SELECT COUNT(sinhalese) FROM table_24574438_1 WHERE indian_tamil = 177
Name the total number of sinhalese for indian tamil being 177
CREATE TABLE table_24574438_1 (sinhalese VARCHAR, indian_tamil VARCHAR)
SELECT starting_point FROM table_name_66 WHERE operates = "north/south" AND name = "palafox street"
What is the starting point of the north/south operating Palafox Street route?
CREATE TABLE table_name_66 (starting_point VARCHAR, operates VARCHAR, name VARCHAR)
SELECT MAX(difference) FROM table_26677836_1
WHat is the highest difference?
CREATE TABLE table_26677836_1 (difference INTEGER)
SELECT score FROM table_name_33 WHERE attendance = "2,444"
What is Score, when Attendance is 2,444?
CREATE TABLE table_name_33 (score VARCHAR, attendance VARCHAR)
SELECT T1.statement_id, T2.statement_details, T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id
Show statement id, statement detail, account detail for accounts.
CREATE TABLE Accounts (statement_id VARCHAR, account_details VARCHAR); CREATE TABLE Statements (statement_details VARCHAR, statement_id VARCHAR)
SELECT cash_fare FROM table_20803241_1 WHERE type_of_fare = "Mega Pass* (Senior/Disabled)"
When mega pass* (senior/disabled) is the type of fare what is the cash fare?
CREATE TABLE table_20803241_1 (cash_fare VARCHAR, type_of_fare VARCHAR)
SELECT away_team FROM table_name_93 WHERE tie_no = "2"
What was the name of the away team that had a tie of 2?
CREATE TABLE table_name_93 (away_team VARCHAR, tie_no VARCHAR)
SELECT mahu FROM table_name_80 WHERE pergi = "pi"
What is Mahu when pergi is pi?
CREATE TABLE table_name_80 (mahu VARCHAR, pergi VARCHAR)
SELECT away FROM table_name_97 WHERE round < 2 AND club = "nk rijeka"
What is NK Rijeka's away score in Round 2?
CREATE TABLE table_name_97 (away VARCHAR, round VARCHAR, club VARCHAR)
SELECT MAX(round) FROM table_name_59 WHERE player = "dan federman" AND pick > 114
Player of dan federman, and a Pick larger than 114 involves which highest round?
CREATE TABLE table_name_59 (round INTEGER, player VARCHAR, pick VARCHAR)
SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree <> 'Ph.D.'
Find the first name and office of history professor who did not get a Ph.D. degree.
CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR, prof_high_degree VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
SELECT length FROM table_name_31 WHERE character_type = "milkman turned prizefighter"
What is the length of the film with the character type being a milkman turned prizefighter?
CREATE TABLE table_name_31 (length VARCHAR, character_type VARCHAR)
SELECT score FROM table_name_72 WHERE money___$__ = "112,500" AND player = "darren clarke"
What is the score of player darren clarke, who has $112,500?
CREATE TABLE table_name_72 (score VARCHAR, money___$__ VARCHAR, player VARCHAR)
SELECT COUNT(lost) FROM table_name_93 WHERE against < 37 AND drawn > 2 AND played > 20
What is the sum of lost when against is less than 37, drawn is more than 2, and played is more than 20?
CREATE TABLE table_name_93 (lost VARCHAR, played VARCHAR, against VARCHAR, drawn VARCHAR)
SELECT no_result FROM table_name_2 WHERE wins < 2 AND losses > 1
WHAT kind of No Result has Wins smaller than 2, and Losses larger than 1?
CREATE TABLE table_name_2 (no_result VARCHAR, wins VARCHAR, losses VARCHAR)
SELECT crowd FROM table_name_94 WHERE away_team = "south dragons" AND venue = "gold coast convention centre"
How big was the crowd when the South Dragons were the away team at the Gold Coast Convention Centre?
CREATE TABLE table_name_94 (crowd VARCHAR, away_team VARCHAR, venue VARCHAR)
SELECT result_f___a FROM table_name_87 WHERE league_position = "1st" AND date = "4 january 1994"
Name the Result F – A that has a League position of 1st on 4 january 1994?
CREATE TABLE table_name_87 (result_f___a VARCHAR, league_position VARCHAR, date VARCHAR)
SELECT bowling_style FROM table_11950720_8 WHERE player = "Shivnarine Chanderpaul"
Shivnarine Chanderpaul used what bowling style?
CREATE TABLE table_11950720_8 (bowling_style VARCHAR, player VARCHAR)
SELECT city FROM table_name_17 WHERE prize = "$1,859,000"
What is the City, when the Prize is $1,859,000?
CREATE TABLE table_name_17 (city VARCHAR, prize VARCHAR)
SELECT outcome FROM table_name_5 WHERE tournament = "johannesburg, south africa"
What the Outcome for the Tournament of Johannesburg, South Africa
CREATE TABLE table_name_5 (outcome VARCHAR, tournament VARCHAR)
SELECT mountains_classification FROM table_25655781_17 WHERE winner = "Borut Božič"
Who had the mountains classification when borut božič was the winner?
CREATE TABLE table_25655781_17 (mountains_classification VARCHAR, winner VARCHAR)
SELECT COUNT(score) FROM table_26458137_2 WHERE opponents_in_the_final = "Beti Sekulovski Cindy Watson"
How many times is the opponents in the final is beti sekulovski cindy watson?
CREATE TABLE table_26458137_2 (score VARCHAR, opponents_in_the_final VARCHAR)
SELECT scheduled FROM table_name_96 WHERE turbines = 17
When is the scheduled date for the farm having 17 turbines?
CREATE TABLE table_name_96 (scheduled VARCHAR, turbines VARCHAR)
SELECT away_team AS score FROM table_name_63 WHERE home_team = "essendon"
What was the away team score when the home team essendon was playing?
CREATE TABLE table_name_63 (away_team VARCHAR, home_team VARCHAR)
SELECT result FROM table_29728596_1 WHERE away_team = "FK Rudar Ugljevik"
What was the result of the home match against FK Rudar Ugljevik?
CREATE TABLE table_29728596_1 (result VARCHAR, away_team VARCHAR)
SELECT location FROM table_name_30 WHERE project = "eren talu bidding project"
Where is the Eren Talu bidding project located?
CREATE TABLE table_name_30 (location VARCHAR, project VARCHAR)
SELECT race FROM table_name_4 WHERE pole_position = "alberto ascari" AND winning_driver = "alberto ascari" AND fastest_lap = "luigi villoresi"
Which race did Alberto Ascari have both the Pole position and the win, but Luigi Villoresi set the fastest lap time?
CREATE TABLE table_name_4 (race VARCHAR, fastest_lap VARCHAR, pole_position VARCHAR, winning_driver VARCHAR)
SELECT percentage_of_votes FROM table_name_62 WHERE number_of_votes_received = "1,255,153"
What percentage of the vote was 1,255,153 of received votes?
CREATE TABLE table_name_62 (percentage_of_votes VARCHAR, number_of_votes_received VARCHAR)
SELECT COUNT(round) FROM table_name_51 WHERE position = "wide receiver" AND college = "kent state"
Name the total number of round for wide receiver for kent state
CREATE TABLE table_name_51 (round VARCHAR, position VARCHAR, college VARCHAR)
SELECT drew FROM table_name_52 WHERE round = "third place" AND season = "1999-2000"
What is the drew for the 1999-2000 season when they were in third place?
CREATE TABLE table_name_52 (drew VARCHAR, round VARCHAR, season VARCHAR)
SELECT venue FROM table_name_9 WHERE competition = "2000 afc asian cup qualification"
What venue was the 2000 AFC Asian Cup qualification held at?
CREATE TABLE table_name_9 (venue VARCHAR, competition VARCHAR)
SELECT country FROM table_14903081_1 WHERE location = "Rome"
Rome is in which country?
CREATE TABLE table_14903081_1 (country VARCHAR, location VARCHAR)
SELECT time FROM table_name_68 WHERE event = "legacy fighting championship 12"
How long was the time for the Legacy Fighting Championship 12?
CREATE TABLE table_name_68 (time VARCHAR, event VARCHAR)
SELECT network FROM table_name_14 WHERE city_of_license = "pachuca, hidalgo"
What's the network in Pachuca, Hidalgo?
CREATE TABLE table_name_14 (network VARCHAR, city_of_license VARCHAR)
SELECT COUNT(silver) FROM table_name_29 WHERE bronze = 2 AND gold < 2
What's the total silver medals having less than 2 gold and 2 bronze?
CREATE TABLE table_name_29 (silver VARCHAR, bronze VARCHAR, gold VARCHAR)
SELECT player FROM table_name_97 WHERE total = 147 AND country = "spain"
What player has a 147 total from Spain?
CREATE TABLE table_name_97 (player VARCHAR, total VARCHAR, country VARCHAR)
SELECT opponent FROM table_name_5 WHERE date = "april 24"
Name the opponent for april 24
CREATE TABLE table_name_5 (opponent VARCHAR, date VARCHAR)
SELECT SUM(wins) FROM table_name_55 WHERE losses < 4 AND goals_against > 20
What is the sum of wins and the sum of losses less than 4 for teams larger than 20?
CREATE TABLE table_name_55 (wins INTEGER, losses VARCHAR, goals_against VARCHAR)
SELECT employed FROM table_name_74 WHERE position_held = "mathematics & prefect master"
What are the years employed shown for mathematics & prefect master?
CREATE TABLE table_name_74 (employed VARCHAR, position_held VARCHAR)
SELECT MIN(rank) FROM table_name_1 WHERE games = 12 AND rebounds < 48
What's the lowest amount of 12 games and less than 48 rebounds?
CREATE TABLE table_name_1 (rank INTEGER, games VARCHAR, rebounds VARCHAR)
SELECT result FROM table_name_15 WHERE date = "october 1, 1989"
What was the result on October 1, 1989?
CREATE TABLE table_name_15 (result VARCHAR, date VARCHAR)
SELECT COUNT(overall) FROM table_name_30 WHERE name = "bob anderson"
How much Overall has a Name of bob anderson?
CREATE TABLE table_name_30 (overall VARCHAR, name VARCHAR)
SELECT SUM(episode) FROM table_name_96 WHERE performer_4 = "chip esten" AND performer_1 = "jim meskimen"
What is the sum of the episodes where chip esten was the 4th performer and jim meskimen was the 1st performer?
CREATE TABLE table_name_96 (episode INTEGER, performer_4 VARCHAR, performer_1 VARCHAR)
SELECT emit__nm_ FROM table_name_6 WHERE absorb__nm_ = "593"
Which Emission (in nanometers) has an absorbtion of 593 nm?
CREATE TABLE table_name_6 (emit__nm_ VARCHAR, absorb__nm_ VARCHAR)
SELECT MIN(silver) FROM table_name_76 WHERE rank = 1 AND bronze > 5
What is the lowest silver that has 1 as the rank, with a bronze greater than 5?
CREATE TABLE table_name_76 (silver INTEGER, rank VARCHAR, bronze VARCHAR)
SELECT MIN(number) FROM table_name_90 WHERE hometown = "bellwood, il"
What is the lowest number of the player with a hometown of Bellwood, IL?
CREATE TABLE table_name_90 (number INTEGER, hometown VARCHAR)
SELECT SUM(total) FROM table_name_70 WHERE bronze > 12 AND silver > 772 AND country = "thailand"
Which Total has a Bronze larger than 12, and a Silver larger than 772, and a Country of thailand?
CREATE TABLE table_name_70 (total INTEGER, country VARCHAR, bronze VARCHAR, silver VARCHAR)
SELECT district FROM table_2668243_8 WHERE incumbent = "Joseph Lecompte"
What district is Joseph Lecompte in office in?
CREATE TABLE table_2668243_8 (district VARCHAR, incumbent VARCHAR)
SELECT country FROM table_name_79 WHERE population__2011_est_ = "3,221,216"
Which country has a population of 3,221,216?
CREATE TABLE table_name_79 (country VARCHAR, population__2011_est_ VARCHAR)
SELECT visa_3 FROM table_name_70 WHERE visa_4 = "youssouf hersi"
Which Visa 3 has a Visa 4 of youssouf hersi?
CREATE TABLE table_name_70 (visa_3 VARCHAR, visa_4 VARCHAR)
SELECT nationality FROM table_name_13 WHERE ranking = "3"
What was the nationality of the player ranking 3?
CREATE TABLE table_name_13 (nationality VARCHAR, ranking VARCHAR)
SELECT COUNT(episode_no) FROM table_21025437_2 WHERE written_by = "Kirstie Falkous & John Regier"
How many episodes were written by Kirstie Falkous & John Regier?
CREATE TABLE table_21025437_2 (episode_no VARCHAR, written_by VARCHAR)
SELECT score FROM table_name_73 WHERE player = "billy andrade"
What is the score for Billy Andrade?
CREATE TABLE table_name_73 (score VARCHAR, player VARCHAR)
SELECT rider FROM table_name_37 WHERE total_points < 342 AND rides < 76 AND matches = 7 AND bonus_pts > 2
Which rider had less than 342 points in no more than 76 rides in 7 matches with more than 2 bonus points?
CREATE TABLE table_name_37 (rider VARCHAR, bonus_pts VARCHAR, matches VARCHAR, total_points VARCHAR, rides VARCHAR)
SELECT premiere FROM table_name_36 WHERE episodes > 15
Which premiere had more than 15 episodes?
CREATE TABLE table_name_36 (premiere VARCHAR, episodes INTEGER)
SELECT builder FROM table_name_98 WHERE name = "uss cambridge"
Who was the builder for the USS cambridge?
CREATE TABLE table_name_98 (builder VARCHAR, name VARCHAR)
SELECT opponent FROM table_name_35 WHERE attendance = "65,554"
Who was the opposing team in the game attended by 65,554?
CREATE TABLE table_name_35 (opponent VARCHAR, attendance VARCHAR)
SELECT location FROM table_name_81 WHERE year = "2013" AND country = "egypt"
What is the location for Egypt in 2013?
CREATE TABLE table_name_81 (location VARCHAR, year VARCHAR, country VARCHAR)
SELECT july FROM table_name_8 WHERE february = "linda forsythe"
Who is in July where February is linda forsythe?
CREATE TABLE table_name_8 (july VARCHAR, february VARCHAR)
SELECT constellation FROM table_name_19 WHERE ngc_number < 5457
What is the name of the constellation that has a NGC number smaller tha 5457?
CREATE TABLE table_name_19 (constellation VARCHAR, ngc_number INTEGER)
SELECT COUNT(stage) FROM table_15088557_1 WHERE winner = "Jose Vicente Garcia Acosta"
In how many stages did Jose Vicente Garcia Acosta won?
CREATE TABLE table_15088557_1 (stage VARCHAR, winner VARCHAR)
SELECT date FROM table_name_93 WHERE away_team = "essendon"
What is the date when the away team is essendon?
CREATE TABLE table_name_93 (date VARCHAR, away_team VARCHAR)
SELECT for_shank_type FROM table_28652521_1 WHERE storage_case = "red plastic box"
What's the shank type of the buttonholer with red plastic box as storage case?
CREATE TABLE table_28652521_1 (for_shank_type VARCHAR, storage_case VARCHAR)
SELECT stadium FROM table_name_35 WHERE final_score = "20-10"
Name the stadium with final score of 20-10
CREATE TABLE table_name_35 (stadium VARCHAR, final_score VARCHAR)
SELECT country FROM table_name_72 WHERE time = "6:55.23"
What country had a 6:55.23 time?
CREATE TABLE table_name_72 (country VARCHAR, time VARCHAR)
SELECT document_id FROM Paragraphs GROUP BY document_id HAVING COUNT(*) >= 2
List all document ids with at least two paragraphs.
CREATE TABLE Paragraphs (document_id VARCHAR)
SELECT no_by_series FROM table_23958944_6 WHERE no_by_season = 19
Name the number of series for 19
CREATE TABLE table_23958944_6 (no_by_series VARCHAR, no_by_season VARCHAR)
SELECT title FROM table_20726262_2 WHERE directedby = "Paris Barclay"
What title episode did Paris Barclay direct?
CREATE TABLE table_20726262_2 (title VARCHAR, directedby VARCHAR)
SELECT date FROM table_name_59 WHERE catalogue__number = "ptcd-1015-6"
What is the date with the catalogue number ptcd-1015-6?
CREATE TABLE table_name_59 (date VARCHAR, catalogue__number VARCHAR)
SELECT loss FROM table_name_32 WHERE score = "postponed (rain) rescheduled for june 27"
Score of postponed (rain) rescheduled for June 27 had what loss?
CREATE TABLE table_name_32 (loss VARCHAR, score VARCHAR)