answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT COUNT(sp) FROM table_22265261_1 WHERE position = "2nd"
What was the Sp of the 2nd Position?
CREATE TABLE table_22265261_1 (sp VARCHAR, position VARCHAR)
SELECT episode FROM table_name_35 WHERE budget = "£7,000"
Which episode of Top Gear had a budget of £7,000?
CREATE TABLE table_name_35 (episode VARCHAR, budget VARCHAR)
SELECT MAX(years) FROM table_20630462_1 WHERE tournament = "Rome"
What is the most years that tournaments held in Rome have lasted?
CREATE TABLE table_20630462_1 (years INTEGER, tournament VARCHAR)
SELECT nhl_team FROM table_2850912_10 WHERE player = "Michael Orn"
Which team drafted Michael Orn?
CREATE TABLE table_2850912_10 (nhl_team VARCHAR, player VARCHAR)
SELECT week FROM table_name_1 WHERE result = "w 23–14"
Which week was there a w 23–14 result?
CREATE TABLE table_name_1 (week VARCHAR, result VARCHAR)
SELECT artist FROM table_name_28 WHERE weeks_on_top = "9 ¶"
Who was the artist of the single that spent 9 ¶ weeks on top?
CREATE TABLE table_name_28 (artist VARCHAR, weeks_on_top VARCHAR)
SELECT score FROM table_name_82 WHERE home_team = "yeovil town won 5–3 on penalties"
Which Score has a Home team of yeovil town won 5–3 on penalties?
CREATE TABLE table_name_82 (score VARCHAR, home_team VARCHAR)
SELECT opponent FROM table_name_45 WHERE record = "20-12"
Who was the opponent with the 20-12 record?
CREATE TABLE table_name_45 (opponent VARCHAR, record VARCHAR)
SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) DESC LIMIT 1
What is the most popular payment method?
CREATE TABLE Payments (Payment_Method_Code VARCHAR)
SELECT fleet_number FROM table_name_95 WHERE model = "gillig phantom 3096tb"
What is the fleet number for the model of Gillig Phantom 3096TB?
CREATE TABLE table_name_95 (fleet_number VARCHAR, model VARCHAR)
SELECT height_of_bridge_structure FROM table_name_8 WHERE opened < 2011 AND name = "anqing bridge"
How tall is the Anqing Bridge which opened prior to 2011?
CREATE TABLE table_name_8 (height_of_bridge_structure VARCHAR, opened VARCHAR, name VARCHAR)
SELECT COUNT(wins) FROM table_name_53 WHERE goals_against > 41 AND points = 29 AND draws > 5
What is the number of wins when the goals against is larger than 41, points is 29, and draws are larger than 5?
CREATE TABLE table_name_53 (wins VARCHAR, draws VARCHAR, goals_against VARCHAR, points VARCHAR)
SELECT AVG(bronze) FROM table_name_86 WHERE gold > 0 AND silver < 0
What is the average bronze medal when gold is greater than 0, and there is less than 0 silver medals?
CREATE TABLE table_name_86 (bronze INTEGER, gold VARCHAR, silver VARCHAR)
SELECT board__inches_ FROM table_name_76 WHERE release < 2004 AND start = "1941"
What are the dimensions in inches of the board released before 2004, that started in 1941?
CREATE TABLE table_name_76 (board__inches_ VARCHAR, release VARCHAR, start VARCHAR)
SELECT opponent_in_the_final FROM table_name_8 WHERE outcome = "1" AND venue = "london, england"
Who was the Opponent in London, England with an Outcome of 1?
CREATE TABLE table_name_8 (opponent_in_the_final VARCHAR, outcome VARCHAR, venue VARCHAR)
SELECT _percentage_change FROM table_1425958_1 WHERE population_rank = 34
When the population rank is 34, what the is % change?
CREATE TABLE table_1425958_1 (_percentage_change VARCHAR, population_rank VARCHAR)
SELECT COUNT(year) FROM table_1149495_1 WHERE runner_up = "Daniel Zueras"
What year finished with Daniel Zueras as the runner-up?
CREATE TABLE table_1149495_1 (year VARCHAR, runner_up VARCHAR)
SELECT period FROM table_24565004_2 WHERE appearances¹ = 380
Name the period for appearances being 380
CREATE TABLE table_24565004_2 (period VARCHAR, appearances¹ VARCHAR)
SELECT opponent FROM table_name_3 WHERE streak = "won 9" AND date = "april 13, 1990"
who is the opponent when the streak is won 9 on april 13, 1990?
CREATE TABLE table_name_3 (opponent VARCHAR, streak VARCHAR, date VARCHAR)
SELECT MIN(rnd) FROM table_16732659_2 WHERE date = "June 11"
ON JUNE 11, WHAT WAS THE NUMBER OF RNDS ?
CREATE TABLE table_16732659_2 (rnd INTEGER, date VARCHAR)
SELECT MAX(no_in_season) FROM table_23117208_3 WHERE directed_by = "Constantine Makris"
which is the biggest number of episode in the season, when the director of the episode was Constantine Makris?
CREATE TABLE table_23117208_3 (no_in_season INTEGER, directed_by VARCHAR)
SELECT home_away FROM table_name_70 WHERE date = "april 27, 2008"
Which Home/Away was on April 27, 2008?
CREATE TABLE table_name_70 (home_away VARCHAR, date VARCHAR)
SELECT player_name FROM table_10966926_2 WHERE college = "Oklahoma"
Which player went to college in Oklahoma?
CREATE TABLE table_10966926_2 (player_name VARCHAR, college VARCHAR)
SELECT incumbent FROM table_2668378_18 WHERE first_elected = "1807"
Who was the incumbent in the district that first elected someone in 1807?
CREATE TABLE table_2668378_18 (incumbent VARCHAR, first_elected VARCHAR)
SELECT venue FROM table_name_75 WHERE rank = "2"
What venue has 2 as the rank?
CREATE TABLE table_name_75 (venue VARCHAR, rank VARCHAR)
SELECT AVG(attendance) FROM table_name_98 WHERE opponent = "new york jets"
What is the average attendance for the New York Jets?
CREATE TABLE table_name_98 (attendance INTEGER, opponent VARCHAR)
SELECT entrant FROM table_28578594_1 WHERE driver = "Bruno Sterzi"
Name the entrant for bruno sterzi
CREATE TABLE table_28578594_1 (entrant VARCHAR, driver VARCHAR)
SELECT AVG(product_price), product_category_code FROM products GROUP BY product_category_code
What is the average price of the products for each category?
CREATE TABLE products (product_category_code VARCHAR, product_price INTEGER)
SELECT modern_title_of_house FROM table_name_46 WHERE translation = "prison"
Which modern house title translates to prison?
CREATE TABLE table_name_46 (modern_title_of_house VARCHAR, translation VARCHAR)
SELECT T1.editor_id, T1.Name, COUNT(*) FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.editor_id
Show the id, name of each editor and the number of journal committees they are on.
CREATE TABLE editor (editor_id VARCHAR, Name VARCHAR, Editor_ID VARCHAR); CREATE TABLE journal_committee (Editor_ID VARCHAR)
SELECT employee_id, first_name, last_name, salary FROM employees WHERE salary > (SELECT AVG(salary) FROM employees) AND department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%J%')
display the employee number, name( first name and last name ), and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in their first name.
CREATE TABLE employees (employee_id VARCHAR, first_name VARCHAR, last_name VARCHAR, salary INTEGER, department_id VARCHAR)
SELECT attendance FROM table_name_79 WHERE opponent = "cincinnati bengals"
What was the attendance when the Cincinnati Bengals were the opponents?
CREATE TABLE table_name_79 (attendance VARCHAR, opponent VARCHAR)
SELECT Group AS song FROM table_name_80 WHERE song = "换季"
What is Group Song, when Song is 换季?
CREATE TABLE table_name_80 (Group VARCHAR, song VARCHAR)
SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = "bangla"
What are the average rating and resolution of songs that are in Bangla?
CREATE TABLE song (rating INTEGER, resolution INTEGER, languages VARCHAR)
SELECT name FROM table_name_7 WHERE winning_driver = "eugenio silvani"
What race did eugenio silvani win?
CREATE TABLE table_name_7 (name VARCHAR, winning_driver VARCHAR)
SELECT highest_rank FROM table_name_44 WHERE name = "yoshiazuma"
Which Rank is Highest for Yoshiazuma?
CREATE TABLE table_name_44 (highest_rank VARCHAR, name VARCHAR)
SELECT result FROM table_27614707_1 WHERE theme = "Top 12 Men"
What was the result of the Top 12 Men theme?
CREATE TABLE table_27614707_1 (result VARCHAR, theme VARCHAR)
SELECT volume__hm³_ FROM table_28702208_1 WHERE reservoir = "Tanes"
What is the volume when the resrvoir is Tanes?
CREATE TABLE table_28702208_1 (volume__hm³_ VARCHAR, reservoir VARCHAR)
SELECT COUNT(total) FROM table_name_16 WHERE nation = "kazakhstan (kaz)" AND gold > 0
How much Total has a Nation of kazakhstan (kaz), and a Gold larger than 0?
CREATE TABLE table_name_16 (total VARCHAR, nation VARCHAR, gold VARCHAR)
SELECT year FROM table_name_16 WHERE engine = "ford" AND pts = 13
What year had a Ford engine and 13 points?
CREATE TABLE table_name_16 (year VARCHAR, engine VARCHAR, pts VARCHAR)
SELECT DISTINCT T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800
List the file size and format for all songs that have resolution lower than 800.
CREATE TABLE song (f_id VARCHAR, resolution INTEGER); CREATE TABLE files (file_size VARCHAR, formats VARCHAR, f_id VARCHAR)
SELECT AVG(goal_difference) FROM table_name_8 WHERE club = "slavia sofia"
What is the average goal difference using slavia sofia club?
CREATE TABLE table_name_8 (goal_difference INTEGER, club VARCHAR)
SELECT entered FROM table_14345690_4 WHERE famous_for = "Page 3 Model"
Name the entered for famous for page 3 model
CREATE TABLE table_14345690_4 (entered VARCHAR, famous_for VARCHAR)
SELECT airport_name FROM table_18047346_5 WHERE iata_code = "ORD"
Which airport has an IATA Code of ORD?
CREATE TABLE table_18047346_5 (airport_name VARCHAR, iata_code VARCHAR)
SELECT SUM(goals_scored) FROM table_name_31 WHERE club = "utenis utena" AND wins < 8
How many goals scored have utenis utena as the club, with wins less than 8?
CREATE TABLE table_name_31 (goals_scored INTEGER, club VARCHAR, wins VARCHAR)
SELECT SUM(low_estimate) FROM table_name_66 WHERE date = "1978"
What is the sum of low estimate(s) that is listed for the date of 1978?
CREATE TABLE table_name_66 (low_estimate INTEGER, date VARCHAR)
SELECT third_place FROM table_name_34 WHERE tournament = "zurich"
Who won third place in the Zurich Tournament?
CREATE TABLE table_name_34 (third_place VARCHAR, tournament VARCHAR)
SELECT number FROM table_29002641_1 WHERE scrapped = "2004"
Name the number for 2004 scapped
CREATE TABLE table_29002641_1 (number VARCHAR, scrapped VARCHAR)
SELECT largest_ethnic_group__2002_ FROM table_2562572_33 WHERE cyrillic_name_other_names = "Мале Пијаце (Hungarian: Kispiac)"
What is the largest ethnic group in мале пијаце (hungarian: kispiac)?
CREATE TABLE table_2562572_33 (largest_ethnic_group__2002_ VARCHAR, cyrillic_name_other_names VARCHAR)
SELECT AVG(year) FROM table_name_32 WHERE cargo__tonnes_ = "13 585"
What year had cargo tonnes of 13 585?
CREATE TABLE table_name_32 (year INTEGER, cargo__tonnes_ VARCHAR)
SELECT MIN(attendance) FROM table_name_47 WHERE h___a = "h" AND date = "7 march 1903"
How many Attendances have a H / A of h on 7 march 1903?
CREATE TABLE table_name_47 (attendance INTEGER, h___a VARCHAR, date VARCHAR)
SELECT nationality FROM table_name_12 WHERE nhl_team = "vancouver canucks" AND college_junior_club_team__league_ = "swift current broncos (whl)" AND round = 8
What's the Nationality of Round 8 Vancouver Canucks NHL Team of Swift Current Broncos (WHL)?
CREATE TABLE table_name_12 (nationality VARCHAR, round VARCHAR, nhl_team VARCHAR, college_junior_club_team__league_ VARCHAR)
SELECT COUNT(*), T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockcode
Find the number of rooms for different block code?
CREATE TABLE room (blockfloor VARCHAR, blockcode VARCHAR); CREATE TABLE BLOCK (blockcode VARCHAR, blockfloor VARCHAR)
SELECT date_performed FROM table_name_58 WHERE main_contestant = "karanvir bohra"
Which Date performed has a Main contestant of karanvir bohra?
CREATE TABLE table_name_58 (date_performed VARCHAR, main_contestant VARCHAR)
SELECT COUNT(laps) FROM table_name_17 WHERE pos = "23rd"
Name the total number of laps for 23rd position
CREATE TABLE table_name_17 (laps VARCHAR, pos VARCHAR)
SELECT all_bills_sponsored FROM table_name_57 WHERE bills_originally_cosponsored > 113 AND all_amendments_cosponsored < 47
What is the number of bills sponsored associated with over 113 bills originally cosponsored and under 47 amendments cosponsored?
CREATE TABLE table_name_57 (all_bills_sponsored VARCHAR, bills_originally_cosponsored VARCHAR, all_amendments_cosponsored VARCHAR)
SELECT version FROM table_2263152_1 WHERE security_issues = "98-004" AND distribution_mechanism = "Microsoft website"
With the distribution mechanism of Microsoft website and the security issues of 98-004, what is the version?
CREATE TABLE table_2263152_1 (version VARCHAR, security_issues VARCHAR, distribution_mechanism VARCHAR)
SELECT COUNT(purse__) AS $__ FROM table_name_88 WHERE location = "iowa"
What was the Purse ($) total for Iowa?
CREATE TABLE table_name_88 (purse__ VARCHAR, location VARCHAR)
SELECT SUM(round) FROM table_name_40 WHERE player = "joe taylor"
Which round was Joe Taylor selected in?
CREATE TABLE table_name_40 (round INTEGER, player VARCHAR)
SELECT T2.Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name
Show names of technicians and the number of machines they are assigned to repair.
CREATE TABLE repair_assignment (technician_ID VARCHAR); CREATE TABLE technician (Name VARCHAR, technician_ID VARCHAR)
SELECT catalog FROM table_name_18 WHERE format = "cd"
What catalog has the CD format?
CREATE TABLE table_name_18 (catalog VARCHAR, format VARCHAR)
SELECT COUNT(record) FROM table_27733909_1 WHERE date = "October 6"
what is the overall number of times when the calendar showed october 6
CREATE TABLE table_27733909_1 (record VARCHAR, date VARCHAR)
SELECT score FROM table_name_33 WHERE date = "april 4, 1993"
What was the score on april 4, 1993?
CREATE TABLE table_name_33 (score VARCHAR, date VARCHAR)
SELECT cancelable FROM table_name_25 WHERE attribute = "onmouseover"
Name the cancelable for onmouseover
CREATE TABLE table_name_25 (cancelable VARCHAR, attribute VARCHAR)
SELECT date FROM table_name_86 WHERE venue = "tokyo"
When was the date of an event at Tokyo venue?
CREATE TABLE table_name_86 (date VARCHAR, venue VARCHAR)
SELECT SUM(races) FROM table_name_8 WHERE poles > 1 AND fastest_laps < 4
What is the total number of races when there was more than 1 pole, and the fastest number of laps was less than 4?
CREATE TABLE table_name_8 (races INTEGER, poles VARCHAR, fastest_laps VARCHAR)
SELECT match_report FROM table_name_83 WHERE date = "october 26, 2008"
Which Match Report has a Date of october 26, 2008?
CREATE TABLE table_name_83 (match_report VARCHAR, date VARCHAR)
SELECT AVG(grid) FROM table_name_55 WHERE laps < 3
What is the average grid for the competitiors who had laps smaller than 3?
CREATE TABLE table_name_55 (grid INTEGER, laps INTEGER)
SELECT latitude FROM table_name_18 WHERE land___sqmi__ < 34.401 AND geo_id < 3807157722 AND longitude = -98.475995
What is the latitude that has a sqmi smaller than 34.401, a Geo ID smaller than 3807157722, and a Longitude of -98.475995?
CREATE TABLE table_name_18 (latitude VARCHAR, longitude VARCHAR, land___sqmi__ VARCHAR, geo_id VARCHAR)
SELECT venue FROM table_name_32 WHERE home_team = "melbourne"
What is Melbourne's home venue?
CREATE TABLE table_name_32 (venue VARCHAR, home_team VARCHAR)
SELECT partner FROM table_name_31 WHERE score_in_the_final = "4–6, 6–7"
Who was the partner for the match with a score in the final of 4–6, 6–7?
CREATE TABLE table_name_31 (partner VARCHAR, score_in_the_final VARCHAR)
SELECT population FROM table_name_8 WHERE area = "4,575"
What is the population when the area is 4,575?
CREATE TABLE table_name_8 (population VARCHAR, area VARCHAR)
SELECT frequency FROM table_name_78 WHERE format = "first nations community"
What frequency is First Nations Community?
CREATE TABLE table_name_78 (frequency VARCHAR, format VARCHAR)
SELECT team_nickname FROM table_28243691_1 WHERE institution = "Texas Tech University"
What is the mascot for texas tech university?
CREATE TABLE table_28243691_1 (team_nickname VARCHAR, institution VARCHAR)
SELECT singles_w_l FROM table_name_7 WHERE years_played > 1 AND highest_singles_ranking = "1346"
Tell me singles W-L that has years larger than 1 and highest singles ranking of 1346
CREATE TABLE table_name_7 (singles_w_l VARCHAR, years_played VARCHAR, highest_singles_ranking VARCHAR)
SELECT score_in_the_final FROM table_name_96 WHERE championship = "athens , greece" AND outcome = "winner"
What is Score In The Final, when Championship is "Athens , Greece", and when Outcome is "Winner"?
CREATE TABLE table_name_96 (score_in_the_final VARCHAR, championship VARCHAR, outcome VARCHAR)
SELECT MAX(attendance) FROM table_16227492_1
Name the most attendance
CREATE TABLE table_16227492_1 (attendance INTEGER)
SELECT original_name FROM table_name_22 WHERE director = "gert fredholm"
What is the real name of the movie directed by gert fredholm?
CREATE TABLE table_name_22 (original_name VARCHAR, director VARCHAR)
SELECT MAX(result___votes) FROM table_25818630_1 WHERE loss_gain = "-0.5%"
What is the largest vote result if loss/gain is -0.5%?
CREATE TABLE table_25818630_1 (result___votes INTEGER, loss_gain VARCHAR)
SELECT MAX(season) FROM table_name_61 WHERE position = "7th"
What is the highest season for the 7th position?
CREATE TABLE table_name_61 (season INTEGER, position VARCHAR)
SELECT sweet_sixteen FROM table_name_95 WHERE conference = "colonial"
What Sweet Sixteen team is in the Colonial conference?
CREATE TABLE table_name_95 (sweet_sixteen VARCHAR, conference VARCHAR)
SELECT main_span_feet FROM table_name_64 WHERE name = "qincaobei bridge"
What is the Main span of the Qincaobei Bridge
CREATE TABLE table_name_64 (main_span_feet VARCHAR, name VARCHAR)
SELECT max_torque__nm__at_rpm FROM table_name_82 WHERE model = "1.4 16v"
What is the max torque of model 1.4 16v?
CREATE TABLE table_name_82 (max_torque__nm__at_rpm VARCHAR, model VARCHAR)
SELECT MAX(crowd) FROM table_name_24 WHERE home_team = "fitzroy"
What is the highest crowd when fitzroy is the home team?
CREATE TABLE table_name_24 (crowd INTEGER, home_team VARCHAR)
SELECT driver FROM table_name_3 WHERE laps < 53 AND grid > 17 AND time_retired = "spin"
Who was the driver with less than 53 laps, Grid larger than 17, and a Time/Retired of spin?
CREATE TABLE table_name_3 (driver VARCHAR, time_retired VARCHAR, laps VARCHAR, grid VARCHAR)
SELECT COUNT(train_number) FROM table_29301050_1 WHERE frequency = "Daily" AND arrival_lonavla = "12:25"
how many trains run daily to lonavla and arrive at 12:25
CREATE TABLE table_29301050_1 (train_number VARCHAR, frequency VARCHAR, arrival_lonavla VARCHAR)
SELECT opponent FROM table_name_32 WHERE time = "3:24"
Who's the opponent with a time of 3:24?
CREATE TABLE table_name_32 (opponent VARCHAR, time VARCHAR)
SELECT country FROM table_name_48 WHERE react > 0.257 AND name = "fadwa al bouza"
In what country did fadwa al bouza have larger than 0.257 react score?
CREATE TABLE table_name_48 (country VARCHAR, react VARCHAR, name VARCHAR)
SELECT tyre FROM table_name_24 WHERE team = "real racing with leon" AND drivers = "koudai tsukakoshi"
What is the tyre of real racing with leon team member koudai tsukakoshi?
CREATE TABLE table_name_24 (tyre VARCHAR, team VARCHAR, drivers VARCHAR)
SELECT MAX(game) FROM table_23285805_4 WHERE record = "5-5"
If the record is 5-5, what is the game maximum?
CREATE TABLE table_23285805_4 (game INTEGER, record VARCHAR)
SELECT built_by FROM table_name_44 WHERE name = "northern jaeger"
Which Built by has a Name of northern jaeger?
CREATE TABLE table_name_44 (built_by VARCHAR, name VARCHAR)
SELECT record FROM table_27712180_6 WHERE date = "November 19"
What is the record for the date november 19?
CREATE TABLE table_27712180_6 (record VARCHAR, date VARCHAR)
SELECT type FROM table_name_79 WHERE transfer_window = "summer" AND name = "bulykin"
What is the type of bulykin, which has a summer transfer window?
CREATE TABLE table_name_79 (type VARCHAR, transfer_window VARCHAR, name VARCHAR)
SELECT MAX(gold) FROM table_name_42 WHERE silver < 0
What is the most gold where silver is 0?
CREATE TABLE table_name_42 (gold INTEGER, silver INTEGER)
SELECT MAX(Weeks_on_Top), MIN(Weeks_on_Top) FROM volume
What are the maximum and minimum week on top of all volumes?
CREATE TABLE volume (Weeks_on_Top INTEGER)
SELECT qual_2 FROM table_name_38 WHERE best = "1:20.772"
What is the time for the second qualification where the best time was 1:20.772?
CREATE TABLE table_name_38 (qual_2 VARCHAR, best VARCHAR)
SELECT attendance FROM table_name_59 WHERE week = 10
What was the Attendance in Week 10?
CREATE TABLE table_name_59 (attendance VARCHAR, week VARCHAR)
SELECT block_a FROM table_name_14 WHERE el_nosawa_mendoza = "kondo (7:08)"
What is the Block A value for an El NOSAWA Mendoza value of kondo (7:08)?
CREATE TABLE table_name_14 (block_a VARCHAR, el_nosawa_mendoza VARCHAR)
SELECT netflix FROM table_15187735_4 WHERE episode = 46
What is the netflix code for episode 46?
CREATE TABLE table_15187735_4 (netflix VARCHAR, episode VARCHAR)
SELECT album FROM table_name_27 WHERE year = "june 1998"
Which album was on June 1998?
CREATE TABLE table_name_27 (album VARCHAR, year VARCHAR)