answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT COUNT(incumbent) FROM table_1341690_21 WHERE candidates = "Paul Tsongas (D) 60.6% Paul W. Cronin (R) 39.4%"
How many times was the candidates paul tsongas (d) 60.6% paul w. cronin (r) 39.4%?
CREATE TABLE table_1341690_21 (incumbent VARCHAR, candidates VARCHAR)
SELECT MAX(time) FROM table_name_39 WHERE heat < 1
What is a highest time for the heat smaller than 1?
CREATE TABLE table_name_39 (time INTEGER, heat INTEGER)
SELECT 5 AS _credits FROM table_name_58 WHERE hand = "full house"
What does full house have as a 5 credits?
CREATE TABLE table_name_58 (hand VARCHAR)
SELECT school_club_team FROM table_name_38 WHERE round > 13 AND overall = 384
What school/club team did the player who was drafted after round 13 with an overall rank of 384 play for?
CREATE TABLE table_name_38 (school_club_team VARCHAR, round VARCHAR, overall VARCHAR)
SELECT s_motor_ship___s_naval_trawler FROM table_name_13 WHERE grand_total = 20
How many ships for the nation with grand total of 20?
CREATE TABLE table_name_13 (s_motor_ship___s_naval_trawler VARCHAR, grand_total VARCHAR)
SELECT MIN(assumed_office) FROM table_name_60 WHERE name = "madeleine bordallo"
Tell me the loewst assume office for madeleine bordallo
CREATE TABLE table_name_60 (assumed_office INTEGER, name VARCHAR)
SELECT artist FROM table_name_40 WHERE year < 2010
Which artist created coins before 2010?
CREATE TABLE table_name_40 (artist VARCHAR, year INTEGER)
SELECT COUNT(DISTINCT school_code) FROM department
how many schools exist in total?
CREATE TABLE department (school_code VARCHAR)
SELECT location_attendance FROM table_27713030_3 WHERE date = "October 18"
What is the location and attendance on October 18?
CREATE TABLE table_27713030_3 (location_attendance VARCHAR, date VARCHAR)
SELECT T2.name, T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT MIN(hours) FROM projects)
Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it.
CREATE TABLE scientists (name VARCHAR, SSN VARCHAR); CREATE TABLE assignedto (project VARCHAR, scientist VARCHAR); CREATE TABLE projects (name VARCHAR, code VARCHAR, hours INTEGER); CREATE TABLE projects (hours INTEGER)
SELECT SUM(wins) FROM table_name_15 WHERE player = "greg norman"
How many wins does Greg Norman have?
CREATE TABLE table_name_15 (wins INTEGER, player VARCHAR)
SELECT manner_of_departure FROM table_11206916_2 WHERE date_of_appointment = "13 March 2008"
What manner of departure is listed with an appointment date of 13 march 2008
CREATE TABLE table_11206916_2 (manner_of_departure VARCHAR, date_of_appointment VARCHAR)
SELECT result FROM table_name_14 WHERE competition = "1994 fifa world cup qualification" AND date = "may 15, 1993"
What's the Result for the Competition of 1994 FIFA World Cup Qualification, with the Date of May 15, 1993?
CREATE TABLE table_name_14 (result VARCHAR, competition VARCHAR, date VARCHAR)
SELECT AVG(founded) FROM table_name_87 WHERE coach = "unknown" AND location = "enfield"
What is the average year that the club located in enfield was founded with an unknown coach?
CREATE TABLE table_name_87 (founded INTEGER, coach VARCHAR, location VARCHAR)
SELECT decision FROM table_name_18 WHERE date = "november 26"
What was the decision on November 26?
CREATE TABLE table_name_18 (decision VARCHAR, date VARCHAR)
SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct <> "null" OR department_id <> 40
display all the information of employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40.
CREATE TABLE employees (department_id VARCHAR, salary VARCHAR, commission_pct VARCHAR)
SELECT points FROM table_name_34 WHERE points_for = "381"
Which Points has a Points for of 381?
CREATE TABLE table_name_34 (points VARCHAR, points_for VARCHAR)
SELECT player FROM table_name_97 WHERE money___£__ = "140,000"
Who is the player with £140,000?
CREATE TABLE table_name_97 (player VARCHAR, money___£__ VARCHAR)
SELECT opponent FROM table_name_86 WHERE score = "7–1"
What team was the opponent when the score was 7–1?
CREATE TABLE table_name_86 (opponent VARCHAR, score VARCHAR)
SELECT score FROM table_name_11 WHERE decision = "toivonen" AND record = "18–14–4"
What was the score when the record was 18–14–4 with a toivonen decision?
CREATE TABLE table_name_11 (score VARCHAR, decision VARCHAR, record VARCHAR)
SELECT AVG(points) FROM table_name_51 WHERE against < 16
What is the Points with an Against smaller than 16?
CREATE TABLE table_name_51 (points INTEGER, against INTEGER)
SELECT MIN(highest_score) FROM table_name_72 WHERE dance = "quickstep" AND lowest_score < 16
What is the lowest of the Highest score for the Quickstep Dance and the Lowest score under 16?
CREATE TABLE table_name_72 (highest_score INTEGER, dance VARCHAR, lowest_score VARCHAR)
SELECT performer_2 FROM table_name_83 WHERE performer_4 = "josie lawrence" AND date = "9 april 1993"
Who is performer 2 of the episode on 9 April 1993 with Josie Lawrence as performer 4?
CREATE TABLE table_name_83 (performer_2 VARCHAR, performer_4 VARCHAR, date VARCHAR)
SELECT title FROM table_16090262_1 WHERE no_in_season = 4
Which title was No. 4 in season?
CREATE TABLE table_16090262_1 (title VARCHAR, no_in_season VARCHAR)
SELECT call_sign FROM table_name_69 WHERE class = "a"
What is the call sign for a class of A?
CREATE TABLE table_name_69 (call_sign VARCHAR, class VARCHAR)
SELECT player FROM table_name_12 WHERE to_par = "+1" AND score = 73 - 71 - 73 = 217
What Player's had a To par of +1 and a Score of 73-71-73=217?
CREATE TABLE table_name_12 (player VARCHAR, to_par VARCHAR, score VARCHAR)
SELECT region FROM table_name_39 WHERE catalog = "mhcl-20004"
What Region is the MHCL-20004 Catalog?
CREATE TABLE table_name_39 (region VARCHAR, catalog VARCHAR)
SELECT AVG(runs) FROM table_name_70 WHERE innings = 40 AND not_outs > 6
What's the average amount of Runs that has 40 innings, and Not outs larger than 6?
CREATE TABLE table_name_70 (runs INTEGER, innings VARCHAR, not_outs VARCHAR)
SELECT 2007 FROM table_name_53 WHERE 2008 = "1r" AND tournament = "wimbledon"
Which 2007 has a 2008 of 1r, and a Tournament of wimbledon?
CREATE TABLE table_name_53 (tournament VARCHAR)
SELECT COUNT(release_date) FROM table_name_7 WHERE country = "canada"
How many release dates has Canada had?
CREATE TABLE table_name_7 (release_date VARCHAR, country VARCHAR)
SELECT head_coach FROM table_name_53 WHERE location = "mudgeeraba"
Who is the head coach of the team located in Mudgeeraba?
CREATE TABLE table_name_53 (head_coach VARCHAR, location VARCHAR)
SELECT COUNT(november_3) FROM table_25355501_2 WHERE january_15_16 = "141"
How many entries are shown for november 3 when january 15-16 is 141?
CREATE TABLE table_25355501_2 (november_3 VARCHAR, january_15_16 VARCHAR)
SELECT MAX(seats_2006) FROM table_name_64 WHERE _percentage_2001 = 39 AND seats_2001 < 12
what is the seats 2006 total with %2001 of 39 and seats 2001 less than 12?
CREATE TABLE table_name_64 (seats_2006 INTEGER, _percentage_2001 VARCHAR, seats_2001 VARCHAR)
SELECT 2011 FROM table_name_7 WHERE 2009 = "2r" AND tournament = "wimbledon"
Name the 2011 for 2009 being 2r at wimbledon
CREATE TABLE table_name_7 (tournament VARCHAR)
SELECT 2012 FROM table_name_86 WHERE 2011 = "28.9%"
What is listed for the 2012 that has a 2011 of 28.9%?
CREATE TABLE table_name_86 (Id VARCHAR)
SELECT date FROM table_name_95 WHERE points = 37
What date has 37 points?
CREATE TABLE table_name_95 (date VARCHAR, points VARCHAR)
SELECT COUNT(class_aAAAA) FROM table_14601528_2 WHERE school_year = "1988-89"
Name the number of class aaaaa for 1988-89
CREATE TABLE table_14601528_2 (class_aAAAA VARCHAR, school_year VARCHAR)
SELECT SUM(pick) FROM table_name_72 WHERE school = "mckinney high school"
What's the total number of picks for mckinney high school?
CREATE TABLE table_name_72 (pick INTEGER, school VARCHAR)
SELECT spacecraft FROM table_22385461_9 WHERE start___utc__ = "November 18, 2008 18:09"
If the start (utc) is November 18, 2008 18:09, what is the name of the spacecraft?
CREATE TABLE table_22385461_9 (spacecraft VARCHAR, start___utc__ VARCHAR)
SELECT COUNT(score) FROM table_name_15 WHERE player = "fred couples"
What was Fred Couples' score?
CREATE TABLE table_name_15 (score VARCHAR, player VARCHAR)
SELECT MAX(bronze) FROM table_name_13 WHERE nation = "united states" AND silver > 1
What is the highest number of bronze for the United States with more than 1 silver?
CREATE TABLE table_name_13 (bronze INTEGER, nation VARCHAR, silver VARCHAR)
SELECT date FROM table_name_78 WHERE athlete = "elvir krehmic"
What was the date that Elvir Krehmic made a high jump record?
CREATE TABLE table_name_78 (date VARCHAR, athlete VARCHAR)
SELECT COUNT(school_colors) FROM table_12434380_1 WHERE main_campus_location = "Highland"
How many school colors is there for the main campus location of highland?
CREATE TABLE table_12434380_1 (school_colors VARCHAR, main_campus_location VARCHAR)
SELECT home_team FROM table_name_56 WHERE venue = "arden street oval"
Which team's home is the Arden Street Oval?
CREATE TABLE table_name_56 (home_team VARCHAR, venue VARCHAR)
SELECT meet FROM table_name_56 WHERE event = "400m individual medley"
What meet had a 400m individual medley meet?
CREATE TABLE table_name_56 (meet VARCHAR, event VARCHAR)
SELECT state FROM table_name_91 WHERE name = "diamond lake" AND gnis_feature_id = 1579127
Which state has a Name of diamond lake, and a GNIS Feature ID of 1579127?
CREATE TABLE table_name_91 (state VARCHAR, name VARCHAR, gnis_feature_id VARCHAR)
SELECT pepe_michinoku FROM table_name_28 WHERE ryuji_hijikata = "sabin (12:33)"
What is the PEPE Michinoku value for a Ryuji Hijikata value of sabin (12:33)?
CREATE TABLE table_name_28 (pepe_michinoku VARCHAR, ryuji_hijikata VARCHAR)
SELECT points FROM table_17369472_2 WHERE tries_for = "84"
How many points were there when tries for were 84?
CREATE TABLE table_17369472_2 (points VARCHAR, tries_for VARCHAR)
SELECT COUNT(total) FROM table_name_93 WHERE silver > 8 AND bronze = 20 AND gold < 20
Which Total has a Silver larger than 8, and a Bronze of 20, and a Gold smaller than 20?
CREATE TABLE table_name_93 (total VARCHAR, gold VARCHAR, silver VARCHAR, bronze VARCHAR)
SELECT AVG(week) FROM table_name_88 WHERE attendance = 63 OFFSET 263
What's the mean week number when attendance was 63,263?
CREATE TABLE table_name_88 (week INTEGER, attendance VARCHAR)
SELECT area FROM table_name_54 WHERE name = "mangamahu primary school"
What is the area of Mangamahu primary school?
CREATE TABLE table_name_54 (area VARCHAR, name VARCHAR)
SELECT date FROM table_name_57 WHERE home = "chicago black hawks" AND record = "0–1"
When is Home of chicago black hawks has a Record of 0–1?
CREATE TABLE table_name_57 (date VARCHAR, home VARCHAR, record VARCHAR)
SELECT nationality FROM table_name_11 WHERE round = 1
What was the nationality for the player in Round 1?
CREATE TABLE table_name_11 (nationality VARCHAR, round VARCHAR)
SELECT AVG(pick) FROM table_name_63 WHERE college = "san diego state"
What is the average pick of San Diego State?
CREATE TABLE table_name_63 (pick INTEGER, college VARCHAR)
SELECT MAX(points) FROM table_name_64 WHERE position < 1
What is listed as the highest Points that's got a Position that's smaller than 1?
CREATE TABLE table_name_64 (points INTEGER, position INTEGER)
SELECT MIN(cuts_made) FROM table_name_90 WHERE top_10 < 11 AND top_5 > 2 AND top_25 < 6
Name the least cuts for top-5 more than 2 with top 25 less than 6 and top 10 less than 11
CREATE TABLE table_name_90 (cuts_made INTEGER, top_25 VARCHAR, top_10 VARCHAR, top_5 VARCHAR)
SELECT last_title FROM table_name_9 WHERE home_ground_[a_] = "sydney cricket ground"
When was the last title of the team with a home ground of Sydney cricket ground?
CREATE TABLE table_name_9 (last_title VARCHAR, home_ground_ VARCHAR, a_ VARCHAR)
SELECT AVG(played) FROM table_name_59 WHERE points = 12 AND against < 52
What is the number of games played for the team with 12 points and an against smaller than 52?
CREATE TABLE table_name_59 (played INTEGER, points VARCHAR, against VARCHAR)
SELECT fastest_lap FROM table_21321935_2 WHERE circuit = "Motorsport Arena Oschersleben"
Who had the fasted lap in motorsport arena oschersleben?
CREATE TABLE table_21321935_2 (fastest_lap VARCHAR, circuit VARCHAR)
SELECT team FROM table_name_9 WHERE score = "108-105 (ot)"
Which Team has a Score of 108-105 (ot)?
CREATE TABLE table_name_9 (team VARCHAR, score VARCHAR)
SELECT AVG(tournaments_played) FROM table_name_63 WHERE cuts_made = 14
what is the average tournaments played when cuts made is 14?
CREATE TABLE table_name_63 (tournaments_played INTEGER, cuts_made VARCHAR)
SELECT COUNT(against) FROM table_name_33 WHERE team = "hespanha" AND points < 30
How many Against have a Team of hespanha, and Points smaller than 30?
CREATE TABLE table_name_33 (against VARCHAR, team VARCHAR, points VARCHAR)
SELECT premiere_date FROM table_name_53 WHERE cycle < 2
What is Premier Date, when Cycle is less than 2?
CREATE TABLE table_name_53 (premiere_date VARCHAR, cycle INTEGER)
SELECT round FROM table_name_66 WHERE position = "sf/sg" AND year > 1965 AND player = "sly williams"
What round is sf/sg player sly williams from a year after 1965 from?
CREATE TABLE table_name_66 (round VARCHAR, player VARCHAR, position VARCHAR, year VARCHAR)
SELECT teaching_language FROM table_name_69 WHERE program = "master of quantitative finance"
What is the teaching language for Master of Quantitative Finance?
CREATE TABLE table_name_69 (teaching_language VARCHAR, program VARCHAR)
SELECT COUNT(_number_of_new_stations) FROM table_1817879_2 WHERE length__miles_ = "6.0"
How many new stations have a lenght (miles) of 6.0?
CREATE TABLE table_1817879_2 (_number_of_new_stations VARCHAR, length__miles_ VARCHAR)
SELECT nationality FROM table_22705586_1 WHERE name = "Francesco Guglielmi"
Name the nationality for francesco guglielmi
CREATE TABLE table_22705586_1 (nationality VARCHAR, name VARCHAR)
SELECT SUM(a_score) FROM table_name_54 WHERE e_score > 9.566 AND nation = "greece" AND t_score > 4
What was the quantity of the A Score when the E Score was larger than 9.566 in the Greece and the T score was more than 4?
CREATE TABLE table_name_54 (a_score INTEGER, t_score VARCHAR, e_score VARCHAR, nation VARCHAR)
SELECT written_by FROM table_27610775_1 WHERE prod_code = 211
Who wrote the episode with the production code 211?
CREATE TABLE table_27610775_1 (written_by VARCHAR, prod_code VARCHAR)
SELECT COUNT(district) FROM table_25030512_24 WHERE first_elected = "1998"
Name the total number of districts for first elected being 1998
CREATE TABLE table_25030512_24 (district VARCHAR, first_elected VARCHAR)
SELECT city FROM table_name_77 WHERE name = "jal hotel"
What City is the Jal hotel in?
CREATE TABLE table_name_77 (city VARCHAR, name VARCHAR)
SELECT incumbent FROM table_1341423_9 WHERE district = "Florida 12"
Who's the incumbent of Florida 12 district?
CREATE TABLE table_1341423_9 (incumbent VARCHAR, district VARCHAR)
SELECT high_points FROM table_30087032_5 WHERE game = 1
Who did the high points in game number 1?
CREATE TABLE table_30087032_5 (high_points VARCHAR, game VARCHAR)
SELECT COUNT(year) FROM table_name_86 WHERE position = "2nd"
How many years have a position of 2nd?
CREATE TABLE table_name_86 (year VARCHAR, position VARCHAR)
SELECT MIN(crowd) FROM table_name_68 WHERE venue = "punt road oval"
What is the smallest crowd size for punt road oval?
CREATE TABLE table_name_68 (crowd INTEGER, venue VARCHAR)
SELECT away FROM table_name_6 WHERE competition = "uefa cup" AND round = "group f" AND club = "espanyol"
Which away has uefa cup as the competition, group f as the round, with espanyol as the club?
CREATE TABLE table_name_6 (away VARCHAR, club VARCHAR, competition VARCHAR, round VARCHAR)
SELECT result FROM table_name_51 WHERE week = 10
what was the result in week 10?
CREATE TABLE table_name_51 (result VARCHAR, week VARCHAR)
SELECT budget_type_code, budget_type_description FROM Ref_budget_codes
List all budget type codes and descriptions.
CREATE TABLE Ref_budget_codes (budget_type_code VARCHAR, budget_type_description VARCHAR)
SELECT official_name FROM table_name_38 WHERE area_km_2 = 343.95
With an area km 2 of 343.95 what is the official name?
CREATE TABLE table_name_38 (official_name VARCHAR, area_km_2 VARCHAR)
SELECT character FROM table_22460085_1 WHERE original_broadway_performer = "Moya Angela"
What character did Moya Angela portray?
CREATE TABLE table_22460085_1 (character VARCHAR, original_broadway_performer VARCHAR)
SELECT airport FROM table_name_16 WHERE icao = "birk"
What airport has an ICAO of Birk?
CREATE TABLE table_name_16 (airport VARCHAR, icao VARCHAR)
SELECT frequency FROM table_name_99 WHERE model_number = "c3 850"
What is the Frequency for Model Number c3 850?
CREATE TABLE table_name_99 (frequency VARCHAR, model_number VARCHAR)
SELECT DISTINCT name FROM medication ORDER BY name
List the names of all distinct medications, ordered in an alphabetical order.
CREATE TABLE medication (name VARCHAR)
SELECT title_in_country FROM table_29487895_2 WHERE country___region = "France"
What country is in the region of France?
CREATE TABLE table_29487895_2 (title_in_country VARCHAR, country___region VARCHAR)
SELECT series_finale FROM table_29799700_2 WHERE country = "Peru"
What was the date of the series finale for Peru?
CREATE TABLE table_29799700_2 (series_finale VARCHAR, country VARCHAR)
SELECT MAX(wickets) FROM table_16570286_4 WHERE average = "22.66"
What number of wickets were there when the average was 22.66?
CREATE TABLE table_16570286_4 (wickets INTEGER, average VARCHAR)
SELECT release_date FROM table_name_40 WHERE series = "mm" AND title = "tom thumb in trouble"
What is the release date of the mm series, which has the title tom thumb in trouble?
CREATE TABLE table_name_40 (release_date VARCHAR, series VARCHAR, title VARCHAR)
SELECT record FROM table_13258851_2 WHERE game_site = "Hubert H. Humphrey Metrodome"
What was the record set during the game played at Hubert H. Humphrey Metrodome?
CREATE TABLE table_13258851_2 (record VARCHAR, game_site VARCHAR)
SELECT COUNT(segment_d) FROM table_15187735_18 WHERE segment_b = "Solar Water Heaters"
Name the number of sement d for solar water heaters
CREATE TABLE table_15187735_18 (segment_d VARCHAR, segment_b VARCHAR)
SELECT year FROM table_name_74 WHERE notes = "87.17 m"
Which Year has Notes of 87.17 m?
CREATE TABLE table_name_74 (year VARCHAR, notes VARCHAR)
SELECT T1.name, T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id
List all country and league names.
CREATE TABLE League (name VARCHAR, country_id VARCHAR); CREATE TABLE Country (name VARCHAR, id VARCHAR)
SELECT devices_per_channel FROM table_174151_5 WHERE raw_bandwidth__mbit_s_ = 2560
Name the devices per channel for 2560
CREATE TABLE table_174151_5 (devices_per_channel VARCHAR, raw_bandwidth__mbit_s_ VARCHAR)
SELECT MIN(points) FROM table_name_1 WHERE tries = 39 AND goals > 0
I want the lowest points for tries of 39 and goals more than 0
CREATE TABLE table_name_1 (points INTEGER, tries VARCHAR, goals VARCHAR)
SELECT 2005 FROM table_name_49 WHERE 2003 = "a" AND 2007 = "2r" AND 2012 = "3r"
what is 2005 when 2003 is A, 2007 is 2r and 2012 is 3r?
CREATE TABLE table_name_49 (Id VARCHAR)
SELECT COUNT(top_50_ranking) FROM table_22170495_7 WHERE original_airing = "June 28, 2010"
How many of the episodes in the top 50 rankings were originally aired on June 28, 2010?
CREATE TABLE table_22170495_7 (top_50_ranking VARCHAR, original_airing VARCHAR)
SELECT intercontinental_cup_1998 FROM table_name_67 WHERE copa_mercosur_1998 = "runner-up"
what is the runner-up for the intercontinental cup
CREATE TABLE table_name_67 (intercontinental_cup_1998 VARCHAR, copa_mercosur_1998 VARCHAR)
SELECT COUNT(rank) FROM table_name_54 WHERE matches = 205
How many ranks had 205 matches?
CREATE TABLE table_name_54 (rank VARCHAR, matches VARCHAR)
SELECT elapsed_time FROM table_22050544_4 WHERE prize = "$9,377.42"
What was the elapsed time for the championship that had $9,377.42 in prize money?
CREATE TABLE table_22050544_4 (elapsed_time VARCHAR, prize VARCHAR)
SELECT away_team FROM table_name_89 WHERE home_team = "st kilda"
What is the away team from st kilda?
CREATE TABLE table_name_89 (away_team VARCHAR, home_team VARCHAR)
SELECT COUNT(hdtv) FROM table_15887683_16 WHERE television_service = "Elite Shopping TV"
How many values of HDTV apply when television service is elite shopping tv?
CREATE TABLE table_15887683_16 (hdtv VARCHAR, television_service VARCHAR)