question
stringlengths
12
244
context
stringlengths
27
489
answer
stringlengths
18
557
What is the largest and smallest customer codes?
CREATE TABLE Customers (customer_code INTEGER)
SELECT MAX(customer_code), MIN(customer_code) FROM Customers
what's the type with description being fires when the overflow state changes.
CREATE TABLE table_1507852_5 (type VARCHAR, description VARCHAR)
SELECT type FROM table_1507852_5 WHERE description = "Fires when the overflow state changes."
If the Close ranged weapons are the knife (stone), knife (iron), what are the Long ranged weapons?
CREATE TABLE table_27704991_1 (long_ranged_weapons VARCHAR, close_ranged_weapons VARCHAR)
SELECT long_ranged_weapons FROM table_27704991_1 WHERE close_ranged_weapons = "Knife (stone), Knife (iron)"
How many tracks are in the AAC audio file media type?
CREATE TABLE MEDIATYPE (MediaTypeId VARCHAR, Name VARCHAR); CREATE TABLE TRACK (MediaTypeId VARCHAR)
SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = "AAC audio file"
For what motion picture did Samuel L. Jackson win the best supporting actor award before 1997?
CREATE TABLE table_name_42 (motion_picture VARCHAR, year VARCHAR, award VARCHAR, actor VARCHAR)
SELECT motion_picture FROM table_name_42 WHERE award = "best supporting actor" AND actor = "samuel l. jackson" AND year < 1997
what is the tonnage grt of the ship author?
CREATE TABLE table_name_40 (tonnage_grt VARCHAR, ship VARCHAR)
SELECT tonnage_grt FROM table_name_40 WHERE ship = "author"
Which Enrollment has a Mascot of norsemen?
CREATE TABLE table_name_5 (enrollment INTEGER, mascot VARCHAR)
SELECT SUM(enrollment) FROM table_name_5 WHERE mascot = "norsemen"
What is the Date of the match with Partner Steffi Graf with a Score in Final of 4–6, 1–6?
CREATE TABLE table_name_26 (date VARCHAR, score_in_final VARCHAR, partner VARCHAR)
SELECT date FROM table_name_26 WHERE score_in_final = "4–6, 1–6" AND partner = "steffi graf"
Which League showed 7,975 for an average attendance?
CREATE TABLE table_name_20 (league VARCHAR, attendance_average VARCHAR)
SELECT league FROM table_name_20 WHERE attendance_average = "7,975"
what is the highest bronze when silver is less than 1 and gold is more than 0?
CREATE TABLE table_name_11 (bronze INTEGER, silver VARCHAR, gold VARCHAR)
SELECT MAX(bronze) FROM table_name_11 WHERE silver < 1 AND gold > 0
name the total number of timeslot for number 1
CREATE TABLE table_19834691_4 (timeslot VARCHAR, _number VARCHAR)
SELECT COUNT(timeslot) FROM table_19834691_4 WHERE _number = 1
What is the number of runner-up results for the years (won in bold) 1984, 2010?
CREATE TABLE table_1463332_2 (_number_runner_up INTEGER, years__won_in_bold_ VARCHAR)
SELECT MAX(_number_runner_up) FROM table_1463332_2 WHERE years__won_in_bold_ = "1984, 2010"
What was the attendance for the week 1 game?
CREATE TABLE table_name_9 (attendance VARCHAR, week VARCHAR)
SELECT attendance FROM table_name_9 WHERE week = 1
Which competition took place at Stade Fernand Fournier, Arles?
CREATE TABLE table_name_51 (competition VARCHAR, venue VARCHAR)
SELECT competition FROM table_name_51 WHERE venue = "stade fernand fournier, arles"
What is the total on average for teams with 3 tournaments?
CREATE TABLE table_name_8 (total INTEGER, tournament VARCHAR)
SELECT AVG(total) FROM table_name_8 WHERE tournament = 3
What is the course on 1 June?
CREATE TABLE table_name_10 (course VARCHAR, date VARCHAR)
SELECT course FROM table_name_10 WHERE date = "1 june"
Name the least number for nello pagani
CREATE TABLE table_28578594_1 (no INTEGER, driver VARCHAR)
SELECT MIN(no) FROM table_28578594_1 WHERE driver = "Nello Pagani"
What is the margin of victory for Nick Price as a runner-up?
CREATE TABLE table_name_52 (margin_of_victory VARCHAR, runner_s__up VARCHAR)
SELECT margin_of_victory FROM table_name_52 WHERE runner_s__up = "nick price"
What is the location of the game with a 6-11-8 record?
CREATE TABLE table_name_71 (location VARCHAR, record VARCHAR)
SELECT location FROM table_name_71 WHERE record = "6-11-8"
Who did the Jets play in the Meadowlands on week 14?
CREATE TABLE table_name_46 (opponent VARCHAR, game_site VARCHAR, week VARCHAR)
SELECT opponent FROM table_name_46 WHERE game_site = "the meadowlands" AND week = 14
What song has a length of 3:05?
CREATE TABLE table_10848177_1 (song VARCHAR, length VARCHAR)
SELECT song FROM table_10848177_1 WHERE length = "3:05"
What was the average amount of laps for competitors with a grid that was more than 11 and a Time/Retired of +28.108?
CREATE TABLE table_name_27 (laps INTEGER, time_retired VARCHAR, grid VARCHAR)
SELECT AVG(laps) FROM table_name_27 WHERE time_retired = "+28.108" AND grid > 11
What are the issue dates of volumes associated with the artist aged 23 or younger?
CREATE TABLE volume (Artist_ID VARCHAR); CREATE TABLE artist (Artist_ID VARCHAR, age VARCHAR)
SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23
In what venue did the fielding team Sri Lanka play?
CREATE TABLE table_name_86 (venue VARCHAR, fielding_team VARCHAR)
SELECT venue FROM table_name_86 WHERE fielding_team = "sri lanka"
In italy, when the stolen ends were 10 and blank ends were under 14, what's the lowest ends won?
CREATE TABLE table_name_45 (ends_won INTEGER, blank_ends VARCHAR, stolen_ends VARCHAR, locale VARCHAR)
SELECT MIN(ends_won) FROM table_name_45 WHERE stolen_ends = 10 AND locale = "italy" AND blank_ends < 14
Who is the rider with a yamaha manufacturer and a 17 grid?
CREATE TABLE table_name_21 (rider VARCHAR, manufacturer VARCHAR, grid VARCHAR)
SELECT rider FROM table_name_21 WHERE manufacturer = "yamaha" AND grid = "17"
What is the position of the player with a 5 (4 in 32.66s) in the 6 atlas stones event?
CREATE TABLE table_24302700_6 (position VARCHAR, event_6_atlas_stones VARCHAR)
SELECT position FROM table_24302700_6 WHERE event_6_atlas_stones = "5 (4 in 32.66s)"
What is the lowest rank that the protestants population holds?
CREATE TABLE table_name_67 (rank INTEGER, name VARCHAR)
SELECT MIN(rank) FROM table_name_67 WHERE name = "protestants population"
What is the lens zoom and aperture for the coolpix 5400?
CREATE TABLE table_name_79 (lens__35mm_equiv__zoom VARCHAR, _aperture VARCHAR, model VARCHAR)
SELECT lens__35mm_equiv__zoom, _aperture FROM table_name_79 WHERE model = "coolpix 5400"
What is the total number of Premier, when Second is "55"?
CREATE TABLE table_name_67 (premier VARCHAR, second VARCHAR)
SELECT COUNT(premier) FROM table_name_67 WHERE second = 55
What's the school that has an enrollment more than 441 with chargers as their mascot?
CREATE TABLE table_name_35 (school VARCHAR, enrollment VARCHAR, mascot VARCHAR)
SELECT school FROM table_name_35 WHERE enrollment > 441 AND mascot = "chargers"
when was the ship completed that was laid down on 23 march 1926?
CREATE TABLE table_name_31 (completed VARCHAR, laid_down VARCHAR)
SELECT completed FROM table_name_31 WHERE laid_down = "23 march 1926"
What is tom cassidy's nationality?
CREATE TABLE table_name_25 (nationality VARCHAR, player VARCHAR)
SELECT nationality FROM table_name_25 WHERE player = "tom cassidy"
What is the position for years under 1999?
CREATE TABLE table_name_2 (pos VARCHAR, year INTEGER)
SELECT pos FROM table_name_2 WHERE year < 1999
What driver has grid 2 and over 72 laps?
CREATE TABLE table_name_35 (driver VARCHAR, laps VARCHAR, grid VARCHAR)
SELECT driver FROM table_name_35 WHERE laps > 72 AND grid = 2
which is the minimun amount of silver medals?
CREATE TABLE table_22355_35 (silver INTEGER)
SELECT MIN(silver) FROM table_22355_35
What is the total budget amount for school "Glenn" in all years?
CREATE TABLE budget (budgeted INTEGER, school_id VARCHAR); CREATE TABLE school (school_id VARCHAR, school_name VARCHAR)
SELECT SUM(T1.budgeted) FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn'
who is the runner-up when the winning score is −16 (68-70-65-65=268)?
CREATE TABLE table_name_26 (runner_up VARCHAR, winning_score VARCHAR)
SELECT runner_up FROM table_name_26 WHERE winning_score = −16(68 - 70 - 65 - 65 = 268)
How many fatalities does Italy have?
CREATE TABLE table_name_50 (fatalities VARCHAR, country VARCHAR)
SELECT fatalities FROM table_name_50 WHERE country = "italy"
What is the smallest weight of the car produced with 8 cylinders on 1974 ?
CREATE TABLE cars_data (weight INTEGER, cylinders VARCHAR, year VARCHAR)
SELECT MIN(weight) FROM cars_data WHERE cylinders = 8 AND year = 1974
What is the score of the game that 33,531 people went too?
CREATE TABLE table_name_19 (score VARCHAR, attendance VARCHAR)
SELECT score FROM table_name_19 WHERE attendance = "33,531"
What is the % of seats where the difference is 0.19?
CREATE TABLE table_name_92 (_percentage_of_seats VARCHAR, difference VARCHAR)
SELECT _percentage_of_seats FROM table_name_92 WHERE difference = "0.19"
What is the lowest total from slovenia with a Gold smaller than 0?
CREATE TABLE table_name_79 (total INTEGER, nation VARCHAR, gold VARCHAR)
SELECT MIN(total) FROM table_name_79 WHERE nation = "slovenia" AND gold < 0
What team has a grid of 15?
CREATE TABLE table_name_6 (team VARCHAR, grid VARCHAR)
SELECT team FROM table_name_6 WHERE grid = 15
What is the largest area in Alaska with a population of 39 and rank over 19?
CREATE TABLE table_name_41 (area__km_2__ INTEGER, rank VARCHAR, location VARCHAR, population__2000_ VARCHAR)
SELECT MAX(area__km_2__) FROM table_name_41 WHERE location = "alaska" AND population__2000_ = "39" AND rank > 19
What is the average overall of Ken Whisenhunt, who has a pick # of 5?
CREATE TABLE table_name_77 (overall INTEGER, pick__number VARCHAR, name VARCHAR)
SELECT AVG(overall) FROM table_name_77 WHERE pick__number = 5 AND name = "ken whisenhunt"
What was the grid of Jenson Button?
CREATE TABLE table_name_79 (grid VARCHAR, driver VARCHAR)
SELECT grid FROM table_name_79 WHERE driver = "jenson button"
which brand have drivers who won with the names of ryan briscoe and tomas scheckter
CREATE TABLE table_13512105_3 (winning_team VARCHAR, winning_driver VARCHAR, fastest_lap VARCHAR)
SELECT winning_team FROM table_13512105_3 WHERE winning_driver = "Ryan Briscoe" AND fastest_lap = "Tomas Scheckter"
What is the date of the game with an attendance of 19,183?
CREATE TABLE table_name_7 (date VARCHAR, attendance VARCHAR)
SELECT date FROM table_name_7 WHERE attendance = "19,183"
What is the remark for Norway?
CREATE TABLE table_name_38 (remarks VARCHAR, country_of_origin VARCHAR)
SELECT remarks FROM table_name_38 WHERE country_of_origin = "norway"
What is the location of the tallahassee open, with a Score of 269 (–19)?
CREATE TABLE table_name_83 (location VARCHAR, score VARCHAR, tournament VARCHAR)
SELECT location FROM table_name_83 WHERE score = "269 (–19)" AND tournament = "tallahassee open"
How many Touchdowns have a rec of 10, and an Opponent of oregon state, and an Average smaller than 19.7?
CREATE TABLE table_name_57 (s_touchdown VARCHAR, average VARCHAR, rec VARCHAR, opponent VARCHAR)
SELECT COUNT(s_touchdown) FROM table_name_57 WHERE rec = 10 AND opponent = "oregon state" AND average < 19.7
What is the 1993 value of the 1997 Grand Slams?
CREATE TABLE table_name_49 (Id VARCHAR)
SELECT 1993 FROM table_name_49 WHERE 1997 = "grand slams"
What was the crowd numbers when the VFL played Victoria Park?
CREATE TABLE table_name_50 (crowd INTEGER, venue VARCHAR)
SELECT SUM(crowd) FROM table_name_50 WHERE venue = "victoria park"
What is the Place of the Player with a +3 To par?
CREATE TABLE table_name_19 (place VARCHAR, to_par VARCHAR)
SELECT place FROM table_name_19 WHERE to_par = "+3"
Who was the music director in 1994?
CREATE TABLE table_name_3 (music_director VARCHAR, year VARCHAR)
SELECT music_director FROM table_name_3 WHERE year = 1994
How many locations have the callsign DXGH?
CREATE TABLE table_28794440_1 (location VARCHAR, callsign VARCHAR)
SELECT COUNT(location) FROM table_28794440_1 WHERE callsign = "DXGH"
Which venue has more than 19 against?
CREATE TABLE table_name_63 (venue VARCHAR, against INTEGER)
SELECT venue FROM table_name_63 WHERE against > 19
Which tone has a Standard Thai at ปลา?
CREATE TABLE table_name_65 (tone VARCHAR, standard_thai VARCHAR)
SELECT tone FROM table_name_65 WHERE standard_thai = "ปลา"
Who's the First District with a Fifth District of prudy adam?
CREATE TABLE table_name_9 (first_district VARCHAR, fifth_district VARCHAR)
SELECT first_district FROM table_name_9 WHERE fifth_district = "prudy adam"
What country scored 67?
CREATE TABLE table_name_76 (country VARCHAR, score VARCHAR)
SELECT country FROM table_name_76 WHERE score = 67
Who played in Maryland the same year that New Jersey hosted Somerset Hills LL Bernardsville?
CREATE TABLE table_13012165_1 (maryland VARCHAR, new_jersey VARCHAR)
SELECT maryland FROM table_13012165_1 WHERE new_jersey = "Somerset Hills LL Bernardsville"
What is the week with a school that is ball state?
CREATE TABLE table_name_19 (week VARCHAR, school VARCHAR)
SELECT week FROM table_name_19 WHERE school = "ball state"
What is the production code of the episode that was watched by 3.81 million U.S. viewers?
CREATE TABLE table_29054902_1 (production_code VARCHAR, us_viewers__million_ VARCHAR)
SELECT production_code FROM table_29054902_1 WHERE us_viewers__million_ = "3.81"
Which carrier is ranked 20?
CREATE TABLE table_name_19 (carriers VARCHAR, rank VARCHAR)
SELECT carriers FROM table_name_19 WHERE rank = 20
Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.
CREATE TABLE payment (payment_date VARCHAR, staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, first_name VARCHAR); CREATE TABLE payment (payment_date VARCHAR, amount INTEGER)
SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'
Where are the Buffalo Sabres from?
CREATE TABLE table_2679061_7 (college_junior_club_team VARCHAR, nhl_team VARCHAR)
SELECT college_junior_club_team FROM table_2679061_7 WHERE nhl_team = "Buffalo Sabres"
For the verb dhoa, what is the 2VF?
CREATE TABLE table_name_75 (verb VARCHAR)
SELECT 2 AS __vf_ FROM table_name_75 WHERE verb = "dhoa"
What was the young rider classification when manuel cardoso was the winner?
CREATE TABLE table_25580292_13 (young_rider_classification VARCHAR, winner VARCHAR)
SELECT young_rider_classification FROM table_25580292_13 WHERE winner = "Manuel Cardoso"
When was the last time a nominee for Best Revival of a Musical was selected?
CREATE TABLE table_name_98 (year INTEGER, nominee VARCHAR)
SELECT MAX(year) FROM table_name_98 WHERE nominee = "best revival of a musical"
When the time is 1:36.30 what shows as winner?
CREATE TABLE table_1360997_3 (winner_2nd VARCHAR, time VARCHAR)
SELECT winner_2nd FROM table_1360997_3 WHERE time = "1:36.30"
who had high rebounds at game 69?
CREATE TABLE table_27700375_10 (high_rebounds VARCHAR, game VARCHAR)
SELECT high_rebounds FROM table_27700375_10 WHERE game = 69
WHAT ROUND WAS FORWARD ANDRE PETERSSON SELECTED?
CREATE TABLE table_11803648_17 (round INTEGER, position VARCHAR)
SELECT MIN(round) FROM table_11803648_17 WHERE position = "Forward"
How many people attended the game against athletics with the record of 9-12?
CREATE TABLE table_name_40 (attendance VARCHAR, opponent VARCHAR, record VARCHAR)
SELECT COUNT(attendance) FROM table_name_40 WHERE opponent = "athletics" AND record = "9-12"
Which date was held at Laguna Seca Raceway, in class GTX/GTO?
CREATE TABLE table_name_94 (date VARCHAR, circuit VARCHAR, class VARCHAR)
SELECT date FROM table_name_94 WHERE circuit = "laguna seca raceway" AND class = "gtx/gto"
What is the average length for the song "Ma Ke Jaisi"?
CREATE TABLE table_name_53 (length VARCHAR, song_title VARCHAR)
SELECT length FROM table_name_53 WHERE song_title = "ma ke jaisi"
tries against is 29, what is the points against?
CREATE TABLE table_name_97 (points_against VARCHAR, tries_against VARCHAR)
SELECT points_against FROM table_name_97 WHERE tries_against = "29"
On what date did Hudswell Clarke build the locomotive with 0-6-0 ST wheel arrangements?
CREATE TABLE table_1157867_2 (date_built VARCHAR, wheel_arrangement VARCHAR, builder VARCHAR)
SELECT date_built FROM table_1157867_2 WHERE wheel_arrangement = "0-6-0 ST" AND builder = "Hudswell Clarke"
What was the total score where Toronto was played?
CREATE TABLE table_name_71 (game INTEGER, team VARCHAR)
SELECT SUM(game) FROM table_name_71 WHERE team = "toronto"
How many total are there when actor/actress is pam ferris?
CREATE TABLE table_25831483_1 (total VARCHAR, actor_actress VARCHAR)
SELECT total FROM table_25831483_1 WHERE actor_actress = "Pam Ferris"
How many points for Newman/Haas Racing with fewer than 40 laps?
CREATE TABLE table_name_6 (points INTEGER, team VARCHAR, laps VARCHAR)
SELECT AVG(points) FROM table_name_6 WHERE team = "newman/haas racing" AND laps < 40
Which partners were runner-up in the tournament in Mons, Belgium?
CREATE TABLE table_name_61 (partner VARCHAR, outcome VARCHAR, tournament VARCHAR)
SELECT partner FROM table_name_61 WHERE outcome = "runner-up" AND tournament = "mons, belgium"
With a Record of 9-24, what was the Score?
CREATE TABLE table_name_40 (score VARCHAR, record VARCHAR)
SELECT score FROM table_name_40 WHERE record = "9-24"
How many have been replaced where the appointment date is 10 December 2007 and the manner of departure is quit?
CREATE TABLE table_11713303_2 (replaced_by VARCHAR, date_of_appointment VARCHAR, manner_of_departure VARCHAR)
SELECT COUNT(replaced_by) FROM table_11713303_2 WHERE date_of_appointment = "10 December 2007" AND manner_of_departure = "Quit"
What years have joyce couwenberg as the character?
CREATE TABLE table_name_62 (years VARCHAR, character VARCHAR)
SELECT years FROM table_name_62 WHERE character = "joyce couwenberg"
What is the total for New York's game?
CREATE TABLE table_name_39 (game INTEGER, team VARCHAR)
SELECT SUM(game) FROM table_name_39 WHERE team = "new york"
What is the winning scor of the tournament with Robin Walton as the runner-up?
CREATE TABLE table_name_88 (winning_score VARCHAR, runner_s__up VARCHAR)
SELECT winning_score FROM table_name_88 WHERE runner_s__up = "robin walton"
What was the Score during the Season in which the Winner was C.F. Atlante?
CREATE TABLE table_name_15 (score VARCHAR, winner VARCHAR)
SELECT score FROM table_name_15 WHERE winner = "c.f. atlante"
What is the number of games for less than 2 seasons and more than 7 draws?
CREATE TABLE table_name_34 (total_games INTEGER, number_of_seasons VARCHAR, draw VARCHAR)
SELECT SUM(total_games) FROM table_name_34 WHERE number_of_seasons < 2 AND draw > 7
What is the sum of the year for 5 february?
CREATE TABLE table_name_1 (year INTEGER, date VARCHAR)
SELECT SUM(year) FROM table_name_1 WHERE date = "5 february"
What is the average FA Cup Goal value for players that have 0 Other goals, 0 FL Cup goals, and fewer than 39 League goals?
CREATE TABLE table_name_33 (fa_cup_goals INTEGER, league_goals VARCHAR, other_goals VARCHAR, fl_cup_goals VARCHAR)
SELECT AVG(fa_cup_goals) FROM table_name_33 WHERE other_goals = 0 AND fl_cup_goals = 0 AND league_goals < 39
What years did the sdrive16d model have a Torque of n·m (lb·ft)@1750-3000?
CREATE TABLE table_name_74 (years VARCHAR, torque VARCHAR, model VARCHAR)
SELECT years FROM table_name_74 WHERE torque = "n·m (lb·ft)@1750-3000" AND model = "sdrive16d"
Which muzzle devices are on the Colt 603?
CREATE TABLE table_19901_1 (muzzle_device VARCHAR, colt_model_no VARCHAR)
SELECT muzzle_device FROM table_19901_1 WHERE colt_model_no = "603"
Who is the writer of episode 13?
CREATE TABLE table_2226817_8 (written_by VARCHAR, no_in_season VARCHAR)
SELECT COUNT(written_by) FROM table_2226817_8 WHERE no_in_season = 13
What is the pick # for Dimelon Westfield?
CREATE TABLE table_name_93 (pick__number INTEGER, player VARCHAR)
SELECT MIN(pick__number) FROM table_name_93 WHERE player = "dimelon westfield"
What band is the highest and has a System of gsm-450?
CREATE TABLE table_name_22 (band INTEGER, system VARCHAR)
SELECT MAX(band) FROM table_name_22 WHERE system = "gsm-450"
Where did the Paris Marathon occur?
CREATE TABLE table_name_47 (venue VARCHAR, competition VARCHAR)
SELECT venue FROM table_name_47 WHERE competition = "paris marathon"
What is the average fee on a CSU campus in 2005?
CREATE TABLE csu_fees (campusfee INTEGER, YEAR VARCHAR)
SELECT AVG(campusfee) FROM csu_fees WHERE YEAR = 2005
What kind of Modern equivalent has a Post-1009 province of gyeongsang -do, and a Administrative district of jinju -mok, and a Province of Silla of gangju?
CREATE TABLE table_name_88 (modern_equivalent VARCHAR, province_of_silla VARCHAR, post_1009_province VARCHAR, administrative_district VARCHAR)
SELECT modern_equivalent FROM table_name_88 WHERE post_1009_province = "gyeongsang -do" AND administrative_district = "jinju -mok" AND province_of_silla = "gangju"
What is the sum of all points for places above 8?
CREATE TABLE table_name_37 (points__pts_ INTEGER, place__posición_ INTEGER)
SELECT SUM(points__pts_) FROM table_name_37 WHERE place__posición_ > 8