answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT MAX(silver) FROM table_name_54 WHERE gold > "1" AND bronze = 3 AND rank = "1" AND total < 12
What is the most silver won by the country with more than 1 gold, 3 bronze, ranked 1, and less than 12 as the total?
CREATE TABLE table_name_54 (silver INTEGER, total VARCHAR, rank VARCHAR, gold VARCHAR, bronze VARCHAR)
SELECT name FROM table_name_35 WHERE current_age = 29
What is the prisoner's name that is currently 29 years old?
CREATE TABLE table_name_35 (name VARCHAR, current_age VARCHAR)
SELECT nationality FROM table_name_44 WHERE round = 6
What nationality was the round 6 draft pick?
CREATE TABLE table_name_44 (nationality VARCHAR, round VARCHAR)
SELECT COUNT(DISTINCT name) FROM PersonFriend WHERE NOT friend IN (SELECT name FROM person WHERE city = 'Austin')
What is the total number of people who has no friend living in the city of Austin.
CREATE TABLE person (name VARCHAR, friend VARCHAR, city VARCHAR); CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR, city VARCHAR)
SELECT runner_up FROM table_name_93 WHERE season < 2007
Who was the runner up before 2007?
CREATE TABLE table_name_93 (runner_up VARCHAR, season INTEGER)
SELECT candidates FROM table_1342451_38 WHERE incumbent = "Samuel J. Nicholls"
What candidate was featured in the election for incumbent samuel j. nicholls' seat?
CREATE TABLE table_1342451_38 (candidates VARCHAR, incumbent VARCHAR)
SELECT POSITION, AVG(Points) FROM player GROUP BY POSITION
List the position of players and the average number of points of players of each position.
CREATE TABLE player (POSITION VARCHAR, Points INTEGER)
SELECT source FROM table_name_27 WHERE date = "6 september"
What is the source on 6 September?
CREATE TABLE table_name_27 (source VARCHAR, date VARCHAR)
SELECT clubs FROM table_name_10 WHERE seasons_at_this_level = "27 seasons"
Which club has played for 27 seasons at this level?
CREATE TABLE table_name_10 (clubs VARCHAR, seasons_at_this_level VARCHAR)
SELECT 2 AS nd_leg FROM table_name_23 WHERE team_1 = "rk gold club kozina"
What 2nd leg has rk gold club kozina as team 1?
CREATE TABLE table_name_23 (team_1 VARCHAR)
SELECT team FROM table_name_39 WHERE player = "oliver dobbins"
What team does Oliver Dobbins play for?
CREATE TABLE table_name_39 (team VARCHAR, player VARCHAR)
SELECT junior_high_school__12_15_yrs_ FROM table_name_97 WHERE gender = "male and female"
Which junior high school has male and female genders?
CREATE TABLE table_name_97 (junior_high_school__12_15_yrs_ VARCHAR, gender VARCHAR)
SELECT MIN(grid) FROM table_name_16 WHERE time_retired = "accident" AND laps < 18
When a race had less than 18 laps and time/retired of accident, what was the smallest grid?
CREATE TABLE table_name_16 (grid INTEGER, time_retired VARCHAR, laps VARCHAR)
SELECT team FROM table_name_57 WHERE school = "seaford"
What team name belongs to Seaford?
CREATE TABLE table_name_57 (team VARCHAR, school VARCHAR)
SELECT built_for FROM table_29071587_1 WHERE original_no = "24D"
What is listed in built for when the original number is 24d?
CREATE TABLE table_29071587_1 (built_for VARCHAR, original_no VARCHAR)
SELECT position_in_table FROM table_17039232_3 WHERE date_of_appointment = "1 July 2008" AND manner_of_departure = "Resigned"
Name the position in table for 1 july 2008 when manner of departure is resigned
CREATE TABLE table_17039232_3 (position_in_table VARCHAR, date_of_appointment VARCHAR, manner_of_departure VARCHAR)
SELECT name_designation FROM table_name_79 WHERE status = "under development"
What is the name/designation for the under development status?
CREATE TABLE table_name_79 (name_designation VARCHAR, status VARCHAR)
SELECT SUM(laps) FROM table_name_99 WHERE driver = "tony rolt" AND grid < 10
what is the laps when the driver is tony rolt and the grid is less than 10?
CREATE TABLE table_name_99 (laps INTEGER, driver VARCHAR, grid VARCHAR)
SELECT school FROM table_name_17 WHERE event = "100 backstroke"
What is School, when Event is "100 Backstroke"?
CREATE TABLE table_name_17 (school VARCHAR, event VARCHAR)
SELECT coalition_parties FROM table_21422977_1 WHERE nº = 3
When nº is 3, what are all the coaliton parties?
CREATE TABLE table_21422977_1 (coalition_parties VARCHAR, nº VARCHAR)
SELECT COUNT(surface) FROM table_1918850_2 WHERE championship = "Australian Open" AND score_in_the_final = "6–3, 4–6, 11–9"
state the number of surface where championship is australian open and score in the final is 6–3, 4–6, 11–9
CREATE TABLE table_1918850_2 (surface VARCHAR, championship VARCHAR, score_in_the_final VARCHAR)
SELECT years FROM table_name_44 WHERE displacement = "1816cc"
Which years have a displacement of 1816cc?
CREATE TABLE table_name_44 (years VARCHAR, displacement VARCHAR)
SELECT second FROM table_name_16 WHERE nation = "latvia"
Which Second has a Nation of latvia?
CREATE TABLE table_name_16 (second VARCHAR, nation VARCHAR)
SELECT round FROM table_name_7 WHERE opponent_team = "slovakia" AND outcome = "loser" AND edition > 2010
What is Round, when Opponent Team is Slovakia, when Outcome is Loser, and when Edition is greater than 2010?
CREATE TABLE table_name_7 (round VARCHAR, edition VARCHAR, opponent_team VARCHAR, outcome VARCHAR)
SELECT MIN(overall) FROM table_name_99 WHERE round = 7
Which Overall has a Round of 7?
CREATE TABLE table_name_99 (overall INTEGER, round VARCHAR)
SELECT first_elected FROM table_1341604_10 WHERE district = "Florida 7"
what's the first elected with district being florida 7
CREATE TABLE table_1341604_10 (first_elected VARCHAR, district VARCHAR)
SELECT COUNT(losses) FROM table_name_52 WHERE against = 1101 AND byes < 0
Which Losses has an Against of 1101, and a Byes smaller than 0?
CREATE TABLE table_name_52 (losses VARCHAR, against VARCHAR, byes VARCHAR)
SELECT opponent FROM table_name_53 WHERE week = 14
Who were the opponents during week 14?
CREATE TABLE table_name_53 (opponent VARCHAR, week VARCHAR)
SELECT AVG(year) FROM table_name_88 WHERE points = 0 AND chassis = "toleman tg181"
Which year has a total of 0 points and a chassis of Toleman tg181?
CREATE TABLE table_name_88 (year INTEGER, points VARCHAR, chassis VARCHAR)
SELECT runner_s__up FROM table_21649285_2 WHERE margin_of_victory = "4 strokes"
Who was the runner up when the won by 4 strokes?
CREATE TABLE table_21649285_2 (runner_s__up VARCHAR, margin_of_victory VARCHAR)
SELECT industry FROM table_name_83 WHERE profits__billion_$_ < 14.2 AND assets__billion_$_ > 2 OFFSET 467.9
For which industry was the profit smaller than 14.2 billion and the assets larger than 2,467.9 billion?
CREATE TABLE table_name_83 (industry VARCHAR, profits__billion_$_ VARCHAR, assets__billion_$_ VARCHAR)
SELECT player FROM table_13758243_1 WHERE position = "Kicker"
What kicker was drafted?
CREATE TABLE table_13758243_1 (player VARCHAR, position VARCHAR)
SELECT location_attendance FROM table_10812293_3 WHERE date = "November 20"
Where was the game on November 20?
CREATE TABLE table_10812293_3 (location_attendance VARCHAR, date VARCHAR)
SELECT make FROM table_27940569_1 WHERE driver = "Jeff Gordon"
What make was the car driven by Jeff Gordon?
CREATE TABLE table_27940569_1 (make VARCHAR, driver VARCHAR)
SELECT SUM(poles) FROM table_name_40 WHERE series = "formula three euroseries" AND season = "2008" AND f_laps > 0
How many poles are there in the Formula Three Euroseries in the 2008 season with more than 0 F/Laps?
CREATE TABLE table_name_40 (poles INTEGER, f_laps VARCHAR, series VARCHAR, season VARCHAR)
SELECT home FROM table_name_10 WHERE record = "2-3"
Who was the home team in the game that led to a 2-3 series record?
CREATE TABLE table_name_10 (home VARCHAR, record VARCHAR)
SELECT hard FROM table_name_10 WHERE clay = "0–0" AND grass = "0–0" AND carpet = "0–0" AND record = "1–0"
Which hard has a Clay of 0–0, Grass of 0–0, Carpet of 0–0, and a Record of 1–0?
CREATE TABLE table_name_10 (hard VARCHAR, record VARCHAR, carpet VARCHAR, clay VARCHAR, grass VARCHAR)
SELECT AVG(week) FROM table_name_44 WHERE location = "three rivers stadium" AND record = "3–2"
What is the average Week for the game at three rivers stadium, with a Record of 3–2?
CREATE TABLE table_name_44 (week INTEGER, location VARCHAR, record VARCHAR)
SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1
Show the id and details of the investor that has the largest number of transactions.
CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR)
SELECT cb_cw FROM table_name_89 WHERE year = 1982
What was the CB CW for the year of 1982?
CREATE TABLE table_name_89 (cb_cw VARCHAR, year VARCHAR)
SELECT poor_law_union FROM table_30120555_1 WHERE townland = "Curradonohoe"
What poor law union is Curradonohoe a part of?
CREATE TABLE table_30120555_1 (poor_law_union VARCHAR, townland VARCHAR)
SELECT COUNT(division) FROM table_1986692_1 WHERE year = "2008"
When 2008 is the year how many divisions are there?
CREATE TABLE table_1986692_1 (division VARCHAR, year VARCHAR)
SELECT AVG(goals_against) FROM table_name_45 WHERE wins = 13 AND goals_for > 42 AND losses > 9
Which Goals against has Wins of 13, and Goals for larger than 42, and more than 9 Losses?
CREATE TABLE table_name_45 (goals_against INTEGER, losses VARCHAR, wins VARCHAR, goals_for VARCHAR)
SELECT court_rank FROM table_name_32 WHERE revenues = "10,000 koku" AND lineage = "5th son of tadayori"
What's the court ranking of 5th son of tadayori and has revenues of 10,000 koku?
CREATE TABLE table_name_32 (court_rank VARCHAR, revenues VARCHAR, lineage VARCHAR)
SELECT home FROM table_name_20 WHERE attendance = 1920
What is the Home team when the Attendance was 1920?
CREATE TABLE table_name_20 (home VARCHAR, attendance VARCHAR)
SELECT distance FROM table_2923917_4 WHERE brisbane = "$4.80"
What is the distance when brisbane is $4.80?
CREATE TABLE table_2923917_4 (distance VARCHAR, brisbane VARCHAR)
SELECT league FROM table_name_76 WHERE fa_cup > 0 AND total > 21
Which league has an FA cup greater than 0, with a total greater than 21?
CREATE TABLE table_name_76 (league VARCHAR, fa_cup VARCHAR, total VARCHAR)
SELECT record FROM table_name_32 WHERE game > 24 AND date = "december 19"
What is the record of the game with a game number greater than 24 on December 19?
CREATE TABLE table_name_32 (record VARCHAR, game VARCHAR, date VARCHAR)
SELECT game FROM table_22801331_1 WHERE record = "6-3"
What game was held against a team with a 6-3 record against the Cowboys?
CREATE TABLE table_22801331_1 (game VARCHAR, record VARCHAR)
SELECT studio_host FROM table_name_42 WHERE year = "2003-04"
WHich Studio host has a Year of 2003-04?
CREATE TABLE table_name_42 (studio_host VARCHAR, year VARCHAR)
SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = "Sky Radio"
List the title of all Cartoons showed on TV Channel with series name "Sky Radio".
CREATE TABLE Cartoon (Title VARCHAR, Channel VARCHAR); CREATE TABLE TV_Channel (id VARCHAR, series_name VARCHAR)
SELECT COUNT(against) FROM table_15352382_1 WHERE difference = 11
How many under the category of Against have a Difference of 11
CREATE TABLE table_15352382_1 (against VARCHAR, difference VARCHAR)
SELECT entrant FROM table_name_39 WHERE chassis = "lotus 25"
What is the name of the Entrant that has a Chassis of lotus 25
CREATE TABLE table_name_39 (entrant VARCHAR, chassis VARCHAR)
SELECT frequency FROM table_name_71 WHERE genre = "talk music" AND station = "xfm"
What frequency is the xfm station, which is part of the talk music genre?
CREATE TABLE table_name_71 (frequency VARCHAR, genre VARCHAR, station VARCHAR)
SELECT game_site FROM table_name_88 WHERE result = "w 20-14"
Name the game site with result of w 20-14
CREATE TABLE table_name_88 (game_site VARCHAR, result VARCHAR)
SELECT name FROM table_name_90 WHERE round > 10 AND circuit = "silverstone"
Who won Silverstone in a round after 10?
CREATE TABLE table_name_90 (name VARCHAR, round VARCHAR, circuit VARCHAR)
SELECT time FROM table_name_84 WHERE res = "loss" AND round < 3
What was the time for the match that resulted in a loss in less than 3 rounds?
CREATE TABLE table_name_84 (time VARCHAR, res VARCHAR, round VARCHAR)
SELECT free_agent_class FROM table_name_22 WHERE pick < 38
What was the free agent class, with a pick less than 38?
CREATE TABLE table_name_22 (free_agent_class VARCHAR, pick INTEGER)
SELECT SUM(year) FROM table_name_89 WHERE position = "12th"
What is the total year with a Position of 12th?
CREATE TABLE table_name_89 (year INTEGER, position VARCHAR)
SELECT SUM(week) FROM table_name_33 WHERE result = "w 38-24" AND attendance < 43 OFFSET 449
What's the week when the result was W 38-24 and attendance was less than 43,449?
CREATE TABLE table_name_33 (week INTEGER, result VARCHAR, attendance VARCHAR)
SELECT platform_s_ FROM table_name_11 WHERE game = "red dead redemption"
What was the platform of Red Dead Redemption?
CREATE TABLE table_name_11 (platform_s_ VARCHAR, game VARCHAR)
SELECT score FROM table_name_91 WHERE game = 82
What was the score of game 82?
CREATE TABLE table_name_91 (score VARCHAR, game VARCHAR)
SELECT released FROM table_name_41 WHERE english_title = "oxygenie of happiness"
English title of oxygenie of happiness has what release date?
CREATE TABLE table_name_41 (released VARCHAR, english_title VARCHAR)
SELECT opponents_conference FROM table_26240481_1 WHERE result = "L, 62-10"
Which opponents conference has the result L, 62-10?
CREATE TABLE table_26240481_1 (opponents_conference VARCHAR, result VARCHAR)
SELECT outcome FROM table_name_73 WHERE opponent_in_the_final = "çağla büyükakçay"
What is the Outcome when çağla büyükakçay was the opponent in the final?
CREATE TABLE table_name_73 (outcome VARCHAR, opponent_in_the_final VARCHAR)
SELECT MIN(rank) FROM table_name_92 WHERE nationality = "netherlands" AND lane < 4
what is the lowest rank for the netherlands in lane less than 4?
CREATE TABLE table_name_92 (rank INTEGER, nationality VARCHAR, lane VARCHAR)
SELECT wins FROM table_name_7 WHERE races > 16
How many Wins in the Year with more than 16 Races?
CREATE TABLE table_name_7 (wins VARCHAR, races INTEGER)
SELECT termination_of_mission FROM table_name_5 WHERE presentation_of_credentials = "october 29, 1981"
Which Termination of Mission has a Presentation of Credentials on October 29, 1981
CREATE TABLE table_name_5 (termination_of_mission VARCHAR, presentation_of_credentials VARCHAR)
SELECT winner FROM table_name_92 WHERE name = "ouninpohja 1"
Who is the Winner, when the Name is Ouninpohja 1?
CREATE TABLE table_name_92 (winner VARCHAR, name VARCHAR)
SELECT title FROM table_24910742_1 WHERE us_viewers__millions_ = "9.64"
What was the title of the episode having exactly 9.64 million US viewers?
CREATE TABLE table_24910742_1 (title VARCHAR, us_viewers__millions_ VARCHAR)
SELECT COUNT(silver) FROM table_name_19 WHERE total < 1
What is the total number of Silver with a Total that is smaller than 1?
CREATE TABLE table_name_19 (silver VARCHAR, total INTEGER)
SELECT COUNT(defending_champion) FROM table_19765685_2 WHERE country = "Thailand"
How many defending champs from thailand?
CREATE TABLE table_19765685_2 (defending_champion VARCHAR, country VARCHAR)
SELECT season FROM table_name_39 WHERE win_percentage = ".439" AND team = "1996-97"
What season had a .439 Win% in the 1996-97 Team?
CREATE TABLE table_name_39 (season VARCHAR, win_percentage VARCHAR, team VARCHAR)
SELECT MIN(goals_for) FROM table_name_72 WHERE played > 30
What is the goals for when played is larger than 30?
CREATE TABLE table_name_72 (goals_for INTEGER, played INTEGER)
SELECT COUNT(score) FROM table_30049462_5 WHERE team = "Philadelphia"
what is the score in the philadelphia team
CREATE TABLE table_30049462_5 (score VARCHAR, team VARCHAR)
SELECT name FROM museum WHERE NOT Museum_ID IN (SELECT museum_id FROM visit)
What is the name of the museum that had no visitor yet?
CREATE TABLE visit (name VARCHAR, Museum_ID VARCHAR, museum_id VARCHAR); CREATE TABLE museum (name VARCHAR, Museum_ID VARCHAR, museum_id VARCHAR)
SELECT tied FROM table_name_46 WHERE drawn = "47"
I want to know the tie for drawn of 47
CREATE TABLE table_name_46 (tied VARCHAR, drawn VARCHAR)
SELECT SUM(year) FROM table_name_1 WHERE date = "5 february"
What is the sum of the year for 5 february?
CREATE TABLE table_name_1 (year INTEGER, date VARCHAR)
SELECT school_club_team FROM table_name_93 WHERE pick = 63
Which team had a pick of 63?
CREATE TABLE table_name_93 (school_club_team VARCHAR, pick VARCHAR)
SELECT date FROM table_name_6 WHERE catalog = "vcrt 106"
Which Date has a Catalog of vcrt 106?
CREATE TABLE table_name_6 (date VARCHAR, catalog VARCHAR)
SELECT official_name FROM table_name_46 WHERE area_km_2 = 750.51
Which parish has an area of 750.51?
CREATE TABLE table_name_46 (official_name VARCHAR, area_km_2 VARCHAR)
SELECT time FROM table_29535057_4 WHERE location = "Cassell Coliseum • Blacksburg, VA"
What was the time of the games that took place at the cassell coliseum • blacksburg, va?
CREATE TABLE table_29535057_4 (time VARCHAR, location VARCHAR)
SELECT tournament FROM table_name_7 WHERE date = "october 1, 2006"
Which tournament was played on October 1, 2006?
CREATE TABLE table_name_7 (tournament VARCHAR, date VARCHAR)
SELECT party FROM table_1341930_18 WHERE incumbent = "James H. Morrison"
which affiliation is james h. morrison part of
CREATE TABLE table_1341930_18 (party VARCHAR, incumbent VARCHAR)
SELECT replaced_by FROM table_27225944_3 WHERE team = "Slaven Belupo"
Name the replaced by for slaven belupo
CREATE TABLE table_27225944_3 (replaced_by VARCHAR, team VARCHAR)
SELECT record FROM table_name_42 WHERE home = "tampa bay" AND date = "december 4"
On December 4, Tampa Bay has a record of 12-13-2.
CREATE TABLE table_name_42 (record VARCHAR, home VARCHAR, date VARCHAR)
SELECT AVG(rank) FROM table_name_31 WHERE total = 39 AND county = "dublin" AND matches < 4
what is the rank when the total is 39 in the county of dublin and the matches is less than 4?
CREATE TABLE table_name_31 (rank INTEGER, matches VARCHAR, total VARCHAR, county VARCHAR)
SELECT date FROM table_name_16 WHERE away_team = "workington"
WHAT IS THE DATE WITH AN AWAY TEAM OF WORKINGTON?
CREATE TABLE table_name_16 (date VARCHAR, away_team VARCHAR)
SELECT shooter FROM table_14708760_3 WHERE round_3 = 80
Who shot an 80 in round 3
CREATE TABLE table_14708760_3 (shooter VARCHAR, round_3 VARCHAR)
SELECT MIN(total) FROM table_name_42 WHERE gold = 11 AND bronze > 2
What is the smallest total that has 11 golds and bronzes over 2?
CREATE TABLE table_name_42 (total INTEGER, gold VARCHAR, bronze VARCHAR)
SELECT athlete FROM table_name_90 WHERE time = "8:34.27"
The time of 8:34.27 was set by what athlete?
CREATE TABLE table_name_90 (athlete VARCHAR, time VARCHAR)
SELECT MAX(live_births_2006) FROM table_name_6 WHERE county = "cumbria" AND tfr_2006 > 1.76
In 2006, what is the highest number for Live births in the County of Cumbria that has a TFR larger than 1.76?
CREATE TABLE table_name_6 (live_births_2006 INTEGER, county VARCHAR, tfr_2006 VARCHAR)
SELECT MIN(founded) FROM table_11318462_29 WHERE abbreviation = "SPLC"
When was SPLC founded?
CREATE TABLE table_11318462_29 (founded INTEGER, abbreviation VARCHAR)
SELECT language FROM table_name_22 WHERE original_title = "karnal"
What language is the film Karnal in?
CREATE TABLE table_name_22 (language VARCHAR, original_title VARCHAR)
SELECT period_in_office FROM table_1889233_2 WHERE constituency_contested = "Aljunied GRC"
What period were conscituency contested is aljunied grc?
CREATE TABLE table_1889233_2 (period_in_office VARCHAR, constituency_contested VARCHAR)
SELECT premiere_air_dates FROM table_1949994_7 WHERE format = "1 Team"
When did the season with 1 team format premiere?
CREATE TABLE table_1949994_7 (premiere_air_dates VARCHAR, format VARCHAR)
SELECT home_team AS score FROM table_name_13 WHERE home_team = "fitzroy"
Which Home team score had a Home team of Fitzroy?
CREATE TABLE table_name_13 (home_team VARCHAR)
SELECT completion_schedule FROM table_name_96 WHERE state = "himachal pradesh" AND total_capacity__mw_ = 800
What is the completion schedule for himachal pradesh state with a total capacity (MW) of 800?
CREATE TABLE table_name_96 (completion_schedule VARCHAR, state VARCHAR, total_capacity__mw_ VARCHAR)
SELECT AVG(attendance) FROM table_name_97 WHERE date = "october 16, 1955" AND week < 4
What is the average attendance for the game before week 4 that was on october 16, 1955?
CREATE TABLE table_name_97 (attendance INTEGER, date VARCHAR, week VARCHAR)
SELECT no FROM table_27547668_3 WHERE written_by = "Greg Nelson" AND directed_by = "Keith Samples"
What episode number in the season was written by Greg nelson and directed by Keith samples?
CREATE TABLE table_27547668_3 (no VARCHAR, written_by VARCHAR, directed_by VARCHAR)