question
stringlengths
14
216
context
stringlengths
45
458
answer
stringlengths
18
463
What's the romanised name of the official who was Secretary for health, welfare and food?
create table table_2263674_1 (romanised_name varchar, portfolio varchar, PRIMARY KEY (romanised_name))
select romanised_name from table_2263674_1 where portfolio = "secretary for health, welfare and food"
Show the names of products and the number of events they are in, sorted by the number of events in descending order.
create table products (product_name varchar, product_id varchar, PRIMARY KEY (product_name)); create table products_in_events (product_id varchar, PRIMARY KEY (product_id))
select t1.product_name, count(*) from products as t1 join products_in_events as t2 on t1.product_id = t2.product_id group by t1.product_name order by count(*) desc
Which document has the most draft copies? List its document id and number of draft copies.
create table draft_copies (document_id varchar, copy_number varchar, PRIMARY KEY (document_id))
select document_id, count(copy_number) from draft_copies group by document_id order by count(copy_number) desc limit 1
What are the candidates in the district whose incumbent is Gus Yatron?
create table table_1341604_39 (candidates varchar, incumbent varchar, PRIMARY KEY (candidates))
select candidates from table_1341604_39 where incumbent = "gus yatron"
How many female students have milk or egg allergies?
create table student (stuid varchar, sex varchar, PRIMARY KEY (stuid)); create table has_allergy (stuid varchar, allergy varchar, PRIMARY KEY (stuid))
select count(*) from has_allergy as t1 join student as t2 on t1.stuid = t2.stuid where t2.sex = "f" and t1.allergy = "milk" or t1.allergy = "eggs"
If the till agra is 1050, what is the max round trip?
create table table_19787093_1 (for_round_trip integer, till_agra varchar, PRIMARY KEY (for_round_trip))
select max(for_round_trip) from table_19787093_1 where till_agra = 1050
Show paragraph details for paragraph with text 'Korea ' .
create table paragraphs (other_details varchar, paragraph_text varchar, PRIMARY KEY (other_details))
select other_details from paragraphs where paragraph_text like 'korea'
When 9386 is the undergraduate enrollment what is the nickname?
create table table_262495_1 (nickname varchar, undergraduate_enrollment varchar, PRIMARY KEY (nickname))
select nickname from table_262495_1 where undergraduate_enrollment = 9386
What is the density per km in Smoky Lake County?
create table table_2500440_1 (population_density__per_km_2__ varchar, municipal_district varchar, PRIMARY KEY (population_density__per_km_2__))
select population_density__per_km_2__ from table_2500440_1 where municipal_district = "smoky lake county"
What is the strongs transliteration of the hebrew word יוֹחָנָן?
create table table_1242447_1 (strongs_transliteration varchar, hebrew_word varchar, PRIMARY KEY (strongs_transliteration))
select strongs_transliteration from table_1242447_1 where hebrew_word = "יוֹחָנָן"
What is the highest rebound Dennis Rodman obtained within the 20 rebounds category given two of the following:points, rebounds, assists, steals, and blocked shots (points) greater equal to 5
create table table_25696729_8 (double_double varchar, PRIMARY KEY (double_double))
select max(20 as _rebounds) from table_25696729_8 where double_double = 5
How many games or records were played on the Miami Orange Bowl?
create table table_17386066_2 (record varchar, stadium varchar, PRIMARY KEY (record))
select count(record) from table_17386066_2 where stadium = "miami orange bowl"
What is the house colour associated with the house name of Kupe?
create table table_1942683_1 (house_colour varchar, house_name varchar, PRIMARY KEY (house_colour))
select house_colour from table_1942683_1 where house_name = "kupe"
When the 8th is Marcos Hernandez who was the 6th?
create table table_17111812_1 (sixth varchar, eighth varchar, PRIMARY KEY (sixth))
select sixth from table_17111812_1 where eighth = "marcos hernandez"
what is the celebrity where the finished is 5th?
create table table_14345690_5 (celebrity varchar, finished varchar, PRIMARY KEY (celebrity))
select celebrity from table_14345690_5 where finished = "5th"
What is the largest and smallest customer codes?
create table customers (customer_code integer, PRIMARY KEY (customer_code))
select max(customer_code), min(customer_code) from customers
How many clubs have a try bonus value of 5?
create table table_14070062_3 (club varchar, try_bonus varchar, PRIMARY KEY (club))
select count(club) from table_14070062_3 where try_bonus = "5"
What is the power in kilowatts of TV-12?
create table table_24673888_1 (power_kw varchar, ch__number varchar, PRIMARY KEY (power_kw))
select power_kw from table_24673888_1 where ch__number = "tv-12"
Who directed the TV broadcast s03e19?
create table table_15861776_1 (directed_by varchar, tv_broadcast varchar, PRIMARY KEY (directed_by))
select directed_by from table_15861776_1 where tv_broadcast = "s03e19"
What are the results of incumbent dave weldon?
create table table_1805191_10 (results varchar, incumbent varchar, PRIMARY KEY (results))
select count(results) from table_1805191_10 where incumbent = "dave weldon"
Name the manner of departure for 1 december 2009
create table table_22848931_3 (manner_of_departure varchar, date_of_vacancy varchar, PRIMARY KEY (manner_of_departure))
select manner_of_departure from table_22848931_3 where date_of_vacancy = "1 december 2009"
Name the replaced by for 8 july 2009
create table table_22640051_3 (replaced_by varchar, date_of_appointment varchar, PRIMARY KEY (replaced_by))
select replaced_by from table_22640051_3 where date_of_appointment = "8 july 2009"
What is the place of "A Lament for Ying"?
create table table_1805919_1 (standard_order integer, english_translation varchar, PRIMARY KEY (standard_order))
select max(standard_order) from table_1805919_1 where english_translation = "a lament for ying"
What is the control for Christopher Newport University?
create table table_2076608_1 (control varchar, school varchar, PRIMARY KEY (control))
select control from table_2076608_1 where school = "christopher newport university"
What are the names and location of the wrestlers?
create table wrestler (name varchar, location varchar, PRIMARY KEY (name))
select name, location from wrestler
Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25.
create table invoices (invoice_number varchar, invoice_date varchar, PRIMARY KEY (invoice_number))
select invoice_number from invoices where invoice_date < "1989-09-03" or invoice_date > "2007-12-25"
Show the stadium names without any concert.
create table stadium (name varchar, stadium_id varchar, PRIMARY KEY (name)); create table concert (name varchar, stadium_id varchar, PRIMARY KEY (name))
select name from stadium where not stadium_id in (select stadium_id from concert)
How many films titled Gie have been nominated?
create table table_13719788_1 (original_title varchar, film_title_used_in_nomination varchar, PRIMARY KEY (original_title))
select count(original_title) from table_13719788_1 where film_title_used_in_nomination = "gie"
What was the emission rating in Mid-Atlantic South for the vehicle that was rated 300 g/mi (186 g/km) in the Midwest?
create table table_16105186_2 (mid_atlantic_south__washington varchar, _dc_ varchar, midwest__des_moines_ varchar, PRIMARY KEY (mid_atlantic_south__washington))
select mid_atlantic_south__washington, _dc_ from table_16105186_2 where midwest__des_moines_ = "300 g/mi (186 g/km)"
What's the report on Penske Racing winning while the pole position was Al Unser?
create table table_10527215_3 (report varchar, pole_position varchar, winning_team varchar, PRIMARY KEY (report))
select count(report) from table_10527215_3 where pole_position = "al unser" and winning_team = "penske racing"
What is long-term C PK when the short-term C PK is 2.00?
create table table_222448_1 (long_term_c_pk varchar, short_term_c_pk varchar, PRIMARY KEY (long_term_c_pk))
select long_term_c_pk from table_222448_1 where short_term_c_pk = "2.00"
With an original artist names Bette Midler, what is the order number?
create table table_21501565_1 (order__number varchar, original_artist varchar, PRIMARY KEY (order__number))
select count(order__number) from table_21501565_1 where original_artist = "bette midler"
Which settlement has the cyrillic and other name of локве (romanian: locve)?
create table table_2562572_44 (settlement varchar, cyrillic_name_other_names varchar, PRIMARY KEY (settlement))
select settlement from table_2562572_44 where cyrillic_name_other_names = "локве (romanian: locve)"
What is the 2003 seat number, when seats contested was at 38.23%
create table table_20728138_1 (_percentage_in_seats_contested varchar, PRIMARY KEY (_percentage_in_seats_contested))
select min(2003 as _seats) from table_20728138_1 where _percentage_in_seats_contested = "38.23%"
Which countries won by 9 strokes?
create table table_1520559_1 (country varchar, margin_of_victory varchar, PRIMARY KEY (country))
select country from table_1520559_1 where margin_of_victory = "9 strokes"
Provide me with the name of the village (German) where there is 96.9% Slovenes in 1951.
create table table_10798421_1 (village__german_ varchar, percent_of_slovenes_1951 varchar, PRIMARY KEY (village__german_))
select village__german_ from table_10798421_1 where percent_of_slovenes_1951 = "96.9%"
How many candidates won the election in the district whose incumbent is Bud Shuster?
create table table_1341604_39 (candidates varchar, incumbent varchar, PRIMARY KEY (candidates))
select count(candidates) from table_1341604_39 where incumbent = "bud shuster"
Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.
create table phone (hardware_model_name varchar, company_name varchar, accreditation_type varchar, PRIMARY KEY (hardware_model_name))
select hardware_model_name, company_name from phone where accreditation_type like 'full'
How many different items were reviewed by some users?
create table review (i_id varchar, PRIMARY KEY (i_id))
select count(distinct i_id) from review
What is the project detail for the project with document "King Book"?
create table projects (project_details varchar, project_id varchar, PRIMARY KEY (project_details)); create table documents (project_id varchar, document_name varchar, PRIMARY KEY (project_id))
select t1.project_details from projects as t1 join documents as t2 on t1.project_id = t2.project_id where t2.document_name = "king book"
Find all the customer information in state NY.
create table customer (state varchar, PRIMARY KEY (state))
select * from customer where state = "ny"
Name the disposition for date built is march 1909
create table table_1748444_1 (disposition varchar, date_built varchar, PRIMARY KEY (disposition))
select disposition from table_1748444_1 where date_built = "march 1909"
What is the FSB of the model with part number lf80537gf0411m?
create table table_11602313_4 (fsb varchar, part_number_s_ varchar, PRIMARY KEY (fsb))
select fsb from table_11602313_4 where part_number_s_ = "lf80537gf0411m"
Which staff handled least number of payments? List the full name and the id.
create table payment (staff_id varchar, PRIMARY KEY (staff_id)); create table staff (first_name varchar, last_name varchar, staff_id varchar, PRIMARY KEY (first_name))
select t1.first_name, t1.last_name, t1.staff_id from staff as t1 join payment as t2 on t1.staff_id = t2.staff_id group by t1.staff_id order by count(*) limit 1
Who is listed under womens singles when year location is 1998 doha?
create table table_28138035_27 (womens_singles varchar, year_location varchar, PRIMARY KEY (womens_singles))
select womens_singles from table_28138035_27 where year_location = "1998 doha"
What is the graduation rate for the school district with headquarters located in Sydney?
create table table_21514460_1 (graduation_rate__2011_12_ varchar, headquarters varchar, PRIMARY KEY (graduation_rate__2011_12_))
select graduation_rate__2011_12_ from table_21514460_1 where headquarters = "sydney"
What is the number of 1st runner up values for Jamaica?
create table table_30007801_1 (country_territory varchar, PRIMARY KEY (country_territory))
select count(1 as st_runner_up) from table_30007801_1 where country_territory = "jamaica"
What is the NCBI Accession Number for the length of 5304bp/377aa?
create table table_16849531_2 (ncbi_accession_number__mrna_protein_ varchar, length__bp_aa_ varchar, PRIMARY KEY (ncbi_accession_number__mrna_protein_))
select ncbi_accession_number__mrna_protein_ from table_16849531_2 where length__bp_aa_ = "5304bp/377aa"
Who in the family has a gentle personality?
create table table_1912713_2 (家族_family varchar, 性情_personality varchar, PRIMARY KEY (家族_family))
select 家族_family from table_1912713_2 where 性情_personality = "gentle"
Name the least births for conversion being 26,333
create table table_28137918_5 (births integer, conversions varchar, PRIMARY KEY (births))
select min(births) from table_28137918_5 where conversions = "26,333"
What is the highest numbered nightly rank for any episode?
create table table_22892217_4 (nightly_rank integer, PRIMARY KEY (nightly_rank))
select max(nightly_rank) from table_22892217_4
What is the verbal noun connected to the participle e-duki?
create table table_12784134_1 (verbal_noun varchar, participle varchar, PRIMARY KEY (verbal_noun))
select verbal_noun from table_12784134_1 where participle = "e-duki"
Name the gt1 winning team for #54 bell motorsports
create table table_12146068_2 (gt1_winning_team varchar, gt2_winning_team varchar, PRIMARY KEY (gt1_winning_team))
select gt1_winning_team from table_12146068_2 where gt2_winning_team = "#54 bell motorsports"
What is the prize for the elapsed time of 10 h 10 min?
create table table_22050544_1 (prize varchar, elapsed_time varchar, PRIMARY KEY (prize))
select prize from table_22050544_1 where elapsed_time = "10 h 10 min"
Who wrote the episode "The Cold Turkey", which was viewed by 3.73 million viewers?
create table table_17467578_1 (written_by varchar, us_viewers__million_ varchar, PRIMARY KEY (written_by))
select written_by from table_17467578_1 where us_viewers__million_ = "3.73"
What is the name in Basque of the municipality whose official name is Kuartango?
create table table_300283_1 (name_in_basque varchar, official_name varchar, PRIMARY KEY (name_in_basque))
select name_in_basque from table_300283_1 where official_name = "kuartango"
march 27-29 where june 10-11 is 127?
create table table_25355501_2 (march_27_29 varchar, june_10_11 varchar, PRIMARY KEY (march_27_29))
select march_27_29 from table_25355501_2 where june_10_11 = "127"
How many companies had an april 2013 cumulative ranking of 3?
create table table_23950611_2 (market_cap_march_15__mil_usd__ varchar, april_2013_cum_rank varchar, PRIMARY KEY (market_cap_march_15__mil_usd__))
select count(market_cap_march_15__mil_usd__) from table_23950611_2 where april_2013_cum_rank = 3
Name the original air date for barnaby southcomb for charlie martin
create table table_18335117_5 (original_air_date varchar, director varchar, writer varchar, PRIMARY KEY (original_air_date))
select original_air_date from table_18335117_5 where director = "barnaby southcomb" and writer = "charlie martin"
What is the dpi of a scanner with the mm dimensions 280 x 95 x 40?
create table table_16409745_1 (dpi varchar, dimensions__mm_ varchar, PRIMARY KEY (dpi))
select dpi from table_16409745_1 where dimensions__mm_ = "280 x 95 x 40"
What is the 20 year for Nitrous Oxide?
create table table_21350772_2 (gas_name varchar, PRIMARY KEY (gas_name))
select 20 as _yr from table_21350772_2 where gas_name = "nitrous oxide"
What is player 1 when player 3 is South and the prevailing wind is South?
create table table_26853172_1 (player_1 varchar, player_3 varchar, prevailing_wind varchar, PRIMARY KEY (player_1))
select player_1 from table_26853172_1 where player_3 = "south" and prevailing_wind = "south"
What candidates were in the election when james patrick sutton was incumbent?
create table table_1342013_41 (candidates varchar, incumbent varchar, PRIMARY KEY (candidates))
select candidates from table_1342013_41 where incumbent = "james patrick sutton"
Name the number of processors for october 2006 - january 2010
create table table_27765443_2 (no_of_processors varchar, period_of_operation varchar, PRIMARY KEY (no_of_processors))
select no_of_processors from table_27765443_2 where period_of_operation = "october 2006 - january 2010"
Name the party for yvette clarke (d) 90.6% hugh carr (r) 9.4%
create table table_19753079_35 (party varchar, candidates varchar, PRIMARY KEY (party))
select party from table_19753079_35 where candidates = "yvette clarke (d) 90.6% hugh carr (r) 9.4%"
What is the authority who set the budget limit (£m) at 900?
create table table_25316812_1 (authority varchar, budget_limit__£m_ varchar, PRIMARY KEY (authority))
select authority from table_25316812_1 where budget_limit__£m_ = "900"
What are the names of customers using the most popular payment method?
create table customers (customer_name varchar, payment_method varchar, PRIMARY KEY (customer_name))
select customer_name from customers where payment_method = (select payment_method from customers group by payment_method order by count(*) desc limit 1)
Of the years that had exactly 17096 departures, what is the greatest number of aircraft kilometers flown?
create table table_105344_2 (aircraft_kilometers integer, departures varchar, PRIMARY KEY (aircraft_kilometers))
select max(aircraft_kilometers) from table_105344_2 where departures = 17096
Which country had a contestant that was 1.76 meters tall?
create table table_23495048_2 (represent varchar, height__mtr_ varchar, PRIMARY KEY (represent))
select represent from table_23495048_2 where height__mtr_ = "1.76"
What was the maximum total USD collected by Pebble Technology?
create table table_27155990_1 (total_usd integer, creator varchar, PRIMARY KEY (total_usd))
select max(total_usd) from table_27155990_1 where creator = "pebble technology"
Name the total number of bids of the sun belt conference
create table table_10722506_6 (_number_of_bids varchar, conference varchar, PRIMARY KEY (_number_of_bids))
select count(_number_of_bids) from table_10722506_6 where conference = "sun belt"
What team got a draft pick player from McGill?
create table table_25085059_3 (cfl_team varchar, college varchar, PRIMARY KEY (cfl_team))
select cfl_team from table_25085059_3 where college = "mcgill"
What was the date that the episode with Jeff Davis as the second performer originally aired?
create table table_23294081_10 (original_airdate varchar, performer_2 varchar, PRIMARY KEY (original_airdate))
select original_airdate from table_23294081_10 where performer_2 = "jeff davis"
Name the trucks for scott neal
create table table_2187178_1 (truck_s_ varchar, crew_chief varchar, PRIMARY KEY (truck_s_))
select truck_s_ from table_2187178_1 where crew_chief = "scott neal"
How many instances is the unlocked n/a?
create table table_24463470_1 (setting varchar, unlocked_by varchar, PRIMARY KEY (setting))
select count(setting) from table_24463470_1 where unlocked_by = "n/a"
Show names for all aircraft with at least two flights.
create table aircraft (name varchar, aid varchar, PRIMARY KEY (name)); create table flight (aid varchar, PRIMARY KEY (aid))
select t2.name from flight as t1 join aircraft as t2 on t1.aid = t2.aid group by t1.aid having count(*) >= 2
How many locations have a school that is nicknamed the Panthers?
create table table_262560_2 (location varchar, nickname varchar, PRIMARY KEY (location))
select count(location) from table_262560_2 where nickname = "panthers"
When shinya nakano's kawasaki ninja zx-rr is the example what is the graphical?
create table table_22915134_2 (graphical varchar, example varchar, PRIMARY KEY (graphical))
select graphical from table_22915134_2 where example = "shinya nakano's kawasaki ninja zx-rr"
What is the type of the document named "David CV"?
create table documents (document_type_code varchar, document_name varchar, PRIMARY KEY (document_type_code))
select document_type_code from documents where document_name = "david cv"
How many votes for brown in the place that had 84.1% for coakley?
create table table_24115349_6 (brown_votes integer, coakley__percentage varchar, PRIMARY KEY (brown_votes))
select max(brown_votes) from table_24115349_6 where coakley__percentage = "84.1%"
Show all dates of transactions whose type code is "SALE".
create table transactions (date_of_transaction varchar, transaction_type_code varchar, PRIMARY KEY (date_of_transaction))
select date_of_transaction from transactions where transaction_type_code = "sale"
If Coba is the song choice, what is the order number?
create table table_22736523_1 (order__number varchar, song_choice varchar, PRIMARY KEY (order__number))
select order__number from table_22736523_1 where song_choice = "coba"
How many overs bowled for muttiah muralitharan?
create table table_15700367_6 (overs_bowled varchar, name varchar, PRIMARY KEY (overs_bowled))
select count(overs_bowled) from table_15700367_6 where name = "muttiah muralitharan"
How many viewers tuned into the show directed by Matt Earl Beesley?
create table table_10718525_2 (us_viewers__millions_ varchar, directed_by varchar, PRIMARY KEY (us_viewers__millions_))
select us_viewers__millions_ from table_10718525_2 where directed_by = "matt earl beesley"
Which narrator has the bonus interview with Frazer Hines?
create table table_1681535_1 (narrator varchar, notes varchar, PRIMARY KEY (narrator))
select narrator from table_1681535_1 where notes = "bonus interview with frazer hines"
What percentage of hispanics are there when the free/reduced lunch percentage is 81.4?
create table table_14754471_1 (hispanic___percentage_ varchar, free_reduced_lunch___percentage_ varchar, PRIMARY KEY (hispanic___percentage_))
select hispanic___percentage_ from table_14754471_1 where free_reduced_lunch___percentage_ = "81.4"
Who wrote the episode that received 1.83 million U.S. viewers?
create table table_13477468_3 (written_by varchar, us_viewers__millions_ varchar, PRIMARY KEY (written_by))
select written_by from table_13477468_3 where us_viewers__millions_ = "1.83"
What is the status of the county with per capita market income of $24,326?
create table table_22815568_2 (status varchar, market_income_per_capita varchar, PRIMARY KEY (status))
select status from table_22815568_2 where market_income_per_capita = "$24,326"
What team was the opponent when josh smith (8) had the high assists?
create table table_27734577_13 (team varchar, high_assists varchar, PRIMARY KEY (team))
select team from table_27734577_13 where high_assists = "josh smith (8)"
What were the July (°C) temperatures when the July (°F) temperatures were 71/55?
create table table_21980_1 (july__°c_ varchar, july__°f_ varchar, PRIMARY KEY (july__°c_))
select july__°c_ from table_21980_1 where july__°f_ = "71/55"
What team hired Renato Gaúcho?
create table table_29414946_3 (team varchar, replaced_by varchar, PRIMARY KEY (team))
select team from table_29414946_3 where replaced_by = "renato gaúcho"
What was the record in the game against Eskimos?
create table table_23685152_2 (record varchar, opponent varchar, PRIMARY KEY (record))
select record from table_23685152_2 where opponent = "eskimos"
Name the english gloss for naháŋȟčiŋ
create table table_1499791_2 (english_gloss varchar, southern_lakota varchar, PRIMARY KEY (english_gloss))
select english_gloss from table_1499791_2 where southern_lakota = "naháŋȟčiŋ"
Show the product ids and the number of unique orders containing each product.
create table order_items (product_id varchar, order_id varchar, PRIMARY KEY (product_id))
select product_id, count(distinct order_id) from order_items group by product_id
Find the total number of hours have done for all students in each department.
create table student (dept_code varchar, stu_hrs integer, PRIMARY KEY (dept_code))
select sum(stu_hrs), dept_code from student group by dept_code
If the time on Tues Aug 24 is 20' 49.46 108.709mph, what is the time on Fri Aug 27?
create table table_26986076_1 (fri_27_aug varchar, tues_24_aug varchar, PRIMARY KEY (fri_27_aug))
select fri_27_aug from table_26986076_1 where tues_24_aug = "20' 49.46 108.709mph"
Name the duration for georgi grechko
create table table_245801_1 (duration__days_ varchar, crew varchar, PRIMARY KEY (duration__days_))
select duration__days_ from table_245801_1 where crew = "georgi grechko"
how many countries have remittances in 2008 of 9.07?
create table table_2941963_1 (country varchar, remittances_2008 varchar, PRIMARY KEY (country))
select count(country) from table_2941963_1 where remittances_2008 = "9.07"
what's the author / editor / source with world ranking (1) being 73rd
create table table_12000368_1 (author___editor___source varchar, world_ranking__1_ varchar, PRIMARY KEY (author___editor___source))
select author___editor___source from table_12000368_1 where world_ranking__1_ = "73rd"
What is the cable rank for episode no. 4?
create table table_24399615_3 (cable_rank varchar, episode_no varchar, PRIMARY KEY (cable_rank))
select cable_rank from table_24399615_3 where episode_no = 4