question
stringlengths
14
216
context
stringlengths
45
458
answer
stringlengths
18
463
Who wrote the episode with 3.92 million US viewers?
create table table_25740548_3 (written_by varchar, us_viewers__million_ varchar, PRIMARY KEY (written_by))
select written_by from table_25740548_3 where us_viewers__million_ = "3.92"
What's the clock speed of the model that costs $910?
create table table_12740151_8 (clock_speed varchar, price___usd__ varchar, PRIMARY KEY (clock_speed))
select clock_speed from table_12740151_8 where price___usd__ = "$910"
What is the pr avg, when kr lg is 49?
create table table_16912000_13 (pr_avg varchar, kr_lg varchar, PRIMARY KEY (pr_avg))
select pr_avg from table_16912000_13 where kr_lg = 49
How many sets of marks does Tonioli get in week 3?
create table table_18595004_7 (tonioli varchar, week__number varchar, PRIMARY KEY (tonioli))
select count(tonioli) from table_18595004_7 where week__number = 3
What is the total number of fate for pennant of u33?
create table table_1220125_4 (fate varchar, pennant varchar, PRIMARY KEY (fate))
select count(fate) from table_1220125_4 where pennant = "u33"
Who was the vacator when the reason for change was failure to elect?
create table table_225206_3 (vacator varchar, reason_for_change varchar, PRIMARY KEY (vacator))
select vacator from table_225206_3 where reason_for_change = "failure to elect"
Name the high rebounds for record 10-19
create table table_23274514_5 (high_rebounds varchar, record varchar, PRIMARY KEY (high_rebounds))
select high_rebounds from table_23274514_5 where record = "10-19"
What is the lowest production number?
create table table_1439096_1 (production_no integer, PRIMARY KEY (production_no))
select min(production_no) from table_1439096_1
List the full amount of week 36 results when week 32 is 13.2%.
create table table_23680576_3 (week_36 varchar, week_32 varchar, PRIMARY KEY (week_36))
select count(week_36) from table_23680576_3 where week_32 = "13.2%"
Name the number of opponent with arrowhead stadium
create table table_13258823_2 (opponent varchar, game_site varchar, PRIMARY KEY (opponent))
select count(opponent) from table_13258823_2 where game_site = "arrowhead stadium"
What are the details of all products?
create table products (product_details varchar, PRIMARY KEY (product_details))
select distinct product_details from products
Who was the losing team of the game that was contested on February 1, 2004?
create table table_10548224_1 (losing_team varchar, date_contested varchar, PRIMARY KEY (losing_team))
select losing_team from table_10548224_1 where date_contested = "february 1, 2004"
Find the number of routes and airport name for each source airport, order the results by decreasing number of routes.
create table airports (name varchar, apid varchar, PRIMARY KEY (name)); create table routes (src_apid varchar, PRIMARY KEY (src_apid))
select count(*), t1.name from airports as t1 join routes as t2 on t1.apid = t2.src_apid group by t1.name order by count(*) desc
When 6606 is the sail number what is the type of yacht?
create table table_1858574_2 (yacht varchar, sail_number varchar, PRIMARY KEY (yacht))
select yacht as type from table_1858574_2 where sail_number = "6606"
Find the name of the club that has the most female students.
create table student (stuid varchar, sex varchar, PRIMARY KEY (stuid)); create table member_of_club (clubid varchar, stuid varchar, PRIMARY KEY (clubid)); create table club (clubname varchar, clubid varchar, PRIMARY KEY (clubname))
select t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.sex = "f" group by t1.clubname order by count(*) desc limit 1
How many people directed the episode that aired on February 5, 1968?
create table table_25800134_12 (director varchar, airdate varchar, PRIMARY KEY (director))
select count(director) from table_25800134_12 where airdate = "february 5, 1968"
What country's capital is buenos aires?
create table table_14098_1 (country_or_territory_with_flag varchar, capital varchar, PRIMARY KEY (country_or_territory_with_flag))
select country_or_territory_with_flag from table_14098_1 where capital = "buenos aires"
Show the invoice number and the number of transactions for each invoice.
create table financial_transactions (invoice_number varchar, PRIMARY KEY (invoice_number))
select invoice_number, count(*) from financial_transactions group by invoice_number
What is Matt Allen's sail number?
create table table_25595209_1 (sail_number varchar, skipper varchar, PRIMARY KEY (sail_number))
select sail_number from table_25595209_1 where skipper = "matt allen"
How many patients do each physician take care of? List their names and number of patients they take care of.
create table patient (pcp varchar, PRIMARY KEY (pcp)); create table physician (name varchar, employeeid varchar, PRIMARY KEY (name))
select t1.name, count(*) from physician as t1 join patient as t2 on t1.employeeid = t2.pcp group by t1.employeeid
What is the number of English names that have a Traditional Chinese name of 全椒縣?
create table table_1982739_2 (english_name varchar, traditional_chinese varchar, PRIMARY KEY (english_name))
select count(english_name) from table_1982739_2 where traditional_chinese = "全椒縣"
What are the package/options when the TV service is rai 3?
create table table_15887683_1 (package_option varchar, television_service varchar, PRIMARY KEY (package_option))
select package_option from table_15887683_1 where television_service = "rai 3"
Find the product names that are colored 'white' but do not have unit of measurement "Handful".
create table products (product_name varchar, product_category_code varchar, color_code varchar, PRIMARY KEY (product_name)); create table ref_colors (color_code varchar, color_description varchar, PRIMARY KEY (color_code)); create table ref_product_categories (product_category_code varchar, unit_of_measure varchar, PRIMARY KEY (product_category_code))
select t1.product_name from products as t1 join ref_product_categories as t2 on t1.product_category_code = t2.product_category_code join ref_colors as t3 on t1.color_code = t3.color_code where t3.color_description = "white" and t2.unit_of_measure <> "handful"
Which institution was located in bakersfield, california?
create table table_27816698_2 (institution varchar, location varchar, PRIMARY KEY (institution))
select institution from table_27816698_2 where location = "bakersfield, california"
What was the science score in the year there was a social studies score of 93.56?
create table table_2534578_1 (science varchar, social_studies varchar, PRIMARY KEY (science))
select science from table_2534578_1 where social_studies = "93.56"
Find the number of funiture types produced by each manufacturer as well as the company names.
create table furniture_manufacte (manufacturer_id varchar, PRIMARY KEY (manufacturer_id)); create table manufacturer (name varchar, manufacturer_id varchar, PRIMARY KEY (name))
select count(*), t1.name from manufacturer as t1 join furniture_manufacte as t2 on t1.manufacturer_id = t2.manufacturer_id group by t1.manufacturer_id
How many different last names do the actors and actresses have?
create table actor (last_name varchar, PRIMARY KEY (last_name))
select count(distinct last_name) from actor
How many parties are there?
create table party (id varchar, PRIMARY KEY (id))
select count(*) from party
how many remittances in 2010 for nigeria?
create table table_2941963_1 (remittances_2010 varchar, country varchar, PRIMARY KEY (remittances_2010))
select remittances_2010 from table_2941963_1 where country = "nigeria"
What is the name of the marketing region that the store Rob Dinning belongs to?
create table marketing_regions (marketing_region_name varchar, marketing_region_code varchar, PRIMARY KEY (marketing_region_name)); create table stores (marketing_region_code varchar, store_name varchar, PRIMARY KEY (marketing_region_code))
select t1.marketing_region_name from marketing_regions as t1 join stores as t2 on t1.marketing_region_code = t2.marketing_region_code where t2.store_name = "rob dinning"
what's the party with candidates  jerry weller (r) 51.77% clem balanoff (d) 48.23%
create table table_1341472_15 (party varchar, candidates varchar, PRIMARY KEY (party))
select party from table_1341472_15 where candidates = "jerry weller (r) 51.77% clem balanoff (d) 48.23%"
Who was relegated to league if Barking Birmingham & Solihull Stourbridge were relegated from league?
create table table_23927423_4 (relegated_to_league varchar, relegated_from_league varchar, PRIMARY KEY (relegated_to_league))
select relegated_to_league from table_23927423_4 where relegated_from_league = "barking birmingham & solihull stourbridge"
What is the status of the district where the result is 63% 37%?
create table table_16185956_1 (status varchar, results varchar, PRIMARY KEY (status))
select status from table_16185956_1 where results = "63% 37%"
Which conference is in Jackson, Mississippi?
create table table_10577579_3 (current_conference varchar, location varchar, PRIMARY KEY (current_conference))
select current_conference from table_10577579_3 where location = "jackson, mississippi"
What team was promoted in the Serbian League East in the same season when Kolubara was promoted in the Serbian League Belgrade?
create table table_12283621_6 (serbian_league_east varchar, serbian_league_belgrade varchar, PRIMARY KEY (serbian_league_east))
select serbian_league_east from table_12283621_6 where serbian_league_belgrade = "kolubara"
Who were the director/s of episodes written by Mike Daniels?
create table table_18274425_1 (directed_by varchar, written_by varchar, PRIMARY KEY (directed_by))
select directed_by from table_18274425_1 where written_by = "mike daniels"
who won mixed doubles when zhou mi won womens singles
create table table_20361783_1 (mixed_doubles varchar, womens_singles varchar, PRIMARY KEY (mixed_doubles))
select mixed_doubles from table_20361783_1 where womens_singles = "zhou mi"
Name the number of gn divisions for mannar
create table table_24574438_1 (gn_divisions varchar, ds_division varchar, PRIMARY KEY (gn_divisions))
select count(gn_divisions) from table_24574438_1 where ds_division = "mannar"
How many different countries are all the swimmers from?
create table swimmer (nationality varchar, PRIMARY KEY (nationality))
select count(distinct nationality) from swimmer
Where is the University that plays in the American Athletic Conference?
create table table_19210115_1 (location varchar, conference varchar, PRIMARY KEY (location))
select location from table_19210115_1 where conference = "american athletic conference"
Which industry has a company with a market value of 80.3 billion?
create table table_1682026_6 (industry varchar, market_value__billion_$_ varchar, PRIMARY KEY (industry))
select industry from table_1682026_6 where market_value__billion_$_ = "80.3"
What was the final score of the game with gerald wallace (14) as the High Rebound?
create table table_17001658_10 (record varchar, high_rebounds varchar, PRIMARY KEY (record))
select record from table_17001658_10 where high_rebounds = "gerald wallace (14)"
What team is sponsored by d3 Outdoors?
create table table_19908313_2 (team varchar, primary_sponsor_s_ varchar, PRIMARY KEY (team))
select team from table_19908313_2 where primary_sponsor_s_ = "d3 outdoors"
Who is the constructor for the car driven by George Heath?
create table table_18893428_1 (constructor varchar, driver varchar, PRIMARY KEY (constructor))
select constructor from table_18893428_1 where driver = "george heath"
What is the longest length of mandatory secondary school?
create table table_1831309_1 (length_of_mandatory_secondary_school integer, PRIMARY KEY (length_of_mandatory_secondary_school))
select max(length_of_mandatory_secondary_school) from table_1831309_1
Who are all the players who've bowled more than 4969 balls?
create table table_2482547_5 (name varchar, balls_bowled varchar, PRIMARY KEY (name))
select name from table_2482547_5 where balls_bowled = 4969
What was eliminated on the air date of November 3, 2005?
create table table_1893276_2 (eliminated varchar, air_date varchar, PRIMARY KEY (eliminated))
select eliminated from table_1893276_2 where air_date = "november 3, 2005"
What's the type of the school in New London, Connecticut?
create table table_1974782_1 (type varchar, location varchar, PRIMARY KEY (type))
select type from table_1974782_1 where location = "new london, connecticut"
when the writer is Brad Kern, how many u.s viewers (in millions) had the episode?
create table table_21313327_1 (us_viewers__millions_ varchar, written_by varchar, PRIMARY KEY (us_viewers__millions_))
select us_viewers__millions_ from table_21313327_1 where written_by = "brad kern"
Name the segment b for pressure cookers
create table table_15187735_13 (segment_b varchar, segment_a varchar, PRIMARY KEY (segment_b))
select segment_b from table_15187735_13 where segment_a = "pressure cookers"
Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle.
create table student (stuid varchar, city_code varchar, PRIMARY KEY (stuid)); create table voting_record (election_cycle varchar, PRIMARY KEY (election_cycle))
select count(*) from student as t1 join voting_record as t2 on t1.stuid = class_senator_vote where t1.city_code = "nyc" and t2.election_cycle = "spring"
Who wrote the episode having a US viewership of 3.74 million?
create table table_27905664_1 (written_by varchar, us_viewers__million_ varchar, PRIMARY KEY (written_by))
select written_by from table_27905664_1 where us_viewers__million_ = "3.74"
Who is listed under mens singles when the year location is 2009 doha?
create table table_28138035_27 (mens_singles varchar, year_location varchar, PRIMARY KEY (mens_singles))
select mens_singles from table_28138035_27 where year_location = "2009 doha"
Return the date of birth for all the guests with gender code "Male".
create table guests (date_of_birth varchar, gender_code varchar, PRIMARY KEY (date_of_birth))
select date_of_birth from guests where gender_code = "male"
List all number of yards with an AST of 8.
create table table_13237088_28 (no_yds varchar, ast varchar, PRIMARY KEY (no_yds))
select no_yds from table_13237088_28 where ast = 8
Who was the manufacturer in the year when the race lasted 2:30:28?
create table table_2266976_1 (manufacturer varchar, race_time varchar, PRIMARY KEY (manufacturer))
select manufacturer from table_2266976_1 where race_time = "2:30:28"
Which muzzle devices are on the Colt 603?
create table table_19901_1 (muzzle_device varchar, colt_model_no varchar, PRIMARY KEY (muzzle_device))
select muzzle_device from table_19901_1 where colt_model_no = "603"
What are all the states (class) when the reason for change was resigned November 26, 1798 and the vacator was John Hunter ( DR )?
create table table_224839_3 (state__class_ varchar, reason_for_change varchar, vacator varchar, PRIMARY KEY (state__class_))
select state__class_ from table_224839_3 where reason_for_change = "resigned november 26, 1798" and vacator = "john hunter ( dr )"
What is the total grant amount of the organisations described as research?
create table organisation_types (organisation_type varchar, organisation_type_description varchar, PRIMARY KEY (organisation_type)); create table grants (organisation_id varchar, PRIMARY KEY (organisation_id)); create table organisations (organisation_id varchar, organisation_type varchar, PRIMARY KEY (organisation_id))
select sum(grant_amount) from grants as t1 join organisations as t2 on t1.organisation_id = t2.organisation_id join organisation_types as t3 on t2.organisation_type = t3.organisation_type where t3.organisation_type_description = 'research'
What candidate(s) ran for election when nathaniel h. claiborne was the incumbent?
create table table_2668243_25 (candidates varchar, incumbent varchar, PRIMARY KEY (candidates))
select candidates from table_2668243_25 where incumbent = "nathaniel h. claiborne"
What is the outgoing manager for the team kasımpaşa?
create table table_26998135_2 (outgoing_manager varchar, team varchar, PRIMARY KEY (outgoing_manager))
select outgoing_manager from table_26998135_2 where team = "kasımpaşa"
Name the total number of rank timeslot for 18-49 being 3.1
create table table_20971444_3 (rank__timeslot_ varchar, rating__18_49_ varchar, PRIMARY KEY (rank__timeslot_))
select count(rank__timeslot_) from table_20971444_3 where rating__18_49_ = "3.1"
Which award-winning film has a closing date of September 4?
create table table_18220102_1 (award_winning_film varchar, date__closing_ varchar, PRIMARY KEY (award_winning_film))
select award_winning_film from table_18220102_1 where date__closing_ = "september 4"
what's the percentage of votes with number of deputies being 112
create table table_13746866_2 (percentage_of_votes varchar, number_of_deputies varchar, PRIMARY KEY (percentage_of_votes))
select percentage_of_votes from table_13746866_2 where number_of_deputies = 112
How many people lived in the district whose headquarters is in Bhubaneswar in 2001?
create table table_2801442_1 (population__2001_census_ varchar, headquarters varchar, PRIMARY KEY (population__2001_census_))
select population__2001_census_ from table_2801442_1 where headquarters = "bhubaneswar"
What is the number of professors for different school?
create table department (school_code varchar, dept_code varchar, PRIMARY KEY (school_code)); create table professor (dept_code varchar, PRIMARY KEY (dept_code))
select count(*), t1.school_code from department as t1 join professor as t2 on t1.dept_code = t2.dept_code group by t1.school_code
What is the national share of Guizhou's administrative division?
create table table_171666_1 (national_share___percentage_ varchar, administrative_division varchar, PRIMARY KEY (national_share___percentage_))
select national_share___percentage_ from table_171666_1 where administrative_division = "guizhou"
When was the operation in Field 103 executed?
create table table_13150274_1 (years_of_operation varchar, area_of_operation varchar, PRIMARY KEY (years_of_operation))
select years_of_operation from table_13150274_1 where area_of_operation = "field 103"
Who is the conductor for Rusalka?
create table table_24521345_1 (conductor varchar, work_title varchar, PRIMARY KEY (conductor))
select conductor from table_24521345_1 where work_title = "rusalka"
Name the year for spiele leben
create table table_16255245_1 (year__ceremony_ varchar, original_title varchar, PRIMARY KEY (year__ceremony_))
select year__ceremony_ from table_16255245_1 where original_title = "spiele leben"
how many u.s. viewers (million) have seen a production written by chris sheridan & danny smith
create table table_26259391_1 (us_viewers__million_ varchar, written_by varchar, PRIMARY KEY (us_viewers__million_))
select count(us_viewers__million_) from table_26259391_1 where written_by = "chris sheridan & danny smith"
What is the race name in the Monza circuit?
create table table_1140116_5 (race_name varchar, circuit varchar, PRIMARY KEY (race_name))
select race_name from table_1140116_5 where circuit = "monza"
How many position in channel 4s ratings a have February 24, 2010 as the original airing on channel 4?
create table table_22170495_6 (position_in_channel_4s_ratings_a varchar, original_airing_on_channel_4 varchar, PRIMARY KEY (position_in_channel_4s_ratings_a))
select count(position_in_channel_4s_ratings_a) from table_22170495_6 where original_airing_on_channel_4 = "february 24, 2010"
How many departments offer any degree?
create table degree_programs (department_id varchar, PRIMARY KEY (department_id))
select count(distinct department_id) from degree_programs
List names of all teams in the basketball competition, ordered by all home scores in descending order.
create table basketball_match (team_name varchar, all_home varchar, PRIMARY KEY (team_name))
select team_name from basketball_match order by all_home desc
What was the dominant religion (2002) of the Mala Remeta settlement?
create table table_2562572_50 (dominant_religion__2002_ varchar, settlement varchar, PRIMARY KEY (dominant_religion__2002_))
select dominant_religion__2002_ from table_2562572_50 where settlement = "mala remeta"
When scheffers ( ned ) l 3-6, 1-6 is the final/ bronze medal match what was the event?
create table table_18602462_21 (event varchar, final__bronze_medal_match varchar, PRIMARY KEY (event))
select event from table_18602462_21 where final__bronze_medal_match = "scheffers ( ned ) l 3-6, 1-6"
HOW MANY TIMES WAS LUDACRIS THE INTERVIEW SUBJECT FOR THE 20 QUESTIONS COLUMN?
create table table_1566852_7 (interview_subject varchar, PRIMARY KEY (interview_subject))
select count(20 as _questions) from table_1566852_7 where interview_subject = "ludacris"
How many contestants are 1.80 mtr. in height?
create table table_27946889_2 (contestant varchar, height__mtr_ varchar, PRIMARY KEY (contestant))
select count(contestant) from table_27946889_2 where height__mtr_ = "1.80"
what is the name of the constructor that has the circuit zeltweg airfield?
create table table_1140105_6 (constructor varchar, circuit varchar, PRIMARY KEY (constructor))
select constructor from table_1140105_6 where circuit = "zeltweg airfield"
What parishes are in Solvorn?
create table table_178398_1 (parish__prestegjeld_ varchar, location_of_the_church varchar, PRIMARY KEY (parish__prestegjeld_))
select parish__prestegjeld_ from table_178398_1 where location_of_the_church = "solvorn"
Show the starting years shared by technicians from team "CLE" and "CWS".
create table technician (starting_year varchar, team varchar, PRIMARY KEY (starting_year))
select starting_year from technician where team = "cle" intersect select starting_year from technician where team = "cws"
what's the wednesday time with monday being 10:00-8:00
create table table_11019212_1 (wednesday varchar, monday varchar, PRIMARY KEY (wednesday))
select wednesday from table_11019212_1 where monday = "10:00-8:00"
What is the christian amount where work participation rate is the composition?
create table table_14598_5 (christians varchar, composition varchar, PRIMARY KEY (christians))
select christians from table_14598_5 where composition = "work participation rate"
what's the health score with justice being 80.7
create table table_145439_1 (health varchar, justice varchar, PRIMARY KEY (health))
select health from table_145439_1 where justice = "80.7"
What seat does Gubernia Warszawska hold?
create table table_11614581_3 (seat varchar, name_in_polish varchar, PRIMARY KEY (seat))
select seat from table_11614581_3 where name_in_polish = "gubernia warszawska"
what's the minimum 180s value
create table table_13535824_2 (id varchar, PRIMARY KEY (id))
select min(180 as s) from table_13535824_2
What was the result of the games VS the Lions?
create table table_24123547_2 (final_score varchar, opponent varchar, PRIMARY KEY (final_score))
select final_score from table_24123547_2 where opponent = "lions"
Who is the operator when willowbrook was the bodybuilder?
create table table_28035004_1 (operator varchar, bodybuilder varchar, PRIMARY KEY (operator))
select operator from table_28035004_1 where bodybuilder = "willowbrook"
What is the winning song for the artist with a debut album "mike"?
create table table_1646960_3 (winning_song varchar, debut_album varchar, PRIMARY KEY (winning_song))
select winning_song from table_1646960_3 where debut_album = "mike"
How many assists were made in the game against San Antonio?
create table table_17325937_8 (high_assists varchar, team varchar, PRIMARY KEY (high_assists))
select count(high_assists) from table_17325937_8 where team = "san antonio"
How many players scored the most points when the opposing team was New Orleans/Oklahoma City?
create table table_13762472_3 (high_points varchar, team varchar, PRIMARY KEY (high_points))
select count(high_points) from table_13762472_3 where team = "new orleans/oklahoma city"
What is the perfect stem for pozten?
create table table_12784134_24 (perfect_stem varchar, imperfect_stem varchar, PRIMARY KEY (perfect_stem))
select perfect_stem from table_12784134_24 where imperfect_stem = "pozten"
Please show the team that has the most number of technicians.
create table technician (team varchar, PRIMARY KEY (team))
select team from technician group by team order by count(*) desc limit 1
Find the number of rooms for each bed type.
create table rooms (bedtype varchar, PRIMARY KEY (bedtype))
select bedtype, count(*) from rooms group by bedtype
Name the population % of eu for greece
create table table_1606824_1 (population__percentage_of_eu varchar, member_state varchar, PRIMARY KEY (population__percentage_of_eu))
select population__percentage_of_eu from table_1606824_1 where member_state = "greece"
Find the category descriptions of the products whose descriptions include letter 't'.
create table ref_product_categories (product_category_description varchar, product_category_code varchar, PRIMARY KEY (product_category_description)); create table products (product_category_code varchar, product_description varchar, PRIMARY KEY (product_category_code))
select t1.product_category_description from ref_product_categories as t1 join products as t2 on t1.product_category_code = t2.product_category_code where t2.product_description like '%t%'
Find the names of schools that have some students playing in goalie and mid positions.
create table tryout (cname varchar, ppos varchar, PRIMARY KEY (cname))
select cname from tryout where ppos = 'goalie' intersect select cname from tryout where ppos = 'mid'
Who wrote the episodes that were viewed by 2.12 million viewers?
create table table_11111116_8 (written_by varchar, us_viewers__million_ varchar, PRIMARY KEY (written_by))
select written_by from table_11111116_8 where us_viewers__million_ = "2.12"
How many type of jobs do they have?
create table person (job varchar, PRIMARY KEY (job))
select count(distinct job) from person