question
stringlengths
14
216
context
stringlengths
45
458
answer
stringlengths
18
463
How many distinct nationalities are there?
create table people (nationality varchar, PRIMARY KEY (nationality))
select count(distinct nationality) from people
Who is the guest 2 in the episode where guest 4 is Iyare Igiehon and guest 3 is John Oliver?
create table table_20466963_4 (guest_2 varchar, guest_4 varchar, guest_3 varchar, PRIMARY KEY (guest_2))
select guest_2 from table_20466963_4 where guest_4 = "iyare igiehon" and guest_3 = "john oliver"
Who directed the episode that had 0.57 million U.S. viewers?
create table table_26914076_4 (directed_by varchar, us_viewers__millions_ varchar, PRIMARY KEY (directed_by))
select directed_by from table_26914076_4 where us_viewers__millions_ = "0.57"
What are the hometowns of gymnasts and the corresponding number of gymnasts?
create table gymnast (gymnast_id varchar, PRIMARY KEY (gymnast_id)); create table people (hometown varchar, people_id varchar, PRIMARY KEY (hometown))
select t2.hometown, count(*) from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id group by t2.hometown
What are the elimination moves of wrestlers whose team is "Team Orton"?
create table elimination (elimination_move varchar, team varchar, PRIMARY KEY (elimination_move))
select elimination_move from elimination where team = "team orton"
Find the last name of the author with first name "Amal".
create table authors (lname varchar, fname varchar, PRIMARY KEY (lname))
select lname from authors where fname = "amal"
How many opponents led to an exactly 7-0 record?
create table table_21034801_1 (opponent varchar, record varchar, PRIMARY KEY (opponent))
select count(opponent) from table_21034801_1 where record = "7-0"
What is the French word where the German word is filtern?
create table table_15040_8 (french varchar, german varchar, PRIMARY KEY (french))
select french from table_15040_8 where german = "filtern"
What is the c (nf/km) when the r (ω/km) is 463.59?
create table table_261642_3 (c__nf_km_ varchar, r__ω_km_ varchar, PRIMARY KEY (c__nf_km_))
select c__nf_km_ from table_261642_3 where r__ω_km_ = "463.59"
Show the musical nominee with award "Bob Fosse" or "Cleavant Derricks".
create table musical (nominee varchar, award varchar, PRIMARY KEY (nominee))
select nominee from musical where award = "tony award" or award = "cleavant derricks"
What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'?
create table department (creation varchar, department_id varchar, PRIMARY KEY (creation)); create table management (department_id varchar, head_id varchar, PRIMARY KEY (department_id)); create table head (head_id varchar, born_state varchar, PRIMARY KEY (head_id))
select distinct t1.creation from department as t1 join management as t2 on t1.department_id = t2.department_id join head as t3 on t2.head_id = t3.head_id where t3.born_state = 'alabama'
what type over school is Clemson?
create table table_28744929_1 (school_type varchar, institution varchar, PRIMARY KEY (school_type))
select school_type from table_28744929_1 where institution = "clemson"
How many values reflect the overall record of the team coached by Frank Beamer?
create table table_28744929_2 (overall_record varchar, head_coach varchar, PRIMARY KEY (overall_record))
select count(overall_record) from table_28744929_2 where head_coach = "frank beamer"
When dennis ross (r) unopposed is the candidate what is the party?
create table table_25030512_12 (party varchar, candidates varchar, PRIMARY KEY (party))
select party from table_25030512_12 where candidates = "dennis ross (r) unopposed"
Name the number of artists for panel points being 5
create table table_21378339_5 (artist varchar, panel_points varchar, PRIMARY KEY (artist))
select count(artist) from table_21378339_5 where panel_points = 5
Who are all the major users of the Saturn Machine Pistol?
create table table_29474407_11 (major_users varchar, name__designation varchar, PRIMARY KEY (major_users))
select major_users from table_29474407_11 where name__designation = "saturn machine pistol"
Find the name of the user who gives the most reviews.
create table useracct (name varchar, u_id varchar, PRIMARY KEY (name)); create table review (u_id varchar, PRIMARY KEY (u_id))
select t1.name from useracct as t1 join review as t2 on t1.u_id = t2.u_id group by t2.u_id order by count(*) desc limit 1
If the amount of viewers is 2.48 million, what is the original air date?
create table table_24639086_3 (original_air_date varchar, viewers__in_millions_ varchar, PRIMARY KEY (original_air_date))
select original_air_date from table_24639086_3 where viewers__in_millions_ = "2.48"
Who is the winner in the location of ljvm coliseum • winston-salem, nc?
create table table_21330550_2 (winner varchar, location varchar, PRIMARY KEY (winner))
select winner from table_21330550_2 where location = "ljvm coliseum • winston-salem, nc"
Find the name of students who took any class in the years of 2009 and 2010.
create table student (name varchar, id varchar, PRIMARY KEY (name)); create table takes (id varchar, PRIMARY KEY (id))
select distinct t1.name from student as t1 join takes as t2 on t1.id = t2.id where year = 2009 or year = 2010
How many events did nigel mansell drive the fastest and a mclaren - honda win?
create table table_1139087_2 (grand_prix varchar, constructor varchar, fastest_lap varchar, PRIMARY KEY (grand_prix))
select count(grand_prix) from table_1139087_2 where constructor = "mclaren - honda" and fastest_lap = "nigel mansell"
Name who wrote the episode when the viewers was 1.81
create table table_15584067_7 (written_by varchar, us_viewers__million_ varchar, PRIMARY KEY (written_by))
select written_by from table_15584067_7 where us_viewers__million_ = "1.81"
What was the name of the episode that aired originally on March 11, 1988?
create table table_20967430_4 (title varchar, original_air_date varchar, PRIMARY KEY (title))
select title from table_20967430_4 where original_air_date = "march 11, 1988"
when it published in english is n/a and published in russian is 1986, what is the type of work?
create table table_207795_1 (type_of_work varchar, published_in_english varchar, published_in_russian varchar, PRIMARY KEY (type_of_work))
select type_of_work from table_207795_1 where published_in_english = "n/a" and published_in_russian = "1986"
When vince carter (24) has the highest points how many teams are there?
create table table_23249053_11 (team varchar, high_points varchar, PRIMARY KEY (team))
select count(team) from table_23249053_11 where high_points = "vince carter (24)"
Name the number of traditional chinese for album number 6th
create table table_1893815_1 (chinese__traditional_ varchar, album_number varchar, PRIMARY KEY (chinese__traditional_))
select count(chinese__traditional_) from table_1893815_1 where album_number = "6th"
what is teaching language where the focus is auditing?
create table table_12591022_2 (teaching_language varchar, focus varchar, PRIMARY KEY (teaching_language))
select teaching_language from table_12591022_2 where focus = "auditing"
What are the allergies and their types that the student with first name Lisa has? And order the result by name of allergies.
create table has_allergy (allergy varchar, stuid varchar, PRIMARY KEY (allergy)); create table student (stuid varchar, fname varchar, PRIMARY KEY (stuid)); create table allergy_type (allergy varchar, allergytype varchar, PRIMARY KEY (allergy))
select t1.allergy, t1.allergytype from allergy_type as t1 join has_allergy as t2 on t1.allergy = t2.allergy join student as t3 on t3.stuid = t2.stuid where t3.fname = "lisa" order by t1.allergy
List the highest number of assists when zaza pachulia (6) had the most rebounds.
create table table_27734577_2 (high_assists varchar, high_rebounds varchar, PRIMARY KEY (high_assists))
select count(high_assists) from table_27734577_2 where high_rebounds = "zaza pachulia (6)"
Name the vertical for 明勾(ys月南)
create table table_25519358_1 (vertical_0_b varchar, horizontal_0_a varchar, PRIMARY KEY (vertical_0_b))
select vertical_0_b from table_25519358_1 where horizontal_0_a = "明勾(ys月南)"
The stamp was 39¢, who was the printer?
create table table_15635768_1 (printer varchar, face_value varchar, PRIMARY KEY (printer))
select printer from table_15635768_1 where face_value = "39¢"
Show the most common builder of railways.
create table railway (builder varchar, PRIMARY KEY (builder))
select builder from railway group by builder order by count(*) desc limit 1
How many sets of presenters are there for the version of the show named Celebrity Masterchef?
create table table_28190363_1 (presenter_s_ varchar, name varchar, PRIMARY KEY (presenter_s_))
select count(presenter_s_) from table_28190363_1 where name = "celebrity masterchef"
Name the religion that has a growth rate of 1.56%
create table table_28137918_5 (religion varchar, growth_rate varchar, PRIMARY KEY (religion))
select religion from table_28137918_5 where growth_rate = "1.56%"
What date did the episode with Andy Murray as Jamie and John's guest first broadcast?
create table table_29141354_4 (first_broadcast varchar, jamie_and_johns_guest varchar, PRIMARY KEY (first_broadcast))
select first_broadcast from table_29141354_4 where jamie_and_johns_guest = "andy murray"
Name the iso for chungcheongnam
create table table_160510_5 (iso varchar, rr_romaja varchar, PRIMARY KEY (iso))
select iso from table_160510_5 where rr_romaja = "chungcheongnam"
What country has the Sky Calcio 2 tv service?
create table table_15887683_4 (country varchar, television_service varchar, PRIMARY KEY (country))
select country from table_15887683_4 where television_service = "sky calcio 2"
How many womens doubles had champions the years broddi kristjánsson drífa harðardóttir won mixed doubles
create table table_14903999_1 (womens_doubles varchar, mixed_doubles varchar, PRIMARY KEY (womens_doubles))
select count(womens_doubles) from table_14903999_1 where mixed_doubles = "broddi kristjánsson drífa harðardóttir"
What are the names , themes , and number of singers for every concert ?
create table singer_in_concert (concert_id varchar, PRIMARY KEY (concert_id)); create table concert (concert_name varchar, theme varchar, concert_id varchar, PRIMARY KEY (concert_name))
select t2.concert_name, t2.theme, count(*) from singer_in_concert as t1 join concert as t2 on t1.concert_id = t2.concert_id group by t2.concert_id
Find the name of department has the highest amount of students?
create table student (dept_name varchar, PRIMARY KEY (dept_name))
select dept_name from student group by dept_name order by count(*) desc limit 1
how many numer of jamaicans granted british citizenship with naturalisation by marriage being 1060
create table table_11214212_1 (numer_of_jamaicans_granted_british_citizenship varchar, naturalisation_by_marriage varchar, PRIMARY KEY (numer_of_jamaicans_granted_british_citizenship))
select count(numer_of_jamaicans_granted_british_citizenship) from table_11214212_1 where naturalisation_by_marriage = 1060
What are the students' first names who have both cats and dogs as pets?
create table has_pet (stuid varchar, petid varchar, PRIMARY KEY (stuid)); create table student (fname varchar, stuid varchar, PRIMARY KEY (fname)); create table pets (petid varchar, pettype varchar, PRIMARY KEY (petid))
select t1.fname from student as t1 join has_pet as t2 on t1.stuid = t2.stuid join pets as t3 on t3.petid = t2.petid where t3.pettype = 'cat' intersect select t1.fname from student as t1 join has_pet as t2 on t1.stuid = t2.stuid join pets as t3 on t3.petid = t2.petid where t3.pettype = 'dog'
Find the id of the item whose title is "orange".
create table item (i_id varchar, title varchar, PRIMARY KEY (i_id))
select i_id from item where title = "orange"
what's airdate with international destination being scotland
create table table_13036251_1 (airdate varchar, international_destination varchar, PRIMARY KEY (airdate))
select airdate from table_13036251_1 where international_destination = "scotland"
When nanhai 南海 is the commandery what is the commandery capital?
create table table_278229_1 (commandery varchar, PRIMARY KEY (commandery))
select commandery as capital from table_278229_1 where commandery = "nanhai 南海"
Which contestant was sponsored by Yogurt Vita Slim?
create table table_28062822_3 (contestant varchar, sponsor varchar, PRIMARY KEY (contestant))
select contestant from table_28062822_3 where sponsor = "yogurt vita slim"
What is the station type of DWZM-TV?
create table table_24673888_1 (station_type varchar, callsign varchar, PRIMARY KEY (station_type))
select station_type from table_24673888_1 where callsign = "dwzm-tv"
What is the local sources for property taxes of 11,631,227?
create table table_11608735_3 (other_local_sources varchar, property_taxes varchar, PRIMARY KEY (other_local_sources))
select other_local_sources from table_11608735_3 where property_taxes = "11,631,227"
How many 125cc winners were in the same events as when the Moto2 winner was Shoya Tomizawa?
create table table_20935975_1 (moto2_winner varchar, PRIMARY KEY (moto2_winner))
select count(125 as cc_winner) from table_20935975_1 where moto2_winner = "shoya tomizawa"
If the special weapon is glass egg, what is the close ranged weapon?
create table table_27704991_1 (close_ranged_weapons varchar, special_weapon varchar, PRIMARY KEY (close_ranged_weapons))
select close_ranged_weapons from table_27704991_1 where special_weapon = "glass egg"
What is the main service for the station with 14.849 million passengers 2011-12?
create table table_18118221_1 (main_services varchar, total_passengers__millions__2011_12 varchar, PRIMARY KEY (main_services))
select main_services from table_18118221_1 where total_passengers__millions__2011_12 = "14.849"
What were the wounded for complement of 46 off 656 men?
create table table_11793221_4 (wounded varchar, complement varchar, PRIMARY KEY (wounded))
select wounded from table_11793221_4 where complement = "46 off 656 men"
What was the average speed where lap four's time was 22.9049?
create table table_23018775_3 (avg_speed varchar, lap_four varchar, PRIMARY KEY (avg_speed))
select avg_speed from table_23018775_3 where lap_four = "22.9049"
Name the mens singles for jeliazko valkov dobrinka peneva
create table table_14903491_1 (mens_singles varchar, mixed_doubles varchar, PRIMARY KEY (mens_singles))
select mens_singles from table_14903491_1 where mixed_doubles = "jeliazko valkov dobrinka peneva"
What is the name of the player from Maylands, Western Australia?
create table table_24501530_1 (candidate varchar, hometown varchar, PRIMARY KEY (candidate))
select candidate from table_24501530_1 where hometown = "maylands, western australia"
How many parties are named the Center Alliance
create table table_203802_2 (english_party_name varchar, PRIMARY KEY (english_party_name))
select count(2013 as _parliamentary_election) from table_203802_2 where english_party_name = "center alliance"
Where is longview high school
create table table_11677691_8 (hometown varchar, school varchar, PRIMARY KEY (hometown))
select hometown from table_11677691_8 where school = "longview high school"
How many transcripts are released?
create table transcripts (id varchar, PRIMARY KEY (id))
select count(*) from transcripts
How many entries are there for high rebounds when high points is inge – 19?
create table table_30054758_3 (high_rebounds varchar, high_points varchar, PRIMARY KEY (high_rebounds))
select count(high_rebounds) from table_30054758_3 where high_points = "inge – 19"
What's the Croatian word for Saturday?
create table table_1277350_5 (saturday_sixth_day varchar, day__see_irregularities__ varchar, PRIMARY KEY (saturday_sixth_day))
select saturday_sixth_day from table_1277350_5 where day__see_irregularities__ = "croatian"
What was the connection speed when launched on 07.06.2005?
create table table_19246_1 (connection_speed varchar, launch_date__ddmmyyyy_ varchar, PRIMARY KEY (connection_speed))
select connection_speed from table_19246_1 where launch_date__ddmmyyyy_ = "07.06.2005"
Find the number of different departments in each school whose number of different departments is less than 5.
create table department (school_code varchar, dept_name varchar, PRIMARY KEY (school_code))
select count(distinct dept_name), school_code from department group by school_code having count(distinct dept_name) < 5
What is the total number of January (°C) temperatures when the July (°C) temperatures were 23/15?
create table table_21980_1 (january__ varchar, july__°c_ varchar, PRIMARY KEY (january__))
select count(january__) as °c_ from table_21980_1 where july__°c_ = "23/15"
Who was the opponent in the Women's Cup 0 0 where Brancão Couto 0 is the scorer?
create table table_27654988_1 (opponent varchar, competition varchar, scorers varchar, PRIMARY KEY (opponent))
select opponent from table_27654988_1 where competition = "women's cup 0 0" and scorers = "brancão couto 0"
What is the lowest SOL?
create table table_1888157_1 (sol integer, PRIMARY KEY (sol))
select min(sol) from table_1888157_1
How many allergies have type animal?
create table allergy_type (allergytype varchar, PRIMARY KEY (allergytype))
select count(*) from allergy_type where allergytype = "animal"
Name the total number of runner up a for perambalur
create table table_22754310_1 (runner_up_a varchar, constituency varchar, PRIMARY KEY (runner_up_a))
select count(runner_up_a) from table_22754310_1 where constituency = "perambalur"
Find the first names of students whose first names contain letter "a".
create table student (fname varchar, PRIMARY KEY (fname))
select distinct fname from student where fname like '%a%'
Which city has the cincinnati hockey website?
create table table_16384648_2 (location varchar, team_website varchar, PRIMARY KEY (location))
select location from table_16384648_2 where team_website = "cincinnati hockey"
Name the population in 1931 for lubelskie
create table table_14245_3 (population__1931__in_1 varchar, voivodeship_or_city varchar, PRIMARY KEY (population__1931__in_1))
select population__1931__in_1, 000 as s from table_14245_3 where voivodeship_or_city = "lubelskie"
What's the animals name when the genus/species is rattus norvegicus?
create table table_15417439_1 (common_name varchar, genus_species varchar, PRIMARY KEY (common_name))
select common_name from table_15417439_1 where genus_species = "rattus norvegicus"
How many episodes originally aired on August 31, 1995?
create table table_11951237_2 (title varchar, original_air_date varchar, PRIMARY KEY (title))
select count(title) from table_11951237_2 where original_air_date = "august 31, 1995"
What is the title of the episode whose original airdate is April 23, 2010?
create table table_26982362_2 (title varchar, original_airdate varchar, PRIMARY KEY (title))
select title from table_26982362_2 where original_airdate = "april 23, 2010"
Name the number of headphone class for sr100
create table table_1601027_2 (headphone_class varchar, headphone_model varchar, PRIMARY KEY (headphone_class))
select count(headphone_class) from table_1601027_2 where headphone_model = "sr100"
What was the number of athletes for the 7th edition?
create table table_26669939_1 (no_of_athletes varchar, edition varchar, PRIMARY KEY (no_of_athletes))
select no_of_athletes from table_26669939_1 where edition = "7th"
How many players enter hall of fame each year?
create table hall_of_fame (yearid varchar, PRIMARY KEY (yearid))
select yearid, count(*) from hall_of_fame group by yearid
Which destination has least number of flights?
create table flight (destination varchar, PRIMARY KEY (destination))
select destination from flight group by destination order by count(*) limit 1
In what industry was the company that had 89.16 billions of dollars in sales?
create table table_1682026_7 (industry varchar, sales__billion_$_ varchar, PRIMARY KEY (industry))
select industry from table_1682026_7 where sales__billion_$_ = "89.16"
What are the highest mbit/s when the dbm is +17.5?
create table table_2394927_1 (max_downstream_throughput___mbit_s__ varchar, power___dbm__ varchar, PRIMARY KEY (max_downstream_throughput___mbit_s__))
select max_downstream_throughput___mbit_s__ from table_2394927_1 where power___dbm__ = "+17.5"
What is the description of the marketing region China?
create table marketing_regions (marketing_region_descriptrion varchar, marketing_region_name varchar, PRIMARY KEY (marketing_region_descriptrion))
select marketing_region_descriptrion from marketing_regions where marketing_region_name = "china"
Name the number of pinyin where simplified is 河西区
create table table_1638437_2 (pinyin varchar, simplified varchar, PRIMARY KEY (pinyin))
select count(pinyin) from table_1638437_2 where simplified = "河西区"
How many political parties had a %2006 rating of 43.5?
create table table_21132404_1 (political_parties varchar, _percentage_2006 varchar, PRIMARY KEY (political_parties))
select count(political_parties) from table_21132404_1 where _percentage_2006 = "43.5"
What was the highest home total?
create table table_27094070_4 (home_total integer, PRIMARY KEY (home_total))
select max(home_total) from table_27094070_4
Who was eliminated when immunity went to kent (jürgen)?
create table table_25016824_2 (eliminated varchar, immunity varchar, PRIMARY KEY (eliminated))
select eliminated from table_25016824_2 where immunity = "kent (jürgen)"
What is the P for the player moving from Everton?
create table table_17596418_4 (p varchar, moving_from varchar, PRIMARY KEY (p))
select p from table_17596418_4 where moving_from = "everton"
What type of settlement is ором (hungarian: orom)?
create table table_2562572_33 (type varchar, cyrillic_name_other_names varchar, PRIMARY KEY (type))
select type from table_2562572_33 where cyrillic_name_other_names = "ором (hungarian: orom)"
If the equation is (10 times 1) + 3, what is the 2nd throw?
create table table_17265535_6 (equation varchar, PRIMARY KEY (equation))
select max(2 as nd_throw) from table_17265535_6 where equation = "(10 times 1) + 3"
Show last names for all student who are on scholarship.
create table student (lname varchar, stuid varchar, PRIMARY KEY (lname)); create table sportsinfo (stuid varchar, onscholarship varchar, PRIMARY KEY (stuid))
select t2.lname from sportsinfo as t1 join student as t2 on t1.stuid = t2.stuid where t1.onscholarship = 'y'
What was the 2nd leg score if the team 1 is Deportivo Pasto?
create table table_27603010_14 (team__number1 varchar, PRIMARY KEY (team__number1))
select 2 as nd_leg from table_27603010_14 where team__number1 = "deportivo pasto"
what is romanian when nuorese sardinian is [ˈkantaza]?
create table table_25401_2 (romanian varchar, nuorese_sardinian varchar, PRIMARY KEY (romanian))
select romanian from table_25401_2 where nuorese_sardinian = "[ˈkantaza]"
What are the numbers of wines for different grapes?
create table wine (grape varchar, PRIMARY KEY (grape))
select count(*), grape from wine group by grape
When steve mcclaren is the replacer what is the manner of departure?
create table table_24162080_3 (manner_of_departure varchar, replaced_by varchar, PRIMARY KEY (manner_of_departure))
select manner_of_departure from table_24162080_3 where replaced_by = "steve mcclaren"
Which University's soccer stadium in named Moncton Stadium?
create table table_27369069_1 (university varchar, soccer_stadium varchar, PRIMARY KEY (university))
select university from table_27369069_1 where soccer_stadium = "moncton stadium"
How many flights have destination ATO?
create table flights (destairport varchar, PRIMARY KEY (destairport))
select count(*) from flights where destairport = "ato"
What vote passed for the measure with the description, authorizing state acceptance of certain gifts?
create table table_256286_40 (passed varchar, description varchar, PRIMARY KEY (passed))
select passed from table_256286_40 where description = "authorizing state acceptance of certain gifts"
What's the wold ranking of the index by Transparency International?
create table table_19948664_1 (world_ranking__1_ varchar, author___editor___source varchar, PRIMARY KEY (world_ranking__1_))
select world_ranking__1_ from table_19948664_1 where author___editor___source = "transparency international"
what is redskins (score) against tennessee titans 27
create table table_20074209_1 (redskins__score_ varchar, opponent__score_ varchar, PRIMARY KEY (redskins__score_))
select redskins__score_ from table_20074209_1 where opponent__score_ = "tennessee titans 27"
How many high schoolers are there?
create table highschooler (id varchar, PRIMARY KEY (id))
select count(*) from highschooler
what is the total number of publisher where cover date is may 1939
create table table_1217448_1 (publisher varchar, cover_date varchar, PRIMARY KEY (publisher))
select count(publisher) from table_1217448_1 where cover_date = "may 1939"
Find the names of all the customers and staff members.
create table staff (customer_details varchar, staff_details varchar, PRIMARY KEY (customer_details)); create table customers (customer_details varchar, staff_details varchar, PRIMARY KEY (customer_details))
select customer_details from customers union select staff_details from staff