answer
stringlengths
32
484
context
stringlengths
27
489
question
stringlengths
12
244
SELECT MIN(lost) FROM table_name_3 WHERE points_difference = "40 - 17" AND games > 6
CREATE TABLE table_name_3 (lost INTEGER, points_difference VARCHAR, games VARCHAR)
What is the lowest number of games loss with a Points difference of 40 - 17, and over 6 games?
SELECT MIN(lost) FROM table_name_46 WHERE games > 6
CREATE TABLE table_name_46 (lost INTEGER, games INTEGER)
How many games lost for teams with over 6 games?
SELECT MAX(drawn) FROM table_name_80 WHERE games < 6
CREATE TABLE table_name_80 (drawn INTEGER, games INTEGER)
What are the highest number of games drawn for games numbered under 6?
SELECT SUM(drawn) FROM table_name_41 WHERE points_difference = "31 - 33" AND lost < 4
CREATE TABLE table_name_41 (drawn INTEGER, points_difference VARCHAR, lost VARCHAR)
How many games drawn with a Points difference of 31 - 33, and under 4 games lost?
SELECT outcome FROM table_name_78 WHERE surface = "hard (i)" AND date = "28 january 2003"
CREATE TABLE table_name_78 (outcome VARCHAR, surface VARCHAR, date VARCHAR)
Which Outcome has a Surface of hard (i), and a Date of 28 january 2003?
SELECT tournament FROM table_name_4 WHERE outcome = "winner" AND surface = "hard (i)"
CREATE TABLE table_name_4 (tournament VARCHAR, outcome VARCHAR, surface VARCHAR)
Which Tournament has an Outcome of winner, and a Surface of hard (i)?
SELECT date FROM table_name_76 WHERE score = "6–1, 6–2"
CREATE TABLE table_name_76 (date VARCHAR, score VARCHAR)
Which Date has a Score of 6–1, 6–2?
SELECT surface FROM table_name_99 WHERE opponent = "oleksandra kravets"
CREATE TABLE table_name_99 (surface VARCHAR, opponent VARCHAR)
Which Surface has an Opponent of oleksandra kravets?
SELECT surface FROM table_name_60 WHERE date = "3 october 2003"
CREATE TABLE table_name_60 (surface VARCHAR, date VARCHAR)
Which Surface has a Date of 3 october 2003?
SELECT surface FROM table_name_65 WHERE score = "6–4, 6–2"
CREATE TABLE table_name_65 (surface VARCHAR, score VARCHAR)
Which Surface has a Score of 6–4, 6–2?
SELECT COUNT(rank) FROM table_name_29 WHERE code__iata_icao_ = "ord/kord"
CREATE TABLE table_name_29 (rank VARCHAR, code__iata_icao_ VARCHAR)
How many ranks have a Code (IATA/ICAO) of ord/kord?
SELECT MAX(total_cargo__metric_tonnes_) FROM table_name_66 WHERE rank < 4 AND airport = "shanghai pudong international airport"
CREATE TABLE table_name_66 (total_cargo__metric_tonnes_ INTEGER, rank VARCHAR, airport VARCHAR)
Which Total Cargo (Metric Tonnes) is the highest one that has a Rank smaller than 4, and an Airport of shanghai pudong international airport?
SELECT per_capita_income FROM table_name_7 WHERE median_family_income = "$72,288"
CREATE TABLE table_name_7 (per_capita_income VARCHAR, median_family_income VARCHAR)
What is the Per capita income where Median family income is $72,288?
SELECT AVG(grid) FROM table_name_44 WHERE time_retired = "+2.2 secs"
CREATE TABLE table_name_44 (grid INTEGER, time_retired VARCHAR)
What is the average grid for the +2.2 secs time/retired?
SELECT MAX(facility_id) FROM table_name_15 WHERE city_of_license = "springfield, ma" AND erp___power_w < 230
CREATE TABLE table_name_15 (facility_id INTEGER, city_of_license VARCHAR, erp___power_w VARCHAR)
Which Facility ID has a City of license of springfield, ma, and a ERP / Power W smaller than 230?
SELECT frequency FROM table_name_33 WHERE facility_id = 13598
CREATE TABLE table_name_33 (frequency VARCHAR, facility_id VARCHAR)
Which Frequency has a Facility ID of 13598?
SELECT AVG(facility_id) FROM table_name_64 WHERE call_sign = "wnpr"
CREATE TABLE table_name_64 (facility_id INTEGER, call_sign VARCHAR)
WHich Facility ID has a Call sign of wnpr?
SELECT frequency FROM table_name_71 WHERE facility_id = 13598
CREATE TABLE table_name_71 (frequency VARCHAR, facility_id VARCHAR)
Which Frequency has a Facility ID of 13598?
SELECT COUNT(1 AS st__m_) FROM table_name_81 WHERE name = "martin schmitt" AND points < 235.7
CREATE TABLE table_name_81 (name VARCHAR, points VARCHAR)
What is the total number of 1sts that Martin Schmitt had where he less than 235.7 points?
SELECT COUNT(attendance) FROM table_name_83 WHERE home = "buffalo"
CREATE TABLE table_name_83 (attendance VARCHAR, home VARCHAR)
What is the total number of attendance for games where buffalo was the home team?
SELECT score FROM table_name_64 WHERE visitor = "buffalo" AND date = "april 28"
CREATE TABLE table_name_64 (score VARCHAR, visitor VARCHAR, date VARCHAR)
What was the score of the game on April 28 where Buffalo were the visiting team?
SELECT date FROM table_name_10 WHERE visitor = "philadelphia"
CREATE TABLE table_name_10 (date VARCHAR, visitor VARCHAR)
What date was the game where the visiting team was philadelphia?
SELECT gold FROM table_name_53 WHERE year < 2002 AND location = "seoul"
CREATE TABLE table_name_53 (gold VARCHAR, year VARCHAR, location VARCHAR)
Who got the gold in seoul before 2002?
SELECT location FROM table_name_14 WHERE silver = "sohn bong-gak"
CREATE TABLE table_name_14 (location VARCHAR, silver VARCHAR)
Where did sohn bong-gak win silver?
SELECT bronze FROM table_name_99 WHERE gold = "jin kanno"
CREATE TABLE table_name_99 (bronze VARCHAR, gold VARCHAR)
Who won the bronze when jin kanno won the gold?
SELECT score FROM table_name_69 WHERE outcome = "runner-up" AND tournament = "johannesburg"
CREATE TABLE table_name_69 (score VARCHAR, outcome VARCHAR, tournament VARCHAR)
Which Score has an Outcome of runner-up, and a Tournament of johannesburg?
SELECT surface FROM table_name_53 WHERE opponent = "kerry melville reid" AND score = "6–3, 2–6, 3–6"
CREATE TABLE table_name_53 (surface VARCHAR, opponent VARCHAR, score VARCHAR)
Which Surface has an Opponent of kerry melville reid, and a Score of 6–3, 2–6, 3–6?
SELECT outcome FROM table_name_54 WHERE opponent = "wendy turnbull" AND surface = "grass"
CREATE TABLE table_name_54 (outcome VARCHAR, opponent VARCHAR, surface VARCHAR)
Which Outcome has an Opponent of wendy turnbull, and a Surface of grass?
SELECT tournament FROM table_name_6 WHERE date = "22 january 1979"
CREATE TABLE table_name_6 (tournament VARCHAR, date VARCHAR)
Which Tournament has a Date of 22 january 1979?
SELECT outcome FROM table_name_86 WHERE score = "6–4, 2–6, 6–3"
CREATE TABLE table_name_86 (outcome VARCHAR, score VARCHAR)
Which Outcome has a Score of 6–4, 2–6, 6–3?
SELECT nation FROM table_name_69 WHERE total < 63 AND silver < 2 AND bronze > 2 AND rank = "8"
CREATE TABLE table_name_69 (nation VARCHAR, rank VARCHAR, bronze VARCHAR, total VARCHAR, silver VARCHAR)
Which nation has total medals under 63, less than 2 silver, more than 2 bronze, and a rank of 8?
SELECT COUNT(gold) FROM table_name_65 WHERE bronze = 4 AND silver > 2
CREATE TABLE table_name_65 (gold VARCHAR, bronze VARCHAR, silver VARCHAR)
How many golds have bronze values of 4 and silver values over 2?
SELECT SUM(silver) FROM table_name_52 WHERE bronze < 4 AND rank = "3" AND gold > 2
CREATE TABLE table_name_52 (silver INTEGER, gold VARCHAR, bronze VARCHAR, rank VARCHAR)
What is the sum of silver values that have bronze values under 4, golds over 2, and a rank of 3?
SELECT SUM(gold) FROM table_name_34 WHERE bronze > 0 AND total < 2
CREATE TABLE table_name_34 (gold INTEGER, bronze VARCHAR, total VARCHAR)
What is the sum of gold values that have bronze values over 0 and totals under 2?
SELECT MIN(gold) FROM table_name_51 WHERE total > 15 AND bronze < 31
CREATE TABLE table_name_51 (gold INTEGER, total VARCHAR, bronze VARCHAR)
What is the smallest gold value that has a total over 15 and bronze values under 31?
SELECT equatorial_diameter FROM table_name_24 WHERE body = "mars"
CREATE TABLE table_name_24 (equatorial_diameter VARCHAR, body VARCHAR)
What is the Equatorial diameter of the Body: Mars?
SELECT equatorial_diameter FROM table_name_33 WHERE body = "ceres"
CREATE TABLE table_name_33 (equatorial_diameter VARCHAR, body VARCHAR)
What is the Equatorial diameter of the Body: ceres?
SELECT flattening_ratio FROM table_name_79 WHERE equatorial_diameter = "49,528km"
CREATE TABLE table_name_79 (flattening_ratio VARCHAR, equatorial_diameter VARCHAR)
What is the Flattening ratio associated with the Equatorial diameter of 49,528km?
SELECT equatorial_bulge FROM table_name_74 WHERE body = "earth"
CREATE TABLE table_name_74 (equatorial_bulge VARCHAR, body VARCHAR)
What is the Equatorial bulge of the Body: Earth?
SELECT flattening_ratio FROM table_name_75 WHERE equatorial_diameter = "120,536km"
CREATE TABLE table_name_75 (flattening_ratio VARCHAR, equatorial_diameter VARCHAR)
What is the Flattening ratio associated with the Equatorial diameter of 120,536km?
SELECT flattening_ratio FROM table_name_27 WHERE equatorial_diameter = "12,756.28km"
CREATE TABLE table_name_27 (flattening_ratio VARCHAR, equatorial_diameter VARCHAR)
What is the Flattening ratio associated with the Equatorial diameter of 12,756.28km?
SELECT AVG(yards) FROM table_name_53 WHERE average < 4 AND long = 12 AND attempts < 29
CREATE TABLE table_name_53 (yards INTEGER, attempts VARCHAR, average VARCHAR, long VARCHAR)
What is the average Yards with an average of less than 4 and the long is 12 with less than 29 attempts?
SELECT MIN(yards) FROM table_name_65 WHERE average < 2.6
CREATE TABLE table_name_65 (yards INTEGER, average INTEGER)
What is the least amount of yards when the average is less than 2.6?
SELECT MIN(touchdowns) FROM table_name_41 WHERE yards = 1318
CREATE TABLE table_name_41 (touchdowns INTEGER, yards VARCHAR)
What is the lease amount of touchdowns with 1318 yards?
SELECT COUNT(touchdowns) FROM table_name_80 WHERE average < 2.6
CREATE TABLE table_name_80 (touchdowns VARCHAR, average INTEGER)
What is the number of touchdowns with the average is less than 2.6?
SELECT COUNT(long) FROM table_name_52 WHERE attempts = 19
CREATE TABLE table_name_52 (long VARCHAR, attempts VARCHAR)
What is the total number for long when there are 19 attempts?
SELECT margin_of_victory FROM table_name_78 WHERE tournament = "german masters"
CREATE TABLE table_name_78 (margin_of_victory VARCHAR, tournament VARCHAR)
What was the margin of victory for Olazabal in the German Masters?
SELECT winning_score FROM table_name_90 WHERE runner_s__up = "phillip price"
CREATE TABLE table_name_90 (winning_score VARCHAR, runner_s__up VARCHAR)
What was Olazabal's winning score in the event in which Phillip Price finished 2nd?
SELECT winning_score FROM table_name_62 WHERE tournament = "german masters"
CREATE TABLE table_name_62 (winning_score VARCHAR, tournament VARCHAR)
What was Olazabal's winning score in the German Masters?
SELECT margin_of_victory FROM table_name_6 WHERE tournament = "ebel european masters swiss open"
CREATE TABLE table_name_6 (margin_of_victory VARCHAR, tournament VARCHAR)
What was Olazabal's margin of victory int he Ebel European Masters Swiss Open?
SELECT series_ep FROM table_name_83 WHERE netflix = "s08e18"
CREATE TABLE table_name_83 (series_ep VARCHAR, netflix VARCHAR)
Which Series Ep has a Netflix of s08e18?
SELECT segment_b FROM table_name_92 WHERE segment_d = "stone wool insulation"
CREATE TABLE table_name_92 (segment_b VARCHAR, segment_d VARCHAR)
Which Segment B has a Segment D of stone wool insulation?
SELECT segment_a FROM table_name_70 WHERE segment_c = "poster restoration"
CREATE TABLE table_name_70 (segment_a VARCHAR, segment_c VARCHAR)
Which Segment A has a Segment C of poster restoration?
SELECT segment_c FROM table_name_54 WHERE segment_b = "fish food"
CREATE TABLE table_name_54 (segment_c VARCHAR, segment_b VARCHAR)
Which Segment C has a Segment B of fish food?
SELECT segment_c FROM table_name_43 WHERE netflix = "s08e16"
CREATE TABLE table_name_43 (segment_c VARCHAR, netflix VARCHAR)
Which Segment C has a Netflix of s08e16?
SELECT competition FROM table_name_26 WHERE opponent = "peterborough phantoms" AND date = 2
CREATE TABLE table_name_26 (competition VARCHAR, opponent VARCHAR, date VARCHAR)
What was the name of the competition that had Peterborough Phantoms as an opponent and a date of 2?
SELECT tally FROM table_name_36 WHERE county = "kerry"
CREATE TABLE table_name_36 (tally VARCHAR, county VARCHAR)
What is the Tally in Kerry County?
SELECT MAX(matches) FROM table_name_31 WHERE player = "ian ryan" AND total < 29
CREATE TABLE table_name_31 (matches INTEGER, player VARCHAR, total VARCHAR)
With a Total of less than 29, what is Ian Ryan's most Matches?
SELECT lema_sublema FROM table_name_22 WHERE votes < 218656 AND ch_of_deputies = "0"
CREATE TABLE table_name_22 (lema_sublema VARCHAR, votes VARCHAR, ch_of_deputies VARCHAR)
Which LEMA/SUBLEMA that has Votes smaller than 218656, and a Ch of Deputies of 0?
SELECT lema_sublema FROM table_name_4 WHERE ch_of_senators = "2"
CREATE TABLE table_name_4 (lema_sublema VARCHAR, ch_of_senators VARCHAR)
Which LEMA/SUBLEMA has a Ch of Senators of 2?
SELECT tournament FROM table_name_22 WHERE score_in_the_final = "6–7, 6–2, 6–4"
CREATE TABLE table_name_22 (tournament VARCHAR, score_in_the_final VARCHAR)
what tornament had the scores 6–7, 6–2, 6–4?
SELECT partner FROM table_name_19 WHERE score_in_the_final = "6–4, 6–1"
CREATE TABLE table_name_19 (partner VARCHAR, score_in_the_final VARCHAR)
what partner made the scores 6–4, 6–1?
SELECT year FROM table_name_60 WHERE notes = "6.62 m"
CREATE TABLE table_name_60 (year VARCHAR, notes VARCHAR)
What year had 6.62 m in the notes?
SELECT competition FROM table_name_1 WHERE position = "8th" AND venue = "budapest, hungary"
CREATE TABLE table_name_1 (competition VARCHAR, position VARCHAR, venue VARCHAR)
Which competition in Budapest, Hungary gave a result of 8th?
SELECT SUM(year) FROM table_name_12 WHERE competition = "world indoor championships" AND position = "3rd"
CREATE TABLE table_name_12 (year INTEGER, competition VARCHAR, position VARCHAR)
Which year did the World indoor championships gave a position of 3rd?
SELECT notes FROM table_name_32 WHERE venue = "toronto, canada"
CREATE TABLE table_name_32 (notes VARCHAR, venue VARCHAR)
What were the notes in Toronto, Canada?
SELECT MAX(points) FROM table_name_65 WHERE class = "125cc" AND team = "mv agusta" AND year > 1957
CREATE TABLE table_name_65 (points INTEGER, year VARCHAR, class VARCHAR, team VARCHAR)
Name the most points for class of 125cc and team of mv agusta with year more than 1957
SELECT zx_spectrum FROM table_name_92 WHERE year > 1984 AND genre = "arcade/strategy"
CREATE TABLE table_name_92 (zx_spectrum VARCHAR, year VARCHAR, genre VARCHAR)
Which ZX Spectrum has a Year larger than 1984, and a Genre of arcade/strategy?
SELECT COUNT(year) FROM table_name_16 WHERE title = "kriegspiel"
CREATE TABLE table_name_16 (year VARCHAR, title VARCHAR)
How many years have a Title of kriegspiel?
SELECT zx_spectrum FROM table_name_7 WHERE c = 64 = c64 AND title = "ankh"
CREATE TABLE table_name_7 (zx_spectrum VARCHAR, c64 VARCHAR, title VARCHAR, c VARCHAR)
Which ZX Spectrum has a C=64 of c64, and a Title of ankh?
SELECT title FROM table_name_22 WHERE others = "amstrad cpc" AND genre = "arcade"
CREATE TABLE table_name_22 (title VARCHAR, others VARCHAR, genre VARCHAR)
Which Title has Others of amstrad cpc, and a Genre of arcade?
SELECT result FROM table_name_77 WHERE attendance = "12,000"
CREATE TABLE table_name_77 (result VARCHAR, attendance VARCHAR)
What was the result when the attendance was 12,000?
SELECT attendance FROM table_name_21 WHERE week < 5 AND date = "no game scheduled"
CREATE TABLE table_name_21 (attendance VARCHAR, week VARCHAR, date VARCHAR)
What was the attendance for weeks prior to 5 when there was no game scheduled?
SELECT attendance FROM table_name_37 WHERE venue = "lakeside park"
CREATE TABLE table_name_37 (attendance VARCHAR, venue VARCHAR)
What was the attendance number for the venue of Lakeside Park?
SELECT MAX(week) FROM table_name_63 WHERE venue = "league park" AND date = "november 25, 1920"
CREATE TABLE table_name_63 (week INTEGER, venue VARCHAR, date VARCHAR)
What is the largest week number for the venue of League Park for the date of November 25, 1920?
SELECT surname FROM table_name_16 WHERE first = "michael"
CREATE TABLE table_name_16 (surname VARCHAR, first VARCHAR)
What is Michael's surname?
SELECT first FROM table_name_86 WHERE bats = "r" AND throws = "l" AND dob = "12 october 1977"
CREATE TABLE table_name_86 (first VARCHAR, dob VARCHAR, bats VARCHAR, throws VARCHAR)
Which First has Bats of r, and Throws of l, and a DOB of 12 october 1977?
SELECT dob FROM table_name_44 WHERE surname = "maat"
CREATE TABLE table_name_44 (dob VARCHAR, surname VARCHAR)
When was Maat born?
SELECT bats FROM table_name_88 WHERE first = "todd"
CREATE TABLE table_name_88 (bats VARCHAR, first VARCHAR)
How many bats does Todd have?
SELECT position FROM table_name_21 WHERE dob = "13 may 1987"
CREATE TABLE table_name_21 (position VARCHAR, dob VARCHAR)
Which Position has a DOB of 13 may 1987?
SELECT bats FROM table_name_49 WHERE throws = "r" AND dob = "22 may 1973"
CREATE TABLE table_name_49 (bats VARCHAR, throws VARCHAR, dob VARCHAR)
Which Bats have Throws of r, and a DOB of 22 may 1973?
SELECT croatia FROM table_name_53 WHERE friendly = "world cup 2006 qualifier" AND 149 = 152
CREATE TABLE table_name_53 (croatia VARCHAR, friendly VARCHAR)
Which Croatia has a Friendly of world cup 2006 qualifier, and a 149 of 152?
SELECT production_company FROM table_name_61 WHERE producer_s_ = "sam mccarthy"
CREATE TABLE table_name_61 (production_company VARCHAR, producer_s_ VARCHAR)
For which production company did Sam Mccarthy produce?
SELECT director_s_ FROM table_name_44 WHERE writer_s_ = "dana dorian"
CREATE TABLE table_name_44 (director_s_ VARCHAR, writer_s_ VARCHAR)
Who was the director that worked with Dana Dorian as the writer?
SELECT film FROM table_name_40 WHERE rank = "nominated" AND director_s_ = "dana dorian"
CREATE TABLE table_name_40 (film VARCHAR, rank VARCHAR, director_s_ VARCHAR)
Which film, directed by Dana Dorian, was nominated?
SELECT SUM(december) FROM table_name_59 WHERE opponent = "vancouver canucks" AND game < 33
CREATE TABLE table_name_59 (december INTEGER, opponent VARCHAR, game VARCHAR)
What is the sum for December against the vancouver canucks earlier than game 33?
SELECT SUM(december) FROM table_name_56 WHERE record = "22-12-5"
CREATE TABLE table_name_56 (december INTEGER, record VARCHAR)
What is the sum for December when the record was 22-12-5?
SELECT MIN(year) FROM table_name_12 WHERE team = "norton" AND wins < 0
CREATE TABLE table_name_12 (year INTEGER, team VARCHAR, wins VARCHAR)
When is the earliest year associated with team norton and 0 wins?
SELECT COUNT(year) FROM table_name_42 WHERE wins = 0 AND team = "ajs" AND points < 12
CREATE TABLE table_name_42 (year VARCHAR, points VARCHAR, wins VARCHAR, team VARCHAR)
What is the year that there were 0 wins, team AJS, and under 12 points?
SELECT AVG(year) FROM table_name_96 WHERE award_ceremony = "drama desk award" AND category = "outstanding featured actress in a musical"
CREATE TABLE table_name_96 (year INTEGER, award_ceremony VARCHAR, category VARCHAR)
What year is associated with a drama desk award ceremony and a Category of outstanding featured actress in a musical?
SELECT AVG(loss) FROM table_name_26 WHERE long > 12 AND name = "opponents" AND gain > 1751
CREATE TABLE table_name_26 (loss INTEGER, gain VARCHAR, long VARCHAR, name VARCHAR)
What is the average Loss for the long of more than 12 with a name of opponents with a Gain larger than 1751?
SELECT winner_2nd FROM table_name_18 WHERE race = "caulfield guineas"
CREATE TABLE table_name_18 (winner_2nd VARCHAR, race VARCHAR)
Who was the winner/2nd place finisher in the Caulfield Guineas?
SELECT jockey FROM table_name_76 WHERE group = "g3"
CREATE TABLE table_name_76 (jockey VARCHAR, group VARCHAR)
Which jockey had a group of G3?
SELECT time FROM table_name_62 WHERE group = "g2" AND race = "hobartville stakes"
CREATE TABLE table_name_62 (time VARCHAR, group VARCHAR, race VARCHAR)
What was the time for the G2 group at the Hobartville Stakes?
SELECT airport FROM table_name_39 WHERE city = "perth"
CREATE TABLE table_name_39 (airport VARCHAR, city VARCHAR)
Which airport has perth as the city?
SELECT city FROM table_name_24 WHERE state_territory = "tasmania" AND icao = "ymhb"
CREATE TABLE table_name_24 (city VARCHAR, state_territory VARCHAR, icao VARCHAR)
Which city has tasmania as the state/territory and a ICAO of ymhb?
SELECT airport FROM table_name_11 WHERE icao = "ybcg"
CREATE TABLE table_name_11 (airport VARCHAR, icao VARCHAR)
Which airport has an ICAO of ybcg?
SELECT iata FROM table_name_1 WHERE state_territory = "new south wales" AND begin = "july 2009"
CREATE TABLE table_name_1 (iata VARCHAR, state_territory VARCHAR, begin VARCHAR)
What is the IATA that has new south wales as the state/territory beginning on july 2009?
SELECT iata FROM table_name_30 WHERE state_territory = "queensland" AND icao = "ybrk"
CREATE TABLE table_name_30 (iata VARCHAR, state_territory VARCHAR, icao VARCHAR)
What IATA has queensland as the state/territory and an ICAO of ybrk?
SELECT begin FROM table_name_18 WHERE state_territory = "victoria" AND icao = "ymml"
CREATE TABLE table_name_18 (begin VARCHAR, state_territory VARCHAR, icao VARCHAR)
What begin has victoria as the state/territory and a ICA0 of ymml?