answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT sub_parish__sogn_ FROM table_name_99 WHERE church_name = "jostedal kyrkje"
Which Sub-Parish (Sogn) has a church named Jostedal Kyrkje?
CREATE TABLE table_name_99 (sub_parish__sogn_ VARCHAR, church_name VARCHAR)
SELECT SUM(games) FROM table_name_80 WHERE manager = "richie hebner" AND wins < 34
What was the sum of Richie Hebner winning games that were smaller 34?
CREATE TABLE table_name_80 (games INTEGER, manager VARCHAR, wins VARCHAR)
SELECT investor_id, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id
Show the average amount of transactions for different investors.
CREATE TABLE TRANSACTIONS (investor_id VARCHAR, amount_of_transaction INTEGER)
SELECT state FROM table_name_21 WHERE royal_house = "ji" AND name = "wu"
What state had the name of wu for the royal house of ji?
CREATE TABLE table_name_21 (state VARCHAR, royal_house VARCHAR, name VARCHAR)
SELECT MAX(lane) FROM table_name_60 WHERE heat > 1 AND mark = "7.25"
What is the most lanes used in races with more than 1 heat and a winning mark of 7.25?
CREATE TABLE table_name_60 (lane INTEGER, heat VARCHAR, mark VARCHAR)
SELECT date FROM table_22050544_3 WHERE event__number = "38M"
Event number 38m was held on which date?
CREATE TABLE table_22050544_3 (date VARCHAR, event__number VARCHAR)
SELECT height FROM table_name_64 WHERE school = "oak hill academy"
What's the height of the player who went to oak hill academy?
CREATE TABLE table_name_64 (height VARCHAR, school VARCHAR)
SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018
What is the last name of the student who got a grade A in the class with code 10018.
CREATE TABLE enroll (stu_num VARCHAR, enroll_grade VARCHAR, class_code VARCHAR); CREATE TABLE student (stu_lname VARCHAR, stu_num VARCHAR)
SELECT MAX(year) FROM table_1570003_2 WHERE open_cup = "2nd Round"
What is the most recent year where team made it to 2nd round of the Open Cup?
CREATE TABLE table_1570003_2 (year INTEGER, open_cup VARCHAR)
SELECT result FROM table_name_45 WHERE venue = "n"
What is the Result with a Venue that is n?
CREATE TABLE table_name_45 (result VARCHAR, venue VARCHAR)
SELECT home_team FROM table_name_43 WHERE away_team = "collingwood"
If collingwood is playing away, who played as the home team?
CREATE TABLE table_name_43 (home_team VARCHAR, away_team VARCHAR)
SELECT date FROM table_name_17 WHERE location = "pol-e khomri"
When was the incident in Pol-E Khomri?
CREATE TABLE table_name_17 (date VARCHAR, location VARCHAR)
SELECT match_report FROM table_name_12 WHERE opponent = "houston"
What is the match report for the game that was against Houston?
CREATE TABLE table_name_12 (match_report VARCHAR, opponent VARCHAR)
SELECT points FROM table_name_88 WHERE cat_fea = "3"
When the CAT FEA is 3 how many points were scored?
CREATE TABLE table_name_88 (points VARCHAR, cat_fea VARCHAR)
SELECT date FROM table_name_40 WHERE nationality = "bulgaria" AND event = "discus throw"
What was the date of the discus throw for Bulgaria?
CREATE TABLE table_name_40 (date VARCHAR, nationality VARCHAR, event VARCHAR)
SELECT date FROM table_name_76 WHERE partner = "peter nyborg"
When did he play with peter nyborg?
CREATE TABLE table_name_76 (date VARCHAR, partner VARCHAR)
SELECT score FROM table_name_38 WHERE decision = "biron" AND visitor = "philadelphia" AND date = "march 1"
What is the score when Biron got the decision and Philadelphia was the visitor on March 1?
CREATE TABLE table_name_38 (score VARCHAR, date VARCHAR, decision VARCHAR, visitor VARCHAR)
SELECT platelet_count FROM table_238124_1 WHERE condition = "Congenital afibrinogenemia"
What is the platelet count for congenital afibrinogenemia?
CREATE TABLE table_238124_1 (platelet_count VARCHAR, condition VARCHAR)
SELECT MIN(minutes) FROM table_name_25 WHERE games_played = 13
What is the lowest minutes a goalkeeper with 13 games played has?
CREATE TABLE table_name_25 (minutes INTEGER, games_played VARCHAR)
SELECT COUNT(incumbent) FROM table_28188239_1 WHERE district = "LA-1"
How many incumbents are in district la-1?
CREATE TABLE table_28188239_1 (incumbent VARCHAR, district VARCHAR)
SELECT COUNT(number_of_clubs) FROM table_17632217_1 WHERE runners_up = "Shandong"
How many values for number of clubs have Shandong as the runner-up?
CREATE TABLE table_17632217_1 (number_of_clubs VARCHAR, runners_up VARCHAR)
SELECT date_of_birth FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"
What is the birthday of the staff member with first name as Janessa and last name as Sawayn?
CREATE TABLE Staff (date_of_birth VARCHAR, first_name VARCHAR, last_name VARCHAR)
SELECT AVG(rank) FROM table_name_61 WHERE total > 30 AND bronze = 14
Which Rank has a Total larger than 30, and a Bronze of 14?
CREATE TABLE table_name_61 (rank INTEGER, total VARCHAR, bronze VARCHAR)
SELECT year FROM table_name_37 WHERE time = "1:47.55"
What is Year, when Time is "1:47.55"?
CREATE TABLE table_name_37 (year VARCHAR, time VARCHAR)
SELECT COUNT(*) FROM dorm_amenity
Find the number of distinct amenities.
CREATE TABLE dorm_amenity (Id VARCHAR)
SELECT approximate_age FROM table_name_47 WHERE virtues = "wisdom"
Can you give me the age of the Virtues of Wisdom?
CREATE TABLE table_name_47 (approximate_age VARCHAR, virtues VARCHAR)
SELECT MAX(rnd) FROM table_22673956_1 WHERE race_name = "Daily Empress Indy Silverstone"
Daily Empress Indy Silverstone took place on which round?
CREATE TABLE table_22673956_1 (rnd INTEGER, race_name VARCHAR)
SELECT COUNT(value__) AS $m_ FROM table_name_21 WHERE revenue__$m_ > 193 AND rank < 12 AND team = "manchester united"
Name the total number of value for revenue more than 193 and rank less than 12 for manchester united
CREATE TABLE table_name_21 (value__ VARCHAR, team VARCHAR, revenue__$m_ VARCHAR, rank VARCHAR)
SELECT us_cash_box FROM table_name_20 WHERE year < 1978 AND us_billboard = 35
What is the US cash box before 1978 with a US billboard of 35?
CREATE TABLE table_name_20 (us_cash_box VARCHAR, year VARCHAR, us_billboard VARCHAR)
SELECT avg_start FROM table_1637041_2 WHERE winnings = "$1,663,868"
What are the average start(s) when he had $1,663,868?
CREATE TABLE table_1637041_2 (avg_start VARCHAR, winnings VARCHAR)
SELECT COUNT(reason_for_change) FROM table_2160008_4 WHERE date_successor_seated = "May 11, 1939"
Name the number of reason for change on may 11, 1939
CREATE TABLE table_2160008_4 (reason_for_change VARCHAR, date_successor_seated VARCHAR)
SELECT opponent FROM table_name_71 WHERE player = "ashley sampi"
Who was ashley sampi's opponent?
CREATE TABLE table_name_71 (opponent VARCHAR, player VARCHAR)
SELECT college FROM table_name_63 WHERE pick > 7 AND name = "dave adams"
What is the college of dave adams, who has a pick greater than 7?
CREATE TABLE table_name_63 (college VARCHAR, pick VARCHAR, name VARCHAR)
SELECT fleet_number_s_ FROM table_name_95 WHERE quantity_preserved = "0" AND quantity_made = "1" AND class = "z"
What is Fleet Number(s), when Quantity Preserved is "0", when Quantity Made is 1, and when Class is "Z"?
CREATE TABLE table_name_95 (fleet_number_s_ VARCHAR, class VARCHAR, quantity_preserved VARCHAR, quantity_made VARCHAR)
SELECT us_viewers__in_millions_ FROM table_22951088_3 WHERE written_by = "Deidre Shaw"
How many viewers (in millions) watched the episode written by deidre shaw?
CREATE TABLE table_22951088_3 (us_viewers__in_millions_ VARCHAR, written_by VARCHAR)
SELECT AVG(height), AVG(weight) FROM people WHERE sex = 'M'
Find the average height and weight for all males (sex is M).
CREATE TABLE people (height INTEGER, weight INTEGER, sex VARCHAR)
SELECT date FROM table_name_4 WHERE competition = "friendly" AND score = "2–1" AND venue = "philadelphia , pennsylvania"
When did a Competition of friendly, and a Score of 2–1, and a Venue of philadelphia , pennsylvania occur?
CREATE TABLE table_name_4 (date VARCHAR, venue VARCHAR, competition VARCHAR, score VARCHAR)
SELECT transfer_fee FROM table_name_34 WHERE moving_from = "port vale"
What is the transfer fee of the move from Port Vale?
CREATE TABLE table_name_34 (transfer_fee VARCHAR, moving_from VARCHAR)
SELECT COUNT(pocona_municipality) FROM table_name_98 WHERE totora_municipality = 72 AND pojo_municipality > 74
What is Pocona Municipalities with 72 Totora municipalities and more than 74 pojo municipalities?
CREATE TABLE table_name_98 (pocona_municipality VARCHAR, totora_municipality VARCHAR, pojo_municipality VARCHAR)
SELECT arrival FROM table_14688744_2 WHERE station_code = "PNVL"
what is the arrival time where station code is pnvl?
CREATE TABLE table_14688744_2 (arrival VARCHAR, station_code VARCHAR)
SELECT season FROM table_name_10 WHERE games = "72" AND lost = "9"
What's the season that had a lost of 9 with 72 games?
CREATE TABLE table_name_10 (season VARCHAR, games VARCHAR, lost VARCHAR)
SELECT e_vap_ratio_total FROM table_25042332_30 WHERE men_of_voting_age = 123726
what is the percentage of male voters where the level of maturity is 123726
CREATE TABLE table_25042332_30 (e_vap_ratio_total VARCHAR, men_of_voting_age VARCHAR)
SELECT competition FROM table_name_14 WHERE date = "may 31, 2008"
What was the name of the competition that took place on may 31, 2008?
CREATE TABLE table_name_14 (competition VARCHAR, date VARCHAR)
SELECT date FROM table_name_70 WHERE attendance = "25,022"
What was the date of the game attended by 25,022?
CREATE TABLE table_name_70 (date VARCHAR, attendance VARCHAR)
SELECT to_par FROM table_name_1 WHERE score = 68 - 71 - 69 = 208
What is the To par, when the Score is 68-71-69=208?
CREATE TABLE table_name_1 (to_par VARCHAR, score VARCHAR)
SELECT COUNT(grid) FROM table_name_55 WHERE driver = "luciano burti"
What is the sum grid number when the driver was Luciano Burti?
CREATE TABLE table_name_55 (grid VARCHAR, driver VARCHAR)
SELECT location_attendance FROM table_23286112_7 WHERE high_assists = "Russell Westbrook (5)" AND high_rebounds = "Nenad Krstic (8)"
What location attendance has russell westbrook (5) as high assists and nenad krstic (8) as high rebounds?
CREATE TABLE table_23286112_7 (location_attendance VARCHAR, high_assists VARCHAR, high_rebounds VARCHAR)
SELECT MAX(year) FROM table_name_70 WHERE winning_team = "atlanta braves" AND losing_team = "st. louis cardinals"
What was the latest year that the Atlanta Braves won and the St. Louis Cardinals lost?
CREATE TABLE table_name_70 (year INTEGER, winning_team VARCHAR, losing_team VARCHAR)
SELECT ht FROM table_27277284_28 WHERE release_date = "June 4, 2008"
What's the ht for the model released on June 4, 2008?
CREATE TABLE table_27277284_28 (ht VARCHAR, release_date VARCHAR)
SELECT SUM(wins) FROM table_name_55 WHERE top_25 = 6 AND top_10 > 2 AND events < 19
What is the total of wins where the top 25 is 6, top 10 is more than 2, and the event number is less than 19?
CREATE TABLE table_name_55 (wins INTEGER, events VARCHAR, top_25 VARCHAR, top_10 VARCHAR)
SELECT AVG(2009) FROM table_name_60 WHERE 2001 > 0 AND 1996 < 1 AND 2004 > 2
What is the average for 2009 when 2001 is more than 0, 1996 is less than 1 and 2004 is more than 2
CREATE TABLE table_name_60 (Id VARCHAR)
SELECT position FROM table_name_29 WHERE round = "3" AND pick = "70"
Which position's round was 3 when pick was 70?
CREATE TABLE table_name_29 (position VARCHAR, round VARCHAR, pick VARCHAR)
SELECT AVG(winners) FROM table_name_2 WHERE wins = 1 AND country = "fiji" AND first_title < 2004
How many Winners have Wins of 1 and a Country of fiji and a First title smaller than 2004?
CREATE TABLE table_name_2 (winners INTEGER, first_title VARCHAR, wins VARCHAR, country VARCHAR)
SELECT year FROM table_name_26 WHERE release_type = "cd album" AND released_as = "ethereal 77"
What year was Ethereal 77, which has a CD album release type?
CREATE TABLE table_name_26 (year VARCHAR, release_type VARCHAR, released_as VARCHAR)
SELECT MAX(draws) FROM table_name_56 WHERE wins < 20 AND points < 41 AND goals_for < 27
What is the highest number of draws a club with less than 20 wins, less than 41 points, and less than 27 goals have?
CREATE TABLE table_name_56 (draws INTEGER, goals_for VARCHAR, wins VARCHAR, points VARCHAR)
SELECT away_team AS score FROM table_name_95 WHERE home_team = "collingwood"
What was the away team at collingwood?
CREATE TABLE table_name_95 (away_team VARCHAR, home_team VARCHAR)
SELECT T1.title, T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title
For directors who had more than one movie, return the titles and produced years of all movies directed by them.
CREATE TABLE Movie (director VARCHAR, title VARCHAR); CREATE TABLE Movie (title VARCHAR, year VARCHAR, director VARCHAR)
SELECT ground FROM table_name_1 WHERE home_team = "sydney"
The Home team of Sydney had which ground?
CREATE TABLE table_name_1 (ground VARCHAR, home_team VARCHAR)
SELECT AVG(dynamo) FROM table_name_25 WHERE draw > 0 AND played < 15 AND spartak > 1
what is the average dynamo when draw is more than 0, played is less than 15 and spartak is more than 1?
CREATE TABLE table_name_25 (dynamo INTEGER, spartak VARCHAR, draw VARCHAR, played VARCHAR)
SELECT latitude FROM table_16799784_11 WHERE name = "Yuzut-Arkh Fossae"
At what latitude can the name origin of yuzut-arkh fossae be found?
CREATE TABLE table_16799784_11 (latitude VARCHAR, name VARCHAR)
SELECT home_team FROM table_name_33 WHERE away_team = "fitzroy"
Who was the home team when Fitzroy was the away team?
CREATE TABLE table_name_33 (home_team VARCHAR, away_team VARCHAR)
SELECT cardinal_direction FROM table_name_84 WHERE english = "monday"
What is the cardinal direction of Monday in English?
CREATE TABLE table_name_84 (cardinal_direction VARCHAR, english VARCHAR)
SELECT phase FROM table_name_72 WHERE round = "matchday 4"
Which phase is for the Matchday 4 Round?
CREATE TABLE table_name_72 (phase VARCHAR, round VARCHAR)
SELECT west_germanic FROM table_name_90 WHERE german = "/s/ or /ts/"
What's the West Germanic when the German is /s/ or /ts/?
CREATE TABLE table_name_90 (west_germanic VARCHAR, german VARCHAR)
SELECT opponent FROM table_name_74 WHERE loss = "westbrook (2-2)"
Who was the opponent at the game that had a loss of Westbrook (2-2)?
CREATE TABLE table_name_74 (opponent VARCHAR, loss VARCHAR)
SELECT 2012 FROM table_name_60 WHERE win__percentage = "67%"
What is 2012 that has a winning % of 67%?
CREATE TABLE table_name_60 (win__percentage VARCHAR)
SELECT AVG(grid) FROM table_name_32 WHERE laps > 53
When the laps are over 53, what's the average grid?
CREATE TABLE table_name_32 (grid INTEGER, laps INTEGER)
SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_Staff WHERE role_code = 'researcher')
List the project details of the projects which did not hire any staff for a researcher role.
CREATE TABLE Projects (project_details VARCHAR, project_id VARCHAR, role_code VARCHAR); CREATE TABLE Project_Staff (project_details VARCHAR, project_id VARCHAR, role_code VARCHAR)
SELECT played FROM table_name_8 WHERE points = "51"
What is the played value with 51 points?
CREATE TABLE table_name_8 (played VARCHAR, points VARCHAR)
SELECT tournament FROM table_name_83 WHERE 2009 = "2r" AND 2010 = "sf"
Which tournament had a 2R categorization in 2009 and SF in 2010?
CREATE TABLE table_name_83 (tournament VARCHAR)
SELECT MIN(reported_isn) FROM table_name_28 WHERE citizenship = "russia"
Name the lowest reported isn for russia
CREATE TABLE table_name_28 (reported_isn INTEGER, citizenship VARCHAR)
SELECT tie_no FROM table_name_79 WHERE away_team = "fulham"
Which Tie number had Fulham as the away team?
CREATE TABLE table_name_79 (tie_no VARCHAR, away_team VARCHAR)
SELECT team FROM table_24584486_1 WHERE points = 38
What team was he on the year he had 38 points?
CREATE TABLE table_24584486_1 (team VARCHAR, points VARCHAR)
SELECT clubs FROM table_name_43 WHERE round = "first round"
What are the club number for the first round?
CREATE TABLE table_name_43 (clubs VARCHAR, round VARCHAR)
SELECT AVG(game) FROM table_name_46 WHERE attendance > 56 OFFSET 040
What was the average Game, when the attendance was higher than 56,040?
CREATE TABLE table_name_46 (game INTEGER, attendance INTEGER)
SELECT attendance FROM table_name_96 WHERE week = 1
What was the attendance on week 1?
CREATE TABLE table_name_96 (attendance VARCHAR, week VARCHAR)
SELECT parking FROM table_2093995_1 WHERE city__neighborhood = "Van Nuys" AND stations = "Sepulveda"
How much parking is in Van Nuys at the Sepulveda station?
CREATE TABLE table_2093995_1 (parking VARCHAR, city__neighborhood VARCHAR, stations VARCHAR)
SELECT MIN(draw) FROM table_name_62 WHERE place > 4
what is the least draw when the place is higher than 4?
CREATE TABLE table_name_62 (draw INTEGER, place INTEGER)
SELECT college_junior_club_team FROM table_2850912_3 WHERE player = "David McLay"
Which team did David McLay play for?
CREATE TABLE table_2850912_3 (college_junior_club_team VARCHAR, player VARCHAR)
SELECT thursday_iuppiter__jupiter_ FROM table_1277350_1 WHERE saturday_saturnus___saturn_ = "Jesarn"
what's the thursday iuppiter (jupiter) with saturday saturnus ( saturn) being jesarn
CREATE TABLE table_1277350_1 (thursday_iuppiter__jupiter_ VARCHAR, saturday_saturnus___saturn_ VARCHAR)
SELECT name, home_city, age FROM driver
Show the name, home city, and age for all drivers.
CREATE TABLE driver (name VARCHAR, home_city VARCHAR, age VARCHAR)
SELECT COUNT(no_in_series) FROM table_2409041_4 WHERE no_in_season = 11
Name the number of number in the season for 11
CREATE TABLE table_2409041_4 (no_in_series VARCHAR, no_in_season VARCHAR)
SELECT MIN(attendance) FROM table_name_34 WHERE opponent = "middlesbrough" AND venue = "a"
What is the lowest Attendance when Middlesbrough played at Venue A?
CREATE TABLE table_name_34 (attendance INTEGER, opponent VARCHAR, venue VARCHAR)
SELECT result FROM table_name_65 WHERE notes = "quarter-finals" AND event = "adcc 2001 absolute"
Name the result with notes of quarter-finals and event of adcc 2001 absolute
CREATE TABLE table_name_65 (result VARCHAR, notes VARCHAR, event VARCHAR)
SELECT position FROM table_name_16 WHERE pick < 312 AND school_club_team = "western michigan"
What position for the western michigan product picked ahead of 312?
CREATE TABLE table_name_16 (position VARCHAR, pick VARCHAR, school_club_team VARCHAR)
SELECT service_type_code FROM services ORDER BY service_type_code
List the type of the services in alphabetical order.
CREATE TABLE services (service_type_code VARCHAR)
SELECT MIN(round) FROM table_name_27 WHERE fastest_lap = "michael schumacher" AND winning_driver = "michael schumacher" AND pole_position = "michael schumacher"
Name the lowest round for when pole position and winning driver is michael schumacher
CREATE TABLE table_name_27 (round INTEGER, pole_position VARCHAR, fastest_lap VARCHAR, winning_driver VARCHAR)
SELECT MAX(Silver), MIN(Silver) FROM club_rank
What are the maximum and minimum number of silver medals for clubs.
CREATE TABLE club_rank (Silver INTEGER)
SELECT AVG(quantity) FROM table_name_40 WHERE number_s_ = "1104"
What is the average quantity that has 1104 as the number(s)?
CREATE TABLE table_name_40 (quantity INTEGER, number_s_ VARCHAR)
SELECT MAX(crowd) FROM table_name_13 WHERE away_team = "collingwood"
What was the largest crowd at a game where Collingwood was the away team?
CREATE TABLE table_name_13 (crowd INTEGER, away_team VARCHAR)
SELECT studio_host FROM table_22485543_1 WHERE year = "2010"
Who is the studio host for the year 2010?
CREATE TABLE table_22485543_1 (studio_host VARCHAR, year VARCHAR)
SELECT to_par FROM table_name_84 WHERE score = 69 - 73 - 68 - 70 = 280
Name the to par for score of 69-73-68-70=280
CREATE TABLE table_name_84 (to_par VARCHAR, score VARCHAR)
SELECT AVG(attendance) FROM table_name_63 WHERE record = "58–49"
What was the average attendance when the record was 58–49?
CREATE TABLE table_name_63 (attendance INTEGER, record VARCHAR)
SELECT SUM(reb_avg) FROM table_name_16 WHERE games > 98 AND rank = 7
What is the total of rebound averages with more than 98 games and a rank of 7?
CREATE TABLE table_name_16 (reb_avg INTEGER, games VARCHAR, rank VARCHAR)
SELECT title FROM table_16279520_1 WHERE release = "1.1"
What is the title of the 1.1 realease?
CREATE TABLE table_16279520_1 (title VARCHAR, release VARCHAR)
SELECT special FROM table_23982399_12 WHERE challenger = "Dominique Bouchet"
What is the special when the challenger is dominique bouchet?
CREATE TABLE table_23982399_12 (special VARCHAR, challenger VARCHAR)
SELECT result FROM table_name_14 WHERE competition = "1994 fifa world cup qualification" AND date = "may 15, 1993"
What's the Result for the Competition of 1994 FIFA World Cup Qualification, with the Date of May 15, 1993?
CREATE TABLE table_name_14 (result VARCHAR, competition VARCHAR, date VARCHAR)
SELECT AVG(fall_07) FROM table_name_83 WHERE fall_05 = 271 AND fall_09 < 347
What is the average value for Fall 07 when Fall 05 is 271 and Fall 09 is less than 347?
CREATE TABLE table_name_83 (fall_07 INTEGER, fall_05 VARCHAR, fall_09 VARCHAR)
SELECT constructor FROM table_name_68 WHERE grid < 20 AND laps = 6
I want the constructor for grid less than 20 and Laps of 6
CREATE TABLE table_name_68 (constructor VARCHAR, grid VARCHAR, laps VARCHAR)
SELECT captain FROM table_name_51 WHERE team = "manchester city"
Who is the captain of the manchester city team?
CREATE TABLE table_name_51 (captain VARCHAR, team VARCHAR)