question
stringlengths
14
216
context
stringlengths
45
458
answer
stringlengths
18
463
Find the number of trains starting from each origin.
create table train (origin varchar, PRIMARY KEY (origin))
select origin, count(*) from train group by origin
Show student ids who are female and play football.
create table sportsinfo (stuid varchar, sex varchar, sportname varchar, PRIMARY KEY (stuid)); create table student (stuid varchar, sex varchar, sportname varchar, PRIMARY KEY (stuid))
select stuid from student where sex = 'f' intersect select stuid from sportsinfo where sportname = "football"
What is the ISIN that has a coupon of 1.02 and a value issued of 447,000,000?
create table table_21692771_1 (isin varchar, coupon varchar, amount_issued_ varchar, € varchar, PRIMARY KEY (isin))
select isin from table_21692771_1 where coupon = "1.02" and amount_issued_[€] = "447,000,000"
Who is the winner when the st kilda score is 13.10.88?
create table table_28211103_1 (winner varchar, st_kilda_score varchar, PRIMARY KEY (winner))
select winner from table_28211103_1 where st_kilda_score = "13.10.88"
What was the record for the game where the opponent was the Carolina Hurricanes?
create table table_27537518_9 (record varchar, opponent varchar, PRIMARY KEY (record))
select record from table_27537518_9 where opponent = "carolina hurricanes"
What's the title of the episode with production number 103?
create table table_23958944_2 (title varchar, production_number varchar, PRIMARY KEY (title))
select title from table_23958944_2 where production_number = 103
What was the date of appointment for the manager of the 23rd team?
create table table_18795125_6 (date_of_appointment varchar, position_in_table varchar, PRIMARY KEY (date_of_appointment))
select date_of_appointment from table_18795125_6 where position_in_table = "23rd"
If the special weapon is the Grenado, what is the armor?
create table table_27704991_1 (armor varchar, special_weapon varchar, PRIMARY KEY (armor))
select armor from table_27704991_1 where special_weapon = "grenado"
What party does Bill McCollum belong to?
create table table_1341453_11 (party varchar, incumbent varchar, PRIMARY KEY (party))
select party from table_1341453_11 where incumbent = "bill mccollum"
If the time on Wed aug 25 was 20' 09.25 112.324mph, what was the time on sat Aug 28?
create table table_26986076_1 (sat_28_aug varchar, wed_25_aug varchar, PRIMARY KEY (sat_28_aug))
select sat_28_aug from table_26986076_1 where wed_25_aug = "20' 09.25 112.324mph"
What are the notes of the satellite whose nssdc id number is 1959-002a?
create table table_191323_2 (notes varchar, nssdc_id_no varchar, PRIMARY KEY (notes))
select notes from table_191323_2 where nssdc_id_no = "1959-002a"
If the dry density is 800, what is the drying shrinkage %?
create table table_24969173_1 (drying_shrinkage___percentage_ varchar, dry_density__kg_m3_ varchar, PRIMARY KEY (drying_shrinkage___percentage_))
select drying_shrinkage___percentage_ from table_24969173_1 where dry_density__kg_m3_ = 800
When westcott is in division one how many leagues are in division 5?
create table table_24575253_4 (division_five varchar, division_one varchar, PRIMARY KEY (division_five))
select count(division_five) from table_24575253_4 where division_one = "westcott"
When they played San Lorenzo, what was the score of the second leg?
create table table_17282875_3 (team__number1 varchar, PRIMARY KEY (team__number1))
select 2 as nd_leg from table_17282875_3 where team__number1 = "san lorenzo"
as is the quantity variety of score between ultimate the place opponents between remaining is alexandra fusai nathalie tauziat
create table table_23197088_4 (score_in_final varchar, opponents_in_final varchar, PRIMARY KEY (score_in_final))
select count(score_in_final) from table_23197088_4 where opponents_in_final = "alexandra fusai nathalie tauziat"
What is the lowest score of all games for match 2?
create table table_24538140_2 (match2 integer, PRIMARY KEY (match2))
select min(match2) from table_24538140_2
Who had highest assists at the game against Houston?
create table table_27700530_11 (high_assists varchar, team varchar, PRIMARY KEY (high_assists))
select high_assists from table_27700530_11 where team = "houston"
Which country has had 6 miss universe's?
create table table_28634206_1 (country varchar, miss_universe varchar, PRIMARY KEY (country))
select country from table_28634206_1 where miss_universe = "6"
Which team was the away team when the home team was north melbourne?
create table table_29090919_1 (away_team varchar, home_team varchar, PRIMARY KEY (away_team))
select away_team from table_29090919_1 where home_team = "north melbourne"
What is the L3 cache for the processor having a speed of 2.93 GHz?
create table table_269920_16 (l3_cache__mb_ varchar, speed__ghz_ varchar, PRIMARY KEY (l3_cache__mb_))
select l3_cache__mb_ from table_269920_16 where speed__ghz_ = "2.93"
How many players were drafted by the Philadelphia Flyers?
create table table_2679061_11 (nationality varchar, nhl_team varchar, PRIMARY KEY (nationality))
select count(nationality) from table_2679061_11 where nhl_team = "philadelphia flyers"
When did the episode written by Jim Morris air?
create table table_10470082_8 (us_air_date varchar, writer varchar, PRIMARY KEY (us_air_date))
select us_air_date from table_10470082_8 where writer = "jim morris"
What are the maximum, minimum, and average booked count for the products booked?
create table products_booked (booked_count integer, PRIMARY KEY (booked_count))
select max(booked_count), min(booked_count), avg(booked_count) from products_booked
how many broadcaste dates features the overtones
create table table_29135051_3 (broadcast_date varchar, singer_s_ varchar, PRIMARY KEY (broadcast_date))
select count(broadcast_date) from table_29135051_3 where singer_s_ = "the overtones"
How many players had the most assists against New Jersey?
create table table_15873014_3 (high_assists varchar, team varchar, PRIMARY KEY (high_assists))
select count(high_assists) from table_15873014_3 where team = "new jersey"
who is the the judges with seasons and winners being season 1, 2013–2014: upcoming season
create table table_13779832_1 (judges varchar, seasons_and_winners varchar, PRIMARY KEY (judges))
select judges from table_13779832_1 where seasons_and_winners = "season 1, 2013–2014: upcoming season"
When was the first UK broadcast when the official Barb ratings was 1085000?
create table table_26591309_2 (first_broadcast_uk___bbc_four__ varchar, official_barb_ratings varchar, PRIMARY KEY (first_broadcast_uk___bbc_four__))
select first_broadcast_uk___bbc_four__ from table_26591309_2 where official_barb_ratings = 1085000
What was the score on the 1st leg if the team 2 is botafogo?
create table table_17282875_2 (team__number2 varchar, PRIMARY KEY (team__number2))
select count(1 as st_leg) from table_17282875_2 where team__number2 = "botafogo"
When bmw activee is the vehicle type what is the u.s national average electric mix?
create table table_24620684_2 (us_national_average_electric_mix varchar, vehicle varchar, PRIMARY KEY (us_national_average_electric_mix))
select us_national_average_electric_mix from table_24620684_2 where vehicle = "bmw activee"
Show the names of companies in the banking or retailing industry?
create table company (name varchar, industry varchar, PRIMARY KEY (name))
select name from company where industry = "banking" or industry = "retailing"
What was the outcome of the game when the opponent was Magdaléna Rybáriková?
create table table_18183850_12 (outcome varchar, opponent varchar, PRIMARY KEY (outcome))
select outcome from table_18183850_12 where opponent = "magdaléna rybáriková"
What is the percentage of republican voters in which the d-r spread is -14.1%?
create table table_27003223_4 (republican varchar, d_r_spread varchar, PRIMARY KEY (republican))
select republican from table_27003223_4 where d_r_spread = "-14.1%"
Who won the episode in which Sean Lock was Rufus's guest?
create table table_19930660_2 (winner varchar, rufus_guest varchar, PRIMARY KEY (winner))
select winner from table_19930660_2 where rufus_guest = "sean lock"
How many companies operates airlines in each airport?
create table airport (id varchar, PRIMARY KEY (id)); create table flight (id varchar, PRIMARY KEY (id)); create table operate_company (id varchar, PRIMARY KEY (id))
select t3.id, count(*) from operate_company as t1 join flight as t2 on t1.id = t2.company_id join airport as t3 on t2.airport_id = t3.id group by t3.id
Who won the Brands Hatch circuit?
create table table_1140088_6 (winning_driver varchar, circuit varchar, PRIMARY KEY (winning_driver))
select winning_driver from table_1140088_6 where circuit = "brands hatch"
where is the participant marelissa him from
create table table_27515452_3 (hometown varchar, contestant varchar, PRIMARY KEY (hometown))
select hometown from table_27515452_3 where contestant = "marelissa him"
How many years did he have an average finish of 29.2?
create table table_1637041_2 (winnings varchar, avg_finish varchar, PRIMARY KEY (winnings))
select count(winnings) from table_1637041_2 where avg_finish = "29.2"
What was the missing for lieutenant general sir thomas picton?
create table table_11793221_4 (missing varchar, commander varchar, PRIMARY KEY (missing))
select missing from table_11793221_4 where commander = "lieutenant general sir thomas picton"
Show all distinct product categories along with the number of mailshots in each category.
create table mailshot_campaigns (product_category varchar, PRIMARY KEY (product_category))
select product_category, count(*) from mailshot_campaigns group by product_category
What is the Japanese title for Fantasy?
create table table_11839306_2 (japanese_title varchar, english_title varchar, PRIMARY KEY (japanese_title))
select japanese_title from table_11839306_2 where english_title = "fantasy"
who is the the high rebounds with team being vancouver
create table table_13557843_7 (high_rebounds varchar, team varchar, PRIMARY KEY (high_rebounds))
select high_rebounds from table_13557843_7 where team = "vancouver"
How many locations are listed for the Big 12 Conference?
create table table_22645714_5 (tournament_venue__city_ varchar, conference varchar, PRIMARY KEY (tournament_venue__city_))
select count(tournament_venue__city_) from table_22645714_5 where conference = "big 12 conference"
How many words are there in rusyn for the bulgarian word купува (kupuva)?
create table table_28136_15 (rusyn varchar, bulgarian varchar, PRIMARY KEY (rusyn))
select count(rusyn) from table_28136_15 where bulgarian = "купува (kupuva)"
Show all template type codes that are not used by any document.
create table documents (template_id varchar, PRIMARY KEY (template_id)); create table templates (template_id varchar, PRIMARY KEY (template_id)); create table templates (template_type_code varchar, PRIMARY KEY (template_type_code))
select template_type_code from templates except select template_type_code from templates as t1 join documents as t2 on t1.template_id = t2.template_id
What is the winning coach total number if the top team in regular season (points) is the Kansas City Spurs (110 points)?
create table table_237757_3 (winning_coach varchar, top_team_in_regular_season__points_ varchar, PRIMARY KEY (winning_coach))
select count(winning_coach) from table_237757_3 where top_team_in_regular_season__points_ = "kansas city spurs (110 points)"
When sweden is the country who is the skip?
create table table_26912584_2 (skip varchar, country varchar, sweden varchar, PRIMARY KEY (skip))
select skip from table_26912584_2 where country = sweden
What are the ids of all students for courses and what are the names of those courses?
create table courses (course_name varchar, course_id varchar, PRIMARY KEY (course_name)); create table student_course_registrations (student_id varchar, course_id varchar, PRIMARY KEY (student_id))
select t1.student_id, t2.course_name from student_course_registrations as t1 join courses as t2 on t1.course_id = t2.course_id
When 0,4, or 8 mb is the nupowr 117 what is the sonnet?
create table table_3002894_4 (sonnet varchar, nupowr_117 varchar, PRIMARY KEY (sonnet))
select sonnet from table_3002894_4 where nupowr_117 = "0,4, or 8 mb"
List the top 5 genres by number of tracks. List genres name and total tracks.
create table tracks (genre_id varchar, PRIMARY KEY (genre_id)); create table genres (name varchar, id varchar, PRIMARY KEY (name))
select t1.name, count(*) from genres as t1 join tracks as t2 on t2.genre_id = t1.id group by t1.id order by count(*) desc limit 5
What is the order number of the Billboard Hot 100 Hits theme and the original artist was Sixpence None the Richer?
create table table_26250155_1 (order__number varchar, theme varchar, original_artist varchar, PRIMARY KEY (order__number))
select order__number from table_26250155_1 where theme = "billboard hot 100 hits" and original_artist = "sixpence none the richer"
How many candidates were there in the race where Cecil R. King is the incumbent?
create table table_1342198_6 (candidates varchar, incumbent varchar, PRIMARY KEY (candidates))
select count(candidates) from table_1342198_6 where incumbent = "cecil r. king"
Which US air date had 4.4 million viewers?
create table table_17901155_4 (original_us_air_date varchar, viewers__millions_ varchar, PRIMARY KEY (original_us_air_date))
select original_us_air_date from table_17901155_4 where viewers__millions_ = "4.4"
who is the champion where semi-finalist #2 is na and location is morrisville, nc
create table table_11214772_1 (champion varchar, semi_finalist__number2 varchar, location varchar, PRIMARY KEY (champion))
select champion from table_11214772_1 where semi_finalist__number2 = "na" and location = "morrisville, nc"
Name the number of womens doubles for 2011 rio de janeiro
create table table_28138035_4 (womens_doubles varchar, year_location varchar, PRIMARY KEY (womens_doubles))
select count(womens_doubles) from table_28138035_4 where year_location = "2011 rio de janeiro"
How many locations were recorded when the opponent Columbus Blue Jackets?
create table table_17360840_9 (location varchar, opponent varchar, PRIMARY KEY (location))
select count(location) from table_17360840_9 where opponent = "columbus blue jackets"
What is the version with sbagen software?
create table table_15038373_1 (version varchar, software varchar, PRIMARY KEY (version))
select version from table_15038373_1 where software = "sbagen"
Who wrote the episodes that were directed by Peter O'Fallon?
create table table_28561455_1 (written_by varchar, directed_by varchar, PRIMARY KEY (written_by))
select written_by from table_28561455_1 where directed_by = "peter o'fallon"
What is the name where p is mf?
create table table_11891841_2 (name varchar, p varchar, PRIMARY KEY (name))
select name from table_11891841_2 where p = "mf"
What prefecture is listed in the map as number 39?
create table table_221398_1 (prefecture varchar, number_in_map varchar, PRIMARY KEY (prefecture))
select prefecture from table_221398_1 where number_in_map = "39"
What's the area of the voivodenship with 51 communes?
create table table_11656578_2 (area_km²__1998_ varchar, no_of_communes varchar, PRIMARY KEY (area_km²__1998_))
select area_km²__1998_ from table_11656578_2 where no_of_communes = 51
What is department name and office for the professor whose last name is Heffington?
create table employee (emp_num varchar, emp_lname varchar, PRIMARY KEY (emp_num)); create table department (dept_name varchar, dept_code varchar, PRIMARY KEY (dept_name)); create table professor (prof_office varchar, emp_num varchar, dept_code varchar, PRIMARY KEY (prof_office))
select t3.dept_name, t2.prof_office from employee as t1 join professor as t2 on t1.emp_num = t2.emp_num join department as t3 on t2.dept_code = t3.dept_code where t1.emp_lname = 'heffington'
Who directed what was written by Michael G. Moye & Ron Leavitt & J. Stanford Parker?
create table table_2226817_3 (directed_by varchar, written_by varchar, PRIMARY KEY (directed_by))
select directed_by from table_2226817_3 where written_by = "michael g. moye & ron leavitt & j. stanford parker"
HOw many films did martin repka category:articles with hcards direct?
create table table_22032599_1 (film_title_used_in_nomination varchar, director varchar, PRIMARY KEY (film_title_used_in_nomination))
select count(film_title_used_in_nomination) from table_22032599_1 where director = "martin repka category:articles with hcards"
What is the location of the Carousel toll plaza?
create table table_1211545_2 (location varchar, name varchar, PRIMARY KEY (location))
select location from table_1211545_2 where name = "carousel toll plaza"
What is the partition id of the user named "Iron Man".
create table user_profiles (partitionid varchar, name varchar, PRIMARY KEY (partitionid))
select partitionid from user_profiles where name = 'iron man'
The Keutenberg race had what race length?
create table table_1749567_2 (length__in_m_ integer, name varchar, PRIMARY KEY (length__in_m_))
select max(length__in_m_) from table_1749567_2 where name = "keutenberg"
When did the staff member with first name as Janessa and last name as Sawayn leave the company?
create table staff (date_left_staff varchar, first_name varchar, last_name varchar, PRIMARY KEY (date_left_staff))
select date_left_staff from staff where first_name = "janessa" and last_name = "sawayn"
Please show the employee last names that serves no more than 20 customers.
create table employee (employeeid varchar, PRIMARY KEY (employeeid)); create table customer (lastname varchar, supportrepid varchar, PRIMARY KEY (lastname))
select t1.lastname from customer as t1 join employee as t2 on t1.supportrepid = t2.employeeid group by t1.supportrepid having count(*) <= 20
How many netflow version are there when the vendor and type is enterasys switches?
create table table_1206114_2 (netflow_version varchar, vendor_and_type varchar, PRIMARY KEY (netflow_version))
select count(netflow_version) from table_1206114_2 where vendor_and_type = "enterasys switches"
Which conference has the nickname Chargers?
create table table_1973729_2 (current_conference varchar, nickname varchar, PRIMARY KEY (current_conference))
select current_conference from table_1973729_2 where nickname = "chargers"
What province has the Chinese translation 重庆?
create table table_16489766_2 (province varchar, chinese varchar, PRIMARY KEY (province))
select count(province) from table_16489766_2 where chinese = "重庆"
List the object number of railways that do not have any trains.
create table train (objectnumber varchar, railway_id varchar, PRIMARY KEY (objectnumber)); create table railway (objectnumber varchar, railway_id varchar, PRIMARY KEY (objectnumber))
select objectnumber from railway where not railway_id in (select railway_id from train)
How many entries are shown for winnings for team #07 robby gordon motorsports?
create table table_1507423_5 (winnings varchar, team_s_ varchar, PRIMARY KEY (winnings))
select count(winnings) from table_1507423_5 where team_s_ = "#07 robby gordon motorsports"
How many papers are published by the institution "Tokohu University"?
create table inst (instid varchar, name varchar, PRIMARY KEY (instid)); create table authorship (paperid varchar, instid varchar, PRIMARY KEY (paperid)); create table papers (title varchar, paperid varchar, PRIMARY KEY (title))
select count(distinct t1.title) from papers as t1 join authorship as t2 on t1.paperid = t2.paperid join inst as t3 on t2.instid = t3.instid where t3.name = "tokohu university"
what's the mission with primary payload(s) being spacelab life sciences-2
create table table_14118521_1 (mission varchar, primary_payload_s_ varchar, PRIMARY KEY (mission))
select mission from table_14118521_1 where primary_payload_s_ = "spacelab life sciences-2"
Return all distinct detention type codes.
create table detention (detention_type_code varchar, PRIMARY KEY (detention_type_code))
select distinct detention_type_code from detention
Which continent is Anguilla in?
create table country (continent varchar, name varchar, PRIMARY KEY (continent))
select continent from country where name = "anguilla"
What is the acronym used for Beirut Arab University?
create table table_1160660_1 (acronym varchar, university_name varchar, PRIMARY KEY (acronym))
select acronym from table_1160660_1 where university_name = "beirut arab university"
What school had an enrollment in 2005 of 69?
create table table_2076490_1 (school varchar, enrollment__2005_ varchar, PRIMARY KEY (school))
select school from table_2076490_1 where enrollment__2005_ = "69"
Show all role codes and the number of employees in each role.
create table employees (role_code varchar, PRIMARY KEY (role_code))
select role_code, count(*) from employees group by role_code
Who is the manager for the fc inter club?
create table table_29250534_1 (manager varchar, club varchar, PRIMARY KEY (manager))
select manager from table_29250534_1 where club = "fc inter"
Who is every driver for the location of Estoril Circuit?
create table table_23293785_2 (driver varchar, location varchar, PRIMARY KEY (driver))
select driver from table_23293785_2 where location = "estoril circuit"
What is the compound name listed where marine organism α is worm
create table table_12715053_1 (compound_name varchar, marine_organism_α varchar, PRIMARY KEY (compound_name))
select compound_name from table_12715053_1 where marine_organism_α = "worm"
What year is dayton in class AAAA?
create table table_15315103_1 (school_year varchar, class_aaaa varchar, dayton varchar, PRIMARY KEY (school_year))
select school_year from table_15315103_1 where class_aaaa = dayton
How many verbs mean to grow, to produce
create table table_1745843_10 (part_1 varchar, verb_meaning varchar, PRIMARY KEY (part_1))
select count(part_1) from table_1745843_10 where verb_meaning = "to grow, to produce"
What is the cospar ID of the Kosmos 2397 satellite, which has an operational life of 2 months?
create table table_18161217_2 (cospar_id varchar, estimated_operational_life varchar, satellite varchar, PRIMARY KEY (cospar_id))
select cospar_id from table_18161217_2 where estimated_operational_life = "2 months" and satellite = "kosmos 2397"
What is the branding of the callsign DWCI-TV?
create table table_2610582_2 (branding varchar, callsign varchar, PRIMARY KEY (branding))
select branding from table_2610582_2 where callsign = "dwci-tv"
Group by ships by flag, and return number of ships that have each flag.
create table ship (flag varchar, PRIMARY KEY (flag))
select count(*), flag from ship group by flag
Which nominations are connected to the film Totalitarian Romance?
create table table_10236830_4 (nomination varchar, film_name varchar, PRIMARY KEY (nomination))
select nomination from table_10236830_4 where film_name = "totalitarian romance"
What are the International tourist arrivals (2010) where change from 2010 to 2011 is +15%
create table table_14752049_2 (international_tourist_arrivals__2010_ varchar, change__2010_to_2011_ varchar, PRIMARY KEY (international_tourist_arrivals__2010_))
select international_tourist_arrivals__2010_ from table_14752049_2 where change__2010_to_2011_ = "+15%"
who won mixed doubles when wang yihan 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 = "wang yihan"
Find the name and email for the users who have more than one follower.
create table follows (f1 varchar, PRIMARY KEY (f1)); create table user_profiles (name varchar, email varchar, uid varchar, PRIMARY KEY (name))
select t1.name, t1.email from user_profiles as t1 join follows as t2 on t1.uid = t2.f1 group by t2.f1 having count(*) > 1
Name the wraps per inch for 120-240
create table table_20297668_1 (wraps_per_inch__wpi_ varchar, m_100g varchar, PRIMARY KEY (wraps_per_inch__wpi_))
select wraps_per_inch__wpi_ from table_20297668_1 where m_100g = "120-240"
What is Phil Crane, democrat or republican
create table table_1341663_14 (party varchar, incumbent varchar, PRIMARY KEY (party))
select party from table_1341663_14 where incumbent = "phil crane"
What is the most popular payment method?
create table payments (payment_method_code varchar, PRIMARY KEY (payment_method_code))
select payment_method_code from payments group by payment_method_code order by count(*) desc limit 1
Which country has had 8 miss universes?
create table table_28634206_1 (country varchar, miss_universe varchar, PRIMARY KEY (country))
select country from table_28634206_1 where miss_universe = "8"
How many U.S. viewers were there for the episode written by Lazar Saric & Jed Spingarn?
create table table_25246990_5 (us_viewers__millions_ varchar, written_by varchar, PRIMARY KEY (us_viewers__millions_))
select us_viewers__millions_ from table_25246990_5 where written_by = "lazar saric & jed spingarn"
Who was the radio 1 presenter for the broadcast that had 9.73 million viewers?
create table table_24212608_1 (radio_1_presenter varchar, viewers__millions_ varchar, PRIMARY KEY (radio_1_presenter))
select radio_1_presenter from table_24212608_1 where viewers__millions_ = "9.73"
Name the transit connections for capitol hill u
create table table_22771048_3 (transit_connections varchar, station varchar, PRIMARY KEY (transit_connections))
select transit_connections from table_22771048_3 where station = "capitol hill u"
During the 1st Place (Won the Series), who was the act?
create table table_23429629_4 (act varchar, place_came varchar, PRIMARY KEY (act))
select act from table_23429629_4 where place_came = "1st place (won the series)"