answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT AVG(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = "Republican"
What is the average number of votes of representatives from party "Republican"?
CREATE TABLE election (Votes INTEGER, Representative_ID VARCHAR); CREATE TABLE representative (Representative_ID VARCHAR, Party VARCHAR)
SELECT COUNT(round) FROM table_name_49 WHERE pick__number = 129
What is the total round of the 129 pick?
CREATE TABLE table_name_49 (round VARCHAR, pick__number VARCHAR)
SELECT record FROM table_27744976_10 WHERE team = "Indiana"
What was the rocket's record when they played against Indiana?
CREATE TABLE table_27744976_10 (record VARCHAR, team VARCHAR)
SELECT name__birth_death_ FROM table_name_79 WHERE left_office = "7 october 1958"
What is Name (Birth-Death), when Left Office is 7 October 1958?
CREATE TABLE table_name_79 (name__birth_death_ VARCHAR, left_office VARCHAR)
SELECT tournament FROM table_name_86 WHERE date = "october 14, 2007"
Which tournament was held on October 14, 2007?
CREATE TABLE table_name_86 (tournament VARCHAR, date VARCHAR)
SELECT passed FROM table_256286_22 WHERE _percentage_yes = "52.49%"
What was the result of the ballot that had a 52.49% yes vote percentage?
CREATE TABLE table_256286_22 (passed VARCHAR, _percentage_yes VARCHAR)
SELECT venue FROM table_name_3 WHERE home_team = "footscray"
Which Venue has Footscray as it's Home team?
CREATE TABLE table_name_3 (venue VARCHAR, home_team VARCHAR)
SELECT COUNT(rank) FROM table_name_57 WHERE location = "pigeon forge, tennessee" AND category = "best food"
What is the rank of the park in pigeon forge, tennessee in the best food category?
CREATE TABLE table_name_57 (rank VARCHAR, location VARCHAR, category VARCHAR)
SELECT date FROM table_name_79 WHERE record = "21-25"
On what date was the record 21-25?
CREATE TABLE table_name_79 (date VARCHAR, record VARCHAR)
SELECT type FROM table_name_45 WHERE aircraft = "casa c-212 aviocar"
What aircraft type is the Casa C-212 Aviocar?
CREATE TABLE table_name_45 (type VARCHAR, aircraft VARCHAR)
SELECT socket FROM table_name_28 WHERE part_number_s_ = "80526pz533256"
What kind of socket is on the microprocessor with a part number of 80526pz533256?
CREATE TABLE table_name_28 (socket VARCHAR, part_number_s_ VARCHAR)
SELECT platform_s_ FROM table_name_33 WHERE developer_s_ = "rockstar games"
What's the platform that has Rockstar Games as the developer?
CREATE TABLE table_name_33 (platform_s_ VARCHAR, developer_s_ VARCHAR)
SELECT COUNT(clock_rate__mhz_) FROM table_142573_1 WHERE bandwidth__mb_s_ = 2400
Name the number of clock rate mhz when bandwidth mb/s is 2400
CREATE TABLE table_142573_1 (clock_rate__mhz_ VARCHAR, bandwidth__mb_s_ VARCHAR)
SELECT AVG(played) FROM table_name_45 WHERE points < 18 AND position < 8
What is the mean number of played when there are less than 18 points and the position is less than 8?
CREATE TABLE table_name_45 (played INTEGER, points VARCHAR, position VARCHAR)
SELECT team_f FROM table_name_16 WHERE team_a = "aida gagaring"
Who is team f when Aida Gagaring is team A?
CREATE TABLE table_name_16 (team_f VARCHAR, team_a VARCHAR)
SELECT MAX(T2.gradepoint), MIN(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = "NYC"
What is the maximum and minimum grade point of students who live in NYC?
CREATE TABLE ENROLLED_IN (Grade VARCHAR, StuID VARCHAR); CREATE TABLE STUDENT (city_code VARCHAR, StuID VARCHAR); CREATE TABLE GRADECONVERSION (gradepoint INTEGER, lettergrade VARCHAR)
SELECT MIN(score) FROM table_name_97 WHERE player = "jack nicklaus"
What was Jack Nicklaus's score after round 1?
CREATE TABLE table_name_97 (score INTEGER, player VARCHAR)
SELECT name FROM accounts ORDER BY name
List all customers’ names in the alphabetical order.
CREATE TABLE accounts (name VARCHAR)
SELECT date FROM table_1231316_5 WHERE nation = "Nigeria"
Nigeria competed on July2, 1999.
CREATE TABLE table_1231316_5 (date VARCHAR, nation VARCHAR)
SELECT school_club_team FROM table_15463188_17 WHERE name = "Mark Sanford"
Which school/club team has a player named Mark Sanford?
CREATE TABLE table_15463188_17 (school_club_team VARCHAR, name VARCHAR)
SELECT SUM(stu_hrs), dept_code FROM student GROUP BY dept_code
Find the total number of hours have done for all students in each department.
CREATE TABLE student (dept_code VARCHAR, stu_hrs INTEGER)
SELECT nhl_team FROM table_1013129_10 WHERE position = "Centre" AND pick < 243.0
Position in nhl team centre are all smaller pick than 243.0
CREATE TABLE table_1013129_10 (nhl_team VARCHAR, position VARCHAR, pick VARCHAR)
SELECT MIN(year) FROM table_name_24 WHERE notes = "5.19km, 18controls"
What is the lowest Year, when Notes is "5.19km, 18controls"?
CREATE TABLE table_name_24 (year INTEGER, notes VARCHAR)
SELECT airport FROM table_name_35 WHERE country = "egypt" AND icao = "heba"
What is Airport, when Country is "Egypt", and when ICAO is "Heba"?
CREATE TABLE table_name_35 (airport VARCHAR, country VARCHAR, icao VARCHAR)
SELECT AVG(goals) FROM table_name_43 WHERE latest_cap = "april 24, 2013" AND caps > 97
How many goals are associated with over 97 caps and a Latest cap of april 24, 2013?
CREATE TABLE table_name_43 (goals INTEGER, latest_cap VARCHAR, caps VARCHAR)
SELECT club FROM table_name_51 WHERE name = "guus hiddink"
What club had Guus Hiddink as outgoing manager?
CREATE TABLE table_name_51 (club VARCHAR, name VARCHAR)
SELECT genre FROM table_name_32 WHERE game = "portal 2"
What is the genre for Portal 2?
CREATE TABLE table_name_32 (genre VARCHAR, game VARCHAR)
SELECT COUNT(block) FROM table_name_41 WHERE spike < 341 AND weight > 82 AND name = "theodoros baev"
What is the total number of Block(s), when Spike is less than 341, when Weight is greater than 82, and when Name is Theodoros Baev?
CREATE TABLE table_name_41 (block VARCHAR, name VARCHAR, spike VARCHAR, weight VARCHAR)
SELECT name FROM table_26916717_1 WHERE home_town = "Purcell, OK"
What is the name of the player from purcell, ok?
CREATE TABLE table_26916717_1 (name VARCHAR, home_town VARCHAR)
SELECT MAX(SHARE), MIN(SHARE) FROM TV_series
What is minimum and maximum share of TV series?
CREATE TABLE TV_series (SHARE INTEGER)
SELECT opponent FROM table_name_77 WHERE date = "april 28"
Who was the opponent when the Phillies played on April 28?
CREATE TABLE table_name_77 (opponent VARCHAR, date VARCHAR)
SELECT winner AS Men FROM table_name_92 WHERE season = "1992/93"
Who had the men's win in the 1992/93 season?
CREATE TABLE table_name_92 (winner VARCHAR, season VARCHAR)
SELECT SUM(goals_scored) FROM table_name_44 WHERE draw < 8 AND points = 19 AND goals_conceded > 26
what is the goals scored when draw is less than 8, points is 19 and goals conceded is more than 26?
CREATE TABLE table_name_44 (goals_scored INTEGER, goals_conceded VARCHAR, draw VARCHAR, points VARCHAR)
SELECT COUNT(high_points) FROM table_27713583_2 WHERE date = "October 17"
How many games were on october 17?
CREATE TABLE table_27713583_2 (high_points VARCHAR, date VARCHAR)
SELECT cause_of_loss FROM table_18933037_3 WHERE bomb_capacity = "27 GP H-E bombs"
When 27 gp h-e bombs the capacity of the bomb what is the cause of loss?
CREATE TABLE table_18933037_3 (cause_of_loss VARCHAR, bomb_capacity VARCHAR)
SELECT trofeo_fast_team FROM table_name_34 WHERE stage = "19"
What is the Trofeo Fast Team when stage is 19?
CREATE TABLE table_name_34 (trofeo_fast_team VARCHAR, stage VARCHAR)
SELECT COUNT(year) FROM table_11680175_1 WHERE Neu - vehlefanz = 365
How many years where Neu-Vehlefanz had a number of 365?
CREATE TABLE table_11680175_1 (year VARCHAR, Neu VARCHAR, vehlefanz VARCHAR)
SELECT MAX(grid) FROM table_name_67 WHERE name = "jamie whincup"
What is the highest Grid with a Name that is jamie whincup?
CREATE TABLE table_name_67 (grid INTEGER, name VARCHAR)
SELECT player FROM table_name_71 WHERE country = "united states" AND place = "t6" AND score = 67 - 69 = 136
What player placed t6 for the United States with a score of 67-69=136?
CREATE TABLE table_name_71 (player VARCHAR, country VARCHAR, place VARCHAR, score VARCHAR)
SELECT MAX(gold) FROM table_name_23 WHERE silver < 1 AND total < 0
What is listed as the highest Gold that also has a Silver that's smaller than 1, and has a Total that's smaller than 0?
CREATE TABLE table_name_23 (gold INTEGER, silver VARCHAR, total VARCHAR)
SELECT european FROM table_name_59 WHERE play_off = "relegated"
Which European has a Play-Off of relegated?
CREATE TABLE table_name_59 (european VARCHAR, play_off VARCHAR)
SELECT astc_member FROM table_name_39 WHERE state = "arkansas" AND aam_member = "no" AND aam_accredited = "yes"
What is ASTC Member, when State is Arkansas, when AAM Member is No, and when AAM Accredited is Yes?
CREATE TABLE table_name_39 (astc_member VARCHAR, aam_accredited VARCHAR, state VARCHAR, aam_member VARCHAR)
SELECT smoke_point FROM table_name_97 WHERE total_fat = "100g" AND monounsaturated_fat = "46g"
What is the smoke point with a total fat of 100g, and monounsaturated fat of 46g?
CREATE TABLE table_name_97 (smoke_point VARCHAR, total_fat VARCHAR, monounsaturated_fat VARCHAR)
SELECT attendance FROM table_name_61 WHERE record = "34-51"
Name the attendance with record of 34-51
CREATE TABLE table_name_61 (attendance VARCHAR, record VARCHAR)
SELECT position FROM table_name_69 WHERE team_from = "aik"
What is the position of the team player from Aik?
CREATE TABLE table_name_69 (position VARCHAR, team_from VARCHAR)
SELECT AVG(episodes) FROM table_name_70 WHERE region_1_release = "september 11, 2007"
What is the average episode that has September 11, 2007 as a region 1?
CREATE TABLE table_name_70 (episodes INTEGER, region_1_release VARCHAR)
SELECT MAX(rank) FROM table_name_45 WHERE population_density___km_2__ > 5.7 AND _percentage_growth__2006_11_ = "5.7%"
What was the highest rank of an area with a population density larger than 5.7 and a 2006–2011 percentage growth of 5.7%?
CREATE TABLE table_name_45 (rank INTEGER, population_density___km_2__ VARCHAR, _percentage_growth__2006_11_ VARCHAR)
SELECT economic_class FROM table_name_77 WHERE barangay = "imelda bliss village"
Which Economic Class has a Barangay of imelda bliss village?
CREATE TABLE table_name_77 (economic_class VARCHAR, barangay VARCHAR)
SELECT congress FROM table_14158567_1 WHERE member_elect = "Richard P. Giles"
What edition of congress for member-elect richard p. giles?
CREATE TABLE table_14158567_1 (congress VARCHAR, member_elect VARCHAR)
SELECT f_laps FROM table_25369796_1 WHERE team = "HBR Motorsport"
What was the recorded flaps of HBR Motorsport team?
CREATE TABLE table_25369796_1 (f_laps VARCHAR, team VARCHAR)
SELECT metlink_code FROM table_3005450_1 WHERE opened = "1908"
what is the metlink code that opened in 1908?
CREATE TABLE table_3005450_1 (metlink_code VARCHAR, opened VARCHAR)
SELECT date FROM table_name_46 WHERE opponents = "raffaella bindi biljana pawlowa-dimitrova"
Tell me the date for opponents of raffaella bindi biljana pawlowa-dimitrova
CREATE TABLE table_name_46 (date VARCHAR, opponents VARCHAR)
SELECT COUNT(points) FROM table_name_2 WHERE chassis = "tf103"
Tell me the total number of points with chassis of tf103
CREATE TABLE table_name_2 (points VARCHAR, chassis VARCHAR)
SELECT SUM(losses) FROM table_name_26 WHERE goal_difference < -2 AND club = "cd sabadell" AND played > 38
How many losses are there in the CD Sabadell club with a goal difference less than -2, and more than 38 played?
CREATE TABLE table_name_26 (losses INTEGER, played VARCHAR, goal_difference VARCHAR, club VARCHAR)
SELECT SUM(rank) FROM table_name_93 WHERE director = "martin brest"
WHAT IS THE RANK OF MARTIN BREST?
CREATE TABLE table_name_93 (rank INTEGER, director VARCHAR)
SELECT Name FROM country WHERE Continent = "Asia" ORDER BY LifeExpectancy LIMIT 1
What is the name of country that has the shortest life expectancy in Asia?
CREATE TABLE country (Name VARCHAR, Continent VARCHAR, LifeExpectancy VARCHAR)
SELECT name FROM table_name_47 WHERE only_point > 1 AND catch_taken > 3 AND bonus > 4 AND total_point < 30
What is Name, when Only Point is greater than 1, when Catch Taken is greater than 3, when Bonus is greater than 4, and when Total Point is less than 30?
CREATE TABLE table_name_47 (name VARCHAR, total_point VARCHAR, bonus VARCHAR, only_point VARCHAR, catch_taken VARCHAR)
SELECT year FROM table_name_7 WHERE award = "17th bangkok critics assembly awards" AND category = "best original score"
Which Year has an Award of 17th bangkok critics assembly awards, and a Category of best original score?
CREATE TABLE table_name_7 (year VARCHAR, award VARCHAR, category VARCHAR)
SELECT language FROM table_name_24 WHERE points > 119 AND place > 5
what is the language when the points is more than 119 and the place is higher than 5?
CREATE TABLE table_name_24 (language VARCHAR, points VARCHAR, place VARCHAR)
SELECT MIN(no_in_series) FROM table_13273629_2 WHERE written_by = "Elizabeth Devine"
What's the series number of the episode that's written by Elizabeth Devine?
CREATE TABLE table_13273629_2 (no_in_series INTEGER, written_by VARCHAR)
SELECT COUNT(weight) FROM table_name_80 WHERE pos = "g" AND team = "los angeles d-fenders"
What is the total weight of players who play the G position for the Los Angeles D-Fenders?
CREATE TABLE table_name_80 (weight VARCHAR, pos VARCHAR, team VARCHAR)
SELECT year FROM table_name_70 WHERE chassis = "kurtis kraft 500g"
Which year did Ray Crawford the Kurtis Kraft 500g chassis?
CREATE TABLE table_name_70 (year VARCHAR, chassis VARCHAR)
SELECT general_classification FROM table_29077342_19 WHERE winner = "Mauricio Soler"
Name the general classification for mauricio soler
CREATE TABLE table_29077342_19 (general_classification VARCHAR, winner VARCHAR)
SELECT MIN(year) FROM table_name_55 WHERE wins < 0
What is the earliest year associated with under 0 wins?
CREATE TABLE table_name_55 (year INTEGER, wins INTEGER)
SELECT MIN(brup) FROM table_26176081_29 WHERE long = 94
What is the lowest brup when long is 94?
CREATE TABLE table_26176081_29 (brup INTEGER, long VARCHAR)
SELECT candidates FROM table_1341930_33 WHERE party = "Democratic" AND district = "North Carolina 1"
what's the candidates with party being democratic and dbeingtrict being north carolina 1
CREATE TABLE table_1341930_33 (candidates VARCHAR, party VARCHAR, district VARCHAR)
SELECT place FROM table_name_3 WHERE to_par = "e" AND player = "mark wiebe"
What place has E as the to par, with Mark Wiebe as the player?
CREATE TABLE table_name_3 (place VARCHAR, to_par VARCHAR, player VARCHAR)
SELECT date FROM table_name_95 WHERE record = "37-44"
What was the date of the game where the indians record was 37-44?
CREATE TABLE table_name_95 (date VARCHAR, record VARCHAR)
SELECT second_party FROM table_name_71 WHERE first_party = "conservative" AND election = "1834"
What is the second party that has a conservative first party in the 1834 election?
CREATE TABLE table_name_71 (second_party VARCHAR, first_party VARCHAR, election VARCHAR)
SELECT MIN(races) FROM table_25318033_1
What is the lowest amount of races?
CREATE TABLE table_25318033_1 (races INTEGER)
SELECT team FROM table_name_82 WHERE college = "santa clara"
What team has a player from Santa Clara?
CREATE TABLE table_name_82 (team VARCHAR, college VARCHAR)
SELECT colour_commentator_s_ FROM table_name_17 WHERE studio_host = "dave hodge" AND year = 1981
In 1981, with a studio host of Dave Hodge, who was the colour commentator?
CREATE TABLE table_name_17 (colour_commentator_s_ VARCHAR, studio_host VARCHAR, year VARCHAR)
SELECT MAX(grid) FROM table_name_70 WHERE time_retired = "gearbox" AND laps > 67
What is the highest grid when the race was retired due to the gearbox after 67 laps?
CREATE TABLE table_name_70 (grid INTEGER, time_retired VARCHAR, laps VARCHAR)
SELECT MAX(ends_lost) FROM table_name_2 WHERE shot_pct > 77 AND blank_ends = 11 AND stolen_ends = 7 AND ends_won > 44
What's the highest Ends Lost with a shot % greater than 77, 11 blank ends, 7 stolen ends, and more than 44 ends one?
CREATE TABLE table_name_2 (ends_lost INTEGER, ends_won VARCHAR, stolen_ends VARCHAR, shot_pct VARCHAR, blank_ends VARCHAR)
SELECT round FROM table_16741821_9 WHERE opponents = "Jesse Huta Galung Peter Wessels"
What is the name of the round against the opponents jesse huta galung peter wessels?
CREATE TABLE table_16741821_9 (round VARCHAR, opponents VARCHAR)
SELECT MIN(round) FROM table_name_20 WHERE record = "10-6"
Which Round has a Record of 10-6?
CREATE TABLE table_name_20 (round INTEGER, record VARCHAR)
SELECT outcome FROM table_name_4 WHERE year = 1887
what is the outcome for the 1887?
CREATE TABLE table_name_4 (outcome VARCHAR, year VARCHAR)
SELECT COUNT(nominee) FROM table_15162479_8 WHERE net_vote = "15.17%"
How many nominees had a net voice of 15.17%
CREATE TABLE table_15162479_8 (nominee VARCHAR, net_vote VARCHAR)
SELECT country FROM table_name_64 WHERE player = "scott verplank"
What country has player Scott Verplank?
CREATE TABLE table_name_64 (country VARCHAR, player VARCHAR)
SELECT career_sr FROM table_name_43 WHERE 1985 = "1r"
What is the career SR with a 1r in 1985?
CREATE TABLE table_name_43 (career_sr VARCHAR)
SELECT MIN(points) FROM table_name_18 WHERE october < 10 AND game < 2
What is the lowest number of points of the game before game 2 before October 10?
CREATE TABLE table_name_18 (points INTEGER, october VARCHAR, game VARCHAR)
SELECT transfer_window FROM table_name_55 WHERE status = "loan ended"
What is the transfer window for the player whose status was loan ended?
CREATE TABLE table_name_55 (transfer_window VARCHAR, status VARCHAR)
SELECT recopa_sudamericana_1996 FROM table_name_7 WHERE team = "corinthians"
What is the recoupa sudamericana 1996 result of team corinthians?
CREATE TABLE table_name_7 (recopa_sudamericana_1996 VARCHAR, team VARCHAR)
SELECT MIN(height) FROM table_name_52 WHERE player = "stephen arigbabu"
What is stephen arigbabu's height?
CREATE TABLE table_name_52 (height INTEGER, player VARCHAR)
SELECT opponent FROM table_name_37 WHERE result = "loss" AND location = "westbury, ny"
Who was the opponent with the loss in Westbury, NY?
CREATE TABLE table_name_37 (opponent VARCHAR, result VARCHAR, location VARCHAR)
SELECT MIN(round) FROM table_name_3 WHERE player = "orlando pace"
What lowest round has orlando pace as the player?
CREATE TABLE table_name_3 (round INTEGER, player VARCHAR)
SELECT SUM(long) FROM table_name_19 WHERE loss > 24 AND gain > 273 AND avg_g = 207.8
What's the total long for more than 24 loss, a gain over 273, and an avg/g of 207.8?
CREATE TABLE table_name_19 (long INTEGER, avg_g VARCHAR, loss VARCHAR, gain VARCHAR)
SELECT COUNT(*) FROM people WHERE is_male = 'F' AND age > 30
How many female people are older than 30 in our record?
CREATE TABLE people (is_male VARCHAR, age VARCHAR)
SELECT MAX(area__km²_) FROM table_1067441_1 WHERE density = "331.4"
What is the area of the place that has a population density of 331.4?
CREATE TABLE table_1067441_1 (area__km²_ INTEGER, density VARCHAR)
SELECT name FROM ship ORDER BY built_year, CLASS
List all ship names in the order of built year and class.
CREATE TABLE ship (name VARCHAR, built_year VARCHAR, CLASS VARCHAR)
SELECT date FROM table_name_62 WHERE visiting_team = "cleveland browns"
When were the Cleveland Browns the visiting team?
CREATE TABLE table_name_62 (date VARCHAR, visiting_team VARCHAR)
SELECT score FROM table_name_74 WHERE game = 75
What's the Score for the Game of 75?
CREATE TABLE table_name_74 (score VARCHAR, game VARCHAR)
SELECT MIN(wins) FROM table_name_55 WHERE points > 46 AND rank = "10th"
What is the lowest wins with points larger than 46, and a rank of 10th?
CREATE TABLE table_name_55 (wins INTEGER, points VARCHAR, rank VARCHAR)
SELECT MAX(goals) FROM table_name_29 WHERE debut_year = 1902 AND player = "jack trehey" AND games < 1
What are the most goals listed when Jack Trehey was the player, with the listed debut year of 1902, games less than 1?
CREATE TABLE table_name_29 (goals INTEGER, games VARCHAR, debut_year VARCHAR, player VARCHAR)
SELECT name FROM table_name_60 WHERE area = "kio kio"
What School is in the kio kio area?
CREATE TABLE table_name_60 (name VARCHAR, area VARCHAR)
SELECT launched FROM table_name_17 WHERE spacecraft = "mariner 4"
What launched has mariner 4 as the spacecraft?
CREATE TABLE table_name_17 (launched VARCHAR, spacecraft VARCHAR)
SELECT MIN(gold) FROM table_name_34 WHERE bronze > 6
Which Gold has a Bronze larger than 6?
CREATE TABLE table_name_34 (gold INTEGER, bronze INTEGER)
SELECT MIN(apparent_magnitude) FROM table_name_67 WHERE declination___j2000__ = "°39′45″"
What is the Apparent magnitude of a Declination (J2000) of °39′45″?
CREATE TABLE table_name_67 (apparent_magnitude INTEGER, declination___j2000__ VARCHAR)
SELECT type FROM table_262527_1 WHERE joined = "1902 5"
what type was joined in 1902 5?
CREATE TABLE table_262527_1 (type VARCHAR, joined VARCHAR)
SELECT score FROM table_name_1 WHERE outcome = "runner-up" AND partner = "elizabeth little"
What is the Score with an Outcome of runner-up, and a Partner that is elizabeth little?
CREATE TABLE table_name_1 (score VARCHAR, outcome VARCHAR, partner VARCHAR)