answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT qual FROM table_name_9 WHERE rank = "9"
What is the qual with a rank 9?
CREATE TABLE table_name_9 (qual VARCHAR, rank VARCHAR)
SELECT location FROM table_name_93 WHERE winner = "hale irwin (19)"
Where was the tournament won by Hale Irwin (19)?
CREATE TABLE table_name_93 (location VARCHAR, winner VARCHAR)
SELECT score FROM table_name_43 WHERE visitor = "spurs"
What was the score when the spurs were the visitors?
CREATE TABLE table_name_43 (score VARCHAR, visitor VARCHAR)
SELECT SUM(viewers) FROM table_name_71 WHERE rank < 2
How many Viewers have a Rank smaller than 2?
CREATE TABLE table_name_71 (viewers INTEGER, rank INTEGER)
SELECT AVG(velocity) FROM flight WHERE pilot = 'Thompson'
What is the velocity of the pilot named 'Thompson'?
CREATE TABLE flight (velocity INTEGER, pilot VARCHAR)
SELECT record FROM table_name_25 WHERE points > 54 AND game > 44 AND opponent = "dallas stars"
What's the record for a game past 44 against the Dallas Stars with more than 54 points?
CREATE TABLE table_name_25 (record VARCHAR, opponent VARCHAR, points VARCHAR, game VARCHAR)
SELECT MIN(new_points) FROM table_29572583_19 WHERE status = "Second round lost to Xavier Malisse"
What is listed in new points when status is second round lost to xavier malisse?
CREATE TABLE table_29572583_19 (new_points INTEGER, status VARCHAR)
SELECT adelaide FROM table_24291077_4 WHERE week = 5
How many Adelaide viewers were there in Week 5?
CREATE TABLE table_24291077_4 (adelaide VARCHAR, week VARCHAR)
SELECT time FROM table_name_45 WHERE event = "sportfight 10"
What was the time of sportfight 10?
CREATE TABLE table_name_45 (time VARCHAR, event VARCHAR)
SELECT MAX(appearances) FROM table_29160596_1 WHERE top_mc = "Meek Mill"
How many appearances by Meek Mill?
CREATE TABLE table_29160596_1 (appearances INTEGER, top_mc VARCHAR)
SELECT AVG(to_par) FROM table_name_33 WHERE place = "t3" AND player = "ben hogan"
What is the average To Par, when Place is "T3", and when Player is "Ben Hogan"?
CREATE TABLE table_name_33 (to_par INTEGER, place VARCHAR, player VARCHAR)
SELECT tallangatta_dfl FROM table_name_49 WHERE against > 1013 AND losses > 2
What is the Tallangatta DFL losses greater than 2 and an against greater than 1013
CREATE TABLE table_name_49 (tallangatta_dfl VARCHAR, against VARCHAR, losses VARCHAR)
SELECT COUNT(nba_draft) FROM table_11677760_31 WHERE school = "East Side High school"
Name the total number of nba drafts that went to east side high school
CREATE TABLE table_11677760_31 (nba_draft VARCHAR, school VARCHAR)
SELECT drawn FROM table_name_60 WHERE lost = "1"
Can you name the drawn with a Lost of 1?
CREATE TABLE table_name_60 (drawn VARCHAR, lost VARCHAR)
SELECT MIN(09 AS _10_i_o_best) FROM table_24990183_5
What is the lowest 09-10 i/o best?
CREATE TABLE table_24990183_5 (Id VARCHAR)
SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings LIMIT 1
What is the birth date of the poker player with the lowest earnings?
CREATE TABLE poker_player (People_ID VARCHAR, Earnings VARCHAR); CREATE TABLE people (Birth_Date VARCHAR, People_ID VARCHAR)
SELECT us_air_date FROM table_18424435_4 WHERE canadian_viewers__million_ = "1.452"
What was the air date in the U.S. for the episode that had 1.452 million Canadian viewers?
CREATE TABLE table_18424435_4 (us_air_date VARCHAR, canadian_viewers__million_ VARCHAR)
SELECT player FROM table_name_67 WHERE position = "fly-half" AND club_province = "munster"
Which player Munster from Munster is a fly-half?
CREATE TABLE table_name_67 (player VARCHAR, position VARCHAR, club_province VARCHAR)
SELECT finish FROM table_name_37 WHERE country = "united states" AND player = "julius boros"
What is Finish, when Country is "United States", and when Player is "Julius Boros"?
CREATE TABLE table_name_37 (finish VARCHAR, country VARCHAR, player VARCHAR)
SELECT province FROM table_name_31 WHERE party = "partido socialista del pueblo extremeño"
Which province has the partido Socialista del Pueblo Extremeño party?
CREATE TABLE table_name_31 (province VARCHAR, party VARCHAR)
SELECT MAX(november) FROM table_27539535_4 WHERE game = 20
What is the highest entry in November for the game 20?
CREATE TABLE table_27539535_4 (november INTEGER, game VARCHAR)
SELECT time___et__ FROM table_name_67 WHERE week > 4 AND opponent = "baltimore ravens"
What is the time of the game after week 4 against the Baltimore Ravens?
CREATE TABLE table_name_67 (time___et__ VARCHAR, week VARCHAR, opponent VARCHAR)
SELECT MIN(poles) FROM table_name_84 WHERE position = "nc" AND team = "comtec racing"
What is the lowest poles of team comtec racing, which has a nc position?
CREATE TABLE table_name_84 (poles INTEGER, position VARCHAR, team VARCHAR)
SELECT position FROM table_name_70 WHERE overall < 306 AND round < 11 AND school_club_team = "texas state"
What position does the player from Texas State who was drafted before round 11 with an overall rank lower than 306 play?
CREATE TABLE table_name_70 (position VARCHAR, school_club_team VARCHAR, overall VARCHAR, round VARCHAR)
SELECT COUNT(surface) FROM table_23944006_4 WHERE score = "4-6, 2-6"
Name the number of surfaces for 4-6, 2-6
CREATE TABLE table_23944006_4 (surface VARCHAR, score VARCHAR)
SELECT SUM(total) FROM table_name_45 WHERE nation = "west germany" AND gold > 2
What is the sum of Total, when Nation is West Germany, and when Gold is greater than 2?
CREATE TABLE table_name_45 (total INTEGER, nation VARCHAR, gold VARCHAR)
SELECT europe FROM table_name_68 WHERE rank = "4" AND top_goalscorer = "karl-heinz rummenigge" AND goals = 14
What country in Europe is ranked 4, with top goal scorer Karl-Heinz Rummenigge with 14 goals?
CREATE TABLE table_name_68 (europe VARCHAR, goals VARCHAR, rank VARCHAR, top_goalscorer VARCHAR)
SELECT date FROM table_name_34 WHERE event = "billabong pro"
What is Date, when Event is Billabong Pro?
CREATE TABLE table_name_34 (date VARCHAR, event VARCHAR)
SELECT home FROM table_name_36 WHERE away = "1–1"
Which Home has an Away of 1–1?
CREATE TABLE table_name_36 (home VARCHAR, away VARCHAR)
SELECT AVG(against) FROM table_name_34 WHERE difference = "2" AND lost = 5
Which average's against score has 2 as a difference and a lost of 5?
CREATE TABLE table_name_34 (against INTEGER, difference VARCHAR, lost VARCHAR)
SELECT years FROM table_name_74 WHERE torque = "n·m (lb·ft)@1750-3000" AND model = "sdrive16d"
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 MAX(rank) FROM table_name_75 WHERE placings > 123 AND points > 88.06
I want to know the highest rank with placings more than 123 and points greater than 88.06
CREATE TABLE table_name_75 (rank INTEGER, placings VARCHAR, points VARCHAR)
SELECT opponent FROM table_name_93 WHERE surface = "clay" AND outcome = "winner" AND championship = "estoril" AND date = "15 april 1996"
who is the opponent when the surface is clay, the outcome is winner and the championship is estoril on 15 april 1996?
CREATE TABLE table_name_93 (opponent VARCHAR, date VARCHAR, championship VARCHAR, surface VARCHAR, outcome VARCHAR)
SELECT name FROM table_16226584_1 WHERE km_from_kingston = "112.6"
Which railroad is 112.6 kilometers from kingston?
CREATE TABLE table_16226584_1 (name VARCHAR, km_from_kingston VARCHAR)
SELECT governments FROM table_name_43 WHERE term_start = "24 september 1984"
What governments did the minister with a term start on 24 September 1984 have?
CREATE TABLE table_name_43 (governments VARCHAR, term_start VARCHAR)
SELECT MAX(round2) FROM table_16815824_1
What was the highest score for round 2?
CREATE TABLE table_16815824_1 (round2 INTEGER)
SELECT margin_of_victory FROM table_name_28 WHERE runner_s__up = "gary player"
When Gary Player was the runner-up, what was the margin of victory?
CREATE TABLE table_name_28 (margin_of_victory VARCHAR, runner_s__up VARCHAR)
SELECT MIN(points) FROM table_name_88 WHERE grid = "2"
What is the point low with 2 grids?
CREATE TABLE table_name_88 (points INTEGER, grid VARCHAR)
SELECT AVG(silver) FROM table_name_28 WHERE rank = 12 AND bronze < 2
What is the average silver medals a team ranked 12 with less than 2 bronze has?
CREATE TABLE table_name_28 (silver INTEGER, rank VARCHAR, bronze VARCHAR)
SELECT year_s__won FROM table_name_4 WHERE country = "united states" AND total = 278
What year did the United States win with a total of 278?
CREATE TABLE table_name_4 (year_s__won VARCHAR, country VARCHAR, total VARCHAR)
SELECT college FROM table_name_56 WHERE school = "ames high school"
What college did the player from Ames High School attend?
CREATE TABLE table_name_56 (college VARCHAR, school VARCHAR)
SELECT COUNT(total) FROM table_name_62 WHERE silver = "1" AND bronze = "1" AND nation = "spain"
How many medals for spain that has 1 silver and 1 bronze?
CREATE TABLE table_name_62 (total VARCHAR, nation VARCHAR, silver VARCHAR, bronze VARCHAR)
SELECT team FROM table_name_31 WHERE league = "national" AND year = 2001
What team has a national league in 2001?
CREATE TABLE table_name_31 (team VARCHAR, league VARCHAR, year VARCHAR)
SELECT candidates FROM table_1342218_5 WHERE district = "Arkansas 2"
Who is the candidate for the district Arkansas 2?
CREATE TABLE table_1342218_5 (candidates VARCHAR, district VARCHAR)
SELECT date FROM table_name_94 WHERE away_team = "crystal palace"
what is the date when the away team is crystal palace?
CREATE TABLE table_name_94 (date VARCHAR, away_team VARCHAR)
SELECT success FROM table_12078626_1 WHERE deadline_for_completion = "October 7, 2007"
what's the success where deadline for completion is october 7, 2007
CREATE TABLE table_12078626_1 (success VARCHAR, deadline_for_completion VARCHAR)
SELECT population__people_ FROM table_14465924_1 WHERE area__km_2__ = "24.35"
Name the population of people for area being 24.35
CREATE TABLE table_14465924_1 (population__people_ VARCHAR, area__km_2__ VARCHAR)
SELECT romanised_name FROM table_2263674_1 WHERE chinese_name = "梁愛詩"
What's 梁愛詩's romanised name?
CREATE TABLE table_2263674_1 (romanised_name VARCHAR, chinese_name VARCHAR)
SELECT airport FROM table_name_76 WHERE iata = "arn"
What airport has an IATA of ARN?
CREATE TABLE table_name_76 (airport VARCHAR, iata VARCHAR)
SELECT COUNT(2010 AS _11) FROM table_name_97 WHERE rank > 11
What is the sum of 2010-11 when the rank is greater than 11?
CREATE TABLE table_name_97 (rank INTEGER)
SELECT MAX(played) FROM table_name_80 WHERE scored = 15 AND draws < 1
What's the highest Played with a Scored of 15, and Draws that's less than 1?
CREATE TABLE table_name_80 (played INTEGER, scored VARCHAR, draws VARCHAR)
SELECT outcome FROM table_name_93 WHERE year < 1997
What was the outcome before 1997?
CREATE TABLE table_name_93 (outcome VARCHAR, year INTEGER)
SELECT record FROM table_name_19 WHERE round = 2 AND event = "dream 9"
What record does the event of dream 9 with a round of 2 hold?
CREATE TABLE table_name_19 (record VARCHAR, round VARCHAR, event VARCHAR)
SELECT MAX(enrollment) FROM table_name_88 WHERE ihsaa_class = "aaa" AND mascot = "dragons"
What's the most enrolled having the dragons for a mascot and an AAA for the IHSAA Class?
CREATE TABLE table_name_88 (enrollment INTEGER, ihsaa_class VARCHAR, mascot VARCHAR)
SELECT nationality FROM table_name_35 WHERE 224 = "xo" AND 220 = "xo"
Which Nationality has a 2.24 of xo, and a 2.20 of xo?
CREATE TABLE table_name_35 (nationality VARCHAR)
SELECT examples FROM table_name_73 WHERE american = "ɪ, ə" AND semi_closed_initial_unstressed_vowels = "y /ɨ/"
What is the example for the American of ɪ, ə, and a Semi-closed initial unstressed vowels of y /ɨ/?
CREATE TABLE table_name_73 (examples VARCHAR, american VARCHAR, semi_closed_initial_unstressed_vowels VARCHAR)
SELECT COUNT(area) FROM table_2135222_2 WHERE population = 703379
How many areas have a population of 703379?
CREATE TABLE table_2135222_2 (area VARCHAR, population VARCHAR)
SELECT delegates FROM table_16186152_1 WHERE candidate = "John McCain"
Candidate John Mccain had how many delegates?
CREATE TABLE table_16186152_1 (delegates VARCHAR, candidate VARCHAR)
SELECT record FROM table_name_78 WHERE arena = "palasport olimpico"
What is the record at Palasport Olimpico?
CREATE TABLE table_name_78 (record VARCHAR, arena VARCHAR)
SELECT language FROM table_name_55 WHERE content = "tematico" AND package_option = "sky tv" AND television_service = "fox crime"
What language is the Tematico content with a sky tv package, and Fox Crime television service?
CREATE TABLE table_name_55 (language VARCHAR, television_service VARCHAR, content VARCHAR, package_option VARCHAR)
SELECT rank FROM table_name_33 WHERE year = "1961"
What is the rank for 1961?
CREATE TABLE table_name_33 (rank VARCHAR, year VARCHAR)
SELECT loss FROM table_name_4 WHERE opponent = "la new bears" AND save = "mac suzuki"
What was the loss of the game against with LA New Bears with a save of Mac Suzuki?
CREATE TABLE table_name_4 (loss VARCHAR, opponent VARCHAR, save VARCHAR)
SELECT game FROM table_name_83 WHERE team = "phoenix"
What is the game number when the game was against phoenix?
CREATE TABLE table_name_83 (game VARCHAR, team VARCHAR)
SELECT strongs_words_compounded FROM table_1242447_1 WHERE english_spelling = "Jonadab"
What is the strongs words compounded when the english spelling is jonadab?
CREATE TABLE table_1242447_1 (strongs_words_compounded VARCHAR, english_spelling VARCHAR)
SELECT COUNT(weight) FROM table_22496374_1 WHERE home_town = "San Francisco, CA"
How many weight stats are there for players from San Francisco, CA?
CREATE TABLE table_22496374_1 (weight VARCHAR, home_town VARCHAR)
SELECT record FROM table_name_58 WHERE home = "san francisco 49ers" AND visitor = "philadelphia eagles"
What was the record for the game played by the home team San Francisco 49ers and visitor Philadelphia Eagles?
CREATE TABLE table_name_58 (record VARCHAR, home VARCHAR, visitor VARCHAR)
SELECT SUM(first_elected) FROM table_name_66 WHERE result = "re-elected" AND district = "ohio 4"
In the Ohio 4 district, that is the first elected date that has a result of re-elected?
CREATE TABLE table_name_66 (first_elected INTEGER, result VARCHAR, district VARCHAR)
SELECT class FROM table_name_4 WHERE frequency_mhz = 93.7
Frequency MHz of 93.7 has what class?
CREATE TABLE table_name_4 (class VARCHAR, frequency_mhz VARCHAR)
SELECT COUNT(release_date) FROM table_23981741_1 WHERE year = 1988 AND additional_rock_band_3_features = "None"
How many release dates are there for year of 1988 and additional rock band 3 features is none?
CREATE TABLE table_23981741_1 (release_date VARCHAR, year VARCHAR, additional_rock_band_3_features VARCHAR)
SELECT score FROM table_name_8 WHERE date = "january 23"
What is the Score on January 23?
CREATE TABLE table_name_8 (score VARCHAR, date VARCHAR)
SELECT AVG(attendance) FROM table_name_28 WHERE round = "f"
How many people on average attend round f?
CREATE TABLE table_name_28 (attendance INTEGER, round VARCHAR)
SELECT preferred_foot, COUNT(*) FROM Player_Attributes WHERE overall_rating > 80 GROUP BY preferred_foot
Of all players with an overall rating greater than 80, how many are right-footed and left-footed?
CREATE TABLE Player_Attributes (preferred_foot VARCHAR, overall_rating INTEGER)
SELECT place FROM table_name_26 WHERE to_par < 15 AND score = 74 - 74 - 74 - 75 = 297
Which Place has a To par smaller than 15, and a Score of 74-74-74-75=297?
CREATE TABLE table_name_26 (place VARCHAR, to_par VARCHAR, score VARCHAR)
SELECT player FROM table_11734041_16 WHERE no_s_ = "3"
Which players were number 3?
CREATE TABLE table_11734041_16 (player VARCHAR, no_s_ VARCHAR)
SELECT result FROM table_name_16 WHERE week = 4
What was the result of the game on week 4?
CREATE TABLE table_name_16 (result VARCHAR, week VARCHAR)
SELECT 2007 FROM table_name_32 WHERE 2006 = "grand slam tournaments"
What is the 2007 that has a grand slam tournaments in 2006.
CREATE TABLE table_name_32 (Id VARCHAR)
SELECT incumbent FROM table_1342013_34 WHERE candidates = "John M. Vorys (R) 61.5% Jacob F. Myers (D) 38.5%"
who is the the incumbent with candidates being john m. vorys (r) 61.5% jacob f. myers (d) 38.5%
CREATE TABLE table_1342013_34 (incumbent VARCHAR, candidates VARCHAR)
SELECT date FROM table_13258851_2 WHERE opponent = "San Diego Chargers"
On what date was the game against San Diego Chargers played?
CREATE TABLE table_13258851_2 (date VARCHAR, opponent VARCHAR)
SELECT date FROM table_name_5 WHERE venue = "away" AND result = "lost 6-4 (lost 9-7 on agg)"
On what date was the venue Away and the result was lost 6-4 (lost 9-7 on agg)?
CREATE TABLE table_name_5 (date VARCHAR, venue VARCHAR, result VARCHAR)
SELECT circuit FROM table_name_46 WHERE date = "september 20"
What was the circuit had a race on September 20.
CREATE TABLE table_name_46 (circuit VARCHAR, date VARCHAR)
SELECT COUNT(*) FROM country WHERE continent = "Asia"
how many countries are in Asia?
CREATE TABLE country (continent VARCHAR)
SELECT SUM(silver) FROM table_name_2 WHERE nation = "china" AND bronze < 7
Which Silver has a Nation of china, and a Bronze smaller than 7?
CREATE TABLE table_name_2 (silver INTEGER, nation VARCHAR, bronze VARCHAR)
SELECT location_attendance FROM table_name_52 WHERE date = "february 25"
What is the location attendance of the game on February 25?
CREATE TABLE table_name_52 (location_attendance VARCHAR, date VARCHAR)
SELECT npl_net FROM table_name_30 WHERE bank = "citibank"
Which NPL net's bank was citibank?
CREATE TABLE table_name_30 (npl_net VARCHAR, bank VARCHAR)
SELECT player_name FROM table_name_48 WHERE year > 1989 AND college = "washington state"
What is the name of the player from after 1989 from Washington State?
CREATE TABLE table_name_48 (player_name VARCHAR, year VARCHAR, college VARCHAR)
SELECT successor FROM table_225198_3 WHERE reason_for_change = "James Noble died in previous Congress"
Name the successor for james noble died in previous congress
CREATE TABLE table_225198_3 (successor VARCHAR, reason_for_change VARCHAR)
SELECT townland FROM table_30120633_1 WHERE area__acres__ = 213
Which townland has a 213 acre area?
CREATE TABLE table_30120633_1 (townland VARCHAR, area__acres__ VARCHAR)
SELECT _number_of_seats_won FROM table_123462_2 WHERE election = 1974
What is the # of seats one for the election in 1974?
CREATE TABLE table_123462_2 (_number_of_seats_won VARCHAR, election VARCHAR)
SELECT producer FROM table_name_77 WHERE year = "december 25, 2006"
What is the Producer on December 25, 2006?
CREATE TABLE table_name_77 (producer VARCHAR, year VARCHAR)
SELECT dialcode FROM table_name_62 WHERE location = "whitechapel"
What is the Dialcode of whitechapel?
CREATE TABLE table_name_62 (dialcode VARCHAR, location VARCHAR)
SELECT MAX(district) FROM table_name_72 WHERE party = "democratic" AND senator = "steve carriker" AND took_office > 1988
What is the district where Steve Carriker is the Democratic Senator and he took office later than 1988?
CREATE TABLE table_name_72 (district INTEGER, took_office VARCHAR, party VARCHAR, senator VARCHAR)
SELECT renewable_electricity_w_o_hydro__gw•h_ FROM table_25244412_1 WHERE _percentage_renewable = "83.4"
What is the amount of renewable electricity without hydrogen power when the percentage of renewable energy is 83.4?
CREATE TABLE table_25244412_1 (renewable_electricity_w_o_hydro__gw•h_ VARCHAR, _percentage_renewable VARCHAR)
SELECT entrant FROM table_21977704_1 WHERE driver = "Benedicto Campos"
Name the entrant for benedicto campos
CREATE TABLE table_21977704_1 (entrant VARCHAR, driver VARCHAR)
SELECT COUNT(year) FROM table_name_90 WHERE entrant = "red bull sauber petronas" AND points > 6
What number of years did the red bull sauber petronas have greater than 6 points?
CREATE TABLE table_name_90 (year VARCHAR, entrant VARCHAR, points VARCHAR)
SELECT first_name, last_name, salary, department_id, MAX(salary) FROM employees GROUP BY department_id
display the department ID, full name (first and last name), salary for those employees who is highest salary in every department.
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, salary INTEGER, department_id VARCHAR)
SELECT 3 AS rd_place_team FROM table_18618672_2 WHERE year = 1955
What is the 3rd place team for the year of 1955?
CREATE TABLE table_18618672_2 (year VARCHAR)
SELECT COUNT(goals_against) FROM table_name_14 WHERE points_1 = 44 AND goals_for > 65
When the Points 1 were 44 and the Goals For were larger than 65, what was the total number of Goals Against?
CREATE TABLE table_name_14 (goals_against VARCHAR, points_1 VARCHAR, goals_for VARCHAR)
SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3
Find the names of all reviewers who have contributed three or more ratings.
CREATE TABLE Reviewer (name VARCHAR, rID VARCHAR); CREATE TABLE Rating (rID VARCHAR)
SELECT host_interface FROM table_name_34 WHERE digital = "dvb-t (cx22702)" AND model = "nova-t pci (90002)"
Tell me the Host interface for digital of dvb-t (cx22702) and model of nova-t pci (90002)
CREATE TABLE table_name_34 (host_interface VARCHAR, digital VARCHAR, model VARCHAR)
SELECT home_team FROM table_name_32 WHERE venue = "mcg"
Which Home team has a Venue of mcg?
CREATE TABLE table_name_32 (home_team VARCHAR, venue VARCHAR)