answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT COUNT(*), formats FROM files GROUP BY formats
For each file format, return the number of artists who released songs in that format.
CREATE TABLE files (formats VARCHAR)
SELECT COUNT(rank) FROM table_name_73 WHERE grid < 20 AND driver = "dick rathmann" AND qual > 130.92
I want the total number of rank for Grid less than 20 and dick rathmann and Qual more than 130.92
CREATE TABLE table_name_73 (rank VARCHAR, qual VARCHAR, grid VARCHAR, driver VARCHAR)
SELECT nationality FROM table_name_62 WHERE player = "martin lewis"
What is the nationality of Martin Lewis?
CREATE TABLE table_name_62 (nationality VARCHAR, player VARCHAR)
SELECT season FROM table_name_81 WHERE pos = "3rd" AND pld = "36" AND div = "bbl"
What season had 3rd position, a 36 pld, and a bbl div?
CREATE TABLE table_name_81 (season VARCHAR, div VARCHAR, pos VARCHAR, pld VARCHAR)
SELECT 2011 FROM table_name_16 WHERE tournament = "french open"
What was the result in 2011 for the French Open tournament?
CREATE TABLE table_name_16 (tournament VARCHAR)
SELECT seans_team FROM table_23292220_7 WHERE first_broadcast = "13 November 2008"
Name the seans team being 13 november 2008
CREATE TABLE table_23292220_7 (seans_team VARCHAR, first_broadcast VARCHAR)
SELECT name FROM table_name_1 WHERE lane < 3 AND nationality = "great britain"
Who was from Great Britain in lanes under number 3?
CREATE TABLE table_name_1 (name VARCHAR, lane VARCHAR, nationality VARCHAR)
SELECT COUNT(us_viewers__in_millions_) FROM table_27969432_4 WHERE no_in_season = 4
How many viewers in millions were there for episode 4 of this season?
CREATE TABLE table_27969432_4 (us_viewers__in_millions_ VARCHAR, no_in_season VARCHAR)
SELECT competition FROM table_name_30 WHERE score = "12.8 (80) - 8.7 (55)"
In what competition was the score reported as 12.8 (80) - 8.7 (55)?
CREATE TABLE table_name_30 (competition VARCHAR, score VARCHAR)
SELECT place FROM table_name_82 WHERE country = "new zealand"
What is the place of the player from New Zealand?
CREATE TABLE table_name_82 (place VARCHAR, country VARCHAR)
SELECT casualties FROM table_name_33 WHERE sunk_by… = "u-125"
What were the casualties of the ship sunk by u-125?
CREATE TABLE table_name_33 (casualties VARCHAR, sunk_by… VARCHAR)
SELECT T2.MakeId, T2.Make FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Horsepower > (SELECT MIN(Horsepower) FROM CARS_DATA) AND T1.Cylinders <= 3
Among the cars with more than lowest horsepower, which ones do not have more than 3 cylinders? List the car makeid and make name.
CREATE TABLE CARS_DATA (Id VARCHAR, Horsepower INTEGER, Cylinders VARCHAR); CREATE TABLE CAR_NAMES (MakeId VARCHAR, Make VARCHAR); CREATE TABLE CARS_DATA (Horsepower INTEGER)
SELECT MIN(rank) FROM table_name_53 WHERE rebounds < 130 AND team = "partizan igokea"
What rank is Partizan Igokea that has less than 130 rebounds?
CREATE TABLE table_name_53 (rank INTEGER, rebounds VARCHAR, team VARCHAR)
SELECT COUNT(stadium) FROM table_29250534_1 WHERE club = "Haka"
How many stadiums have haka as the club?
CREATE TABLE table_29250534_1 (stadium VARCHAR, club VARCHAR)
SELECT elevation_msnm FROM table_name_59 WHERE population_censo_2007_hab_ = "77.392*"
What is the elevation msnm for a population censo 2007(hab) of 77.392*?
CREATE TABLE table_name_59 (elevation_msnm VARCHAR, population_censo_2007_hab_ VARCHAR)
SELECT championships__years_ FROM table_name_71 WHERE club = "tampa bay storm"
Which years did the Tampa Bay Storm win the Championships?
CREATE TABLE table_name_71 (championships__years_ VARCHAR, club VARCHAR)
SELECT pali FROM table_name_77 WHERE sanskrit = "rāga"
What is the pali word for rāga in sanskrit?
CREATE TABLE table_name_77 (pali VARCHAR, sanskrit VARCHAR)
SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY SUM(transaction_amount) DESC LIMIT 1
What is the transaction type that has processed the greatest total amount in transactions?
CREATE TABLE Financial_transactions (transaction_type VARCHAR, transaction_amount INTEGER)
SELECT MAX(yes_votes) FROM table_256286_20 WHERE _percentage_yes = "43.18%"
how many yes votes made up 43.18% yes?
CREATE TABLE table_256286_20 (yes_votes INTEGER, _percentage_yes VARCHAR)
SELECT swimsuit FROM table_name_86 WHERE semifinal_average = "8.367 (10)"
what is the swimsuit score when the semifinal average score is 8.367 (10)?
CREATE TABLE table_name_86 (swimsuit VARCHAR, semifinal_average VARCHAR)
SELECT opponent FROM table_name_7 WHERE attendance = "20,456"
What opponent has an attendance of 20,456?
CREATE TABLE table_name_7 (opponent VARCHAR, attendance VARCHAR)
SELECT MIN(total_apps) FROM table_22542179_3 WHERE player = "Txema"
Name the least total apaps for txema
CREATE TABLE table_22542179_3 (total_apps INTEGER, player VARCHAR)
SELECT date FROM table_name_51 WHERE oil_pattern = "chameleon" AND event = "lake county indiana classic"
Name the Date which has a Oil Pattern of chameleon, and a Event of lake county indiana classic?
CREATE TABLE table_name_51 (date VARCHAR, oil_pattern VARCHAR, event VARCHAR)
SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY AVG(amount_of_transaction)
Show the average amount of transactions for different lots, ordered by average amount of transactions.
CREATE TABLE TRANSACTIONS (transaction_id VARCHAR); CREATE TABLE Transactions_Lots (lot_id VARCHAR, transaction_id VARCHAR)
SELECT MIN(attempts) FROM table_name_57 WHERE rank > 3 AND start > 1984 AND yds_att < 6.1
What is the lowest number of attempts for the player with a rank number larger than 3, who started after 1984 and had less than 6.1 yds/att?
CREATE TABLE table_name_57 (attempts INTEGER, yds_att VARCHAR, rank VARCHAR, start VARCHAR)
SELECT circuit FROM table_2446333_2 WHERE main_winner = "France" AND country = "Portugal"
Name the circuit for france and portugal
CREATE TABLE table_2446333_2 (circuit VARCHAR, main_winner VARCHAR, country VARCHAR)
SELECT election_date FROM table_1193568_1 WHERE electorate = "Christchurch Country"
what's the election date where electorate is christchurch country
CREATE TABLE table_1193568_1 (election_date VARCHAR, electorate VARCHAR)
SELECT away_team AS score FROM table_name_79 WHERE home_team = "south melbourne"
What was the score of the away team when the home team was south melbourne?
CREATE TABLE table_name_79 (away_team VARCHAR, home_team VARCHAR)
SELECT round FROM table_name_32 WHERE player = "nick gillis"
What round was Nick Gillis?
CREATE TABLE table_name_32 (round VARCHAR, player VARCHAR)
SELECT COUNT(silver) FROM table_name_51 WHERE nation = "russia"
How many total silvers does Russia have?
CREATE TABLE table_name_51 (silver VARCHAR, nation VARCHAR)
SELECT verb_meaning FROM table_1745843_8 WHERE part_3 = "sufun"
What is the verb meaning of the word with part 3 "sufun"?
CREATE TABLE table_1745843_8 (verb_meaning VARCHAR, part_3 VARCHAR)
SELECT to_par FROM table_name_97 WHERE total > 288
What is the to par when the total is larger than 288?
CREATE TABLE table_name_97 (to_par VARCHAR, total INTEGER)
SELECT opponent FROM table_name_30 WHERE week < 11 AND game_site = "sullivan stadium"
Who was the opponent at the game at Sullivan Stadium before week 11?
CREATE TABLE table_name_30 (opponent VARCHAR, week VARCHAR, game_site VARCHAR)
SELECT hometown FROM table_name_43 WHERE college = "wisconsin"
What is the hometown for a college in Wisconsin?
CREATE TABLE table_name_43 (hometown VARCHAR, college VARCHAR)
SELECT result FROM table_name_95 WHERE event = "2012 ibjjf world jiu-jitsu championships" AND method = "points (4 x 0)"
What was the result for the 2012 ibjjf world jiu-jitsu championships event when the method was points (4 x 0)?
CREATE TABLE table_name_95 (result VARCHAR, event VARCHAR, method VARCHAR)
SELECT year FROM table_name_96 WHERE tournament_name = "grand prix passing shot bordeaux" AND runners_up = "diego nargiso"
What year was the Grand Prix Passing Shot Bordeaux that had Runners-up of Diego Nargiso?
CREATE TABLE table_name_96 (year VARCHAR, tournament_name VARCHAR, runners_up VARCHAR)
SELECT county FROM table_name_17 WHERE location = "shelbyville"
Can you tell me the County that has the Location of shelbyville?
CREATE TABLE table_name_17 (county VARCHAR, location VARCHAR)
SELECT COUNT(*) FROM customers WHERE city = "Prague"
How many customers live in Prague city?
CREATE TABLE customers (city VARCHAR)
SELECT young_rider_classification FROM table_14710984_2 WHERE mountains_classification = "Emanuele Sella" AND stage = 9
Who won the young rider classification in Stage 9 where the mountain classification was Emanuele Sella?
CREATE TABLE table_14710984_2 (young_rider_classification VARCHAR, mountains_classification VARCHAR, stage VARCHAR)
SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1
What is the first, last name, gpa of the youngest one among students whose GPA is above 3?
CREATE TABLE student (stu_fname VARCHAR, stu_lname VARCHAR, stu_gpa INTEGER, stu_dob VARCHAR)
SELECT competition FROM table_name_33 WHERE venue = "new delhi" AND result = "loss"
What New Delhi Competition has a Result of Loss?
CREATE TABLE table_name_33 (competition VARCHAR, venue VARCHAR, result VARCHAR)
SELECT record FROM table_name_19 WHERE november < 10 AND game < 13
What is Record, when November is less than 10, and when Game is less than 13?
CREATE TABLE table_name_19 (record VARCHAR, november VARCHAR, game VARCHAR)
SELECT SUM(year) FROM table_name_80 WHERE competition = "european indoor championships" AND venue = "budapest , hungary"
Which Year has a Competition of european indoor championships, and a Venue of budapest , hungary?
CREATE TABLE table_name_80 (year INTEGER, competition VARCHAR, venue VARCHAR)
SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "%court%"
What are the building full names that contain the word "court"?
CREATE TABLE Apartment_Buildings (building_full_name VARCHAR)
SELECT location FROM table_name_13 WHERE left = "2013" AND nickname = "royals"
Where was the game played with a 2013 left and Royals nickname?
CREATE TABLE table_name_13 (location VARCHAR, left VARCHAR, nickname VARCHAR)
SELECT T2.first_name, T2.last_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = "Wisconsin"
What are the first names and last names of students with address in Wisconsin state?
CREATE TABLE Addresses (address_id VARCHAR, state_province_county VARCHAR); CREATE TABLE Students (first_name VARCHAR, last_name VARCHAR, address_id VARCHAR)
SELECT name FROM table_name_91 WHERE year_named > 1997 AND longitude = "213.0e"
What name in a year after 1997 has a longitude of 213.0e?
CREATE TABLE table_name_91 (name VARCHAR, year_named VARCHAR, longitude VARCHAR)
SELECT date FROM table_name_71 WHERE opponent = "minnesota vikings"
On what Date is the Minnesota Vikings the Opponent?
CREATE TABLE table_name_71 (date VARCHAR, opponent VARCHAR)
SELECT fastest_lap FROM table_name_32 WHERE winning_driver = "jimmy vasser"
What was Jimmy Vasser's fastest lap?
CREATE TABLE table_name_32 (fastest_lap VARCHAR, winning_driver VARCHAR)
SELECT length_fuel FROM table_name_22 WHERE quantity = 30
What is the Length/Fuel of the bus with a Quantity of 30?
CREATE TABLE table_name_22 (length_fuel VARCHAR, quantity VARCHAR)
SELECT name FROM table_name_81 WHERE listed = "1977-11-23"
What is the name of the building listed on 1977-11-23?
CREATE TABLE table_name_81 (name VARCHAR, listed VARCHAR)
SELECT height FROM table_name_44 WHERE position = "guard" AND year_born = 1982
Born in 1982, this guard has what listed as a height?
CREATE TABLE table_name_44 (height VARCHAR, position VARCHAR, year_born VARCHAR)
SELECT score FROM table_name_75 WHERE march > 19 AND game = 67
After March 19, what's the score of game 67?
CREATE TABLE table_name_75 (score VARCHAR, march VARCHAR, game VARCHAR)
SELECT high_points FROM table_name_98 WHERE team = "@ charlotte"
Who had the high points in the game @ Charlotte?
CREATE TABLE table_name_98 (high_points VARCHAR, team VARCHAR)
SELECT record FROM table_name_99 WHERE time = "3:53"
For the match that lasted 3:53 minutes, what was the final record?
CREATE TABLE table_name_99 (record VARCHAR, time VARCHAR)
SELECT townland FROM table_30120664_1 WHERE poor_law_union = "Fermoy" AND civil_parish = "Ballynoe"
Name the townland for fermoy and ballynoe
CREATE TABLE table_30120664_1 (townland VARCHAR, poor_law_union VARCHAR, civil_parish VARCHAR)
SELECT pilot FROM table_name_76 WHERE youtube_hero = "greg pattillo"
What is the Pilot number for the YouTube Hero greg pattillo?
CREATE TABLE table_name_76 (pilot VARCHAR, youtube_hero VARCHAR)
SELECT competition FROM table_name_58 WHERE result = "2-1"
what is the competition when the result is 2-1?
CREATE TABLE table_name_58 (competition VARCHAR, result VARCHAR)
SELECT player FROM table_name_68 WHERE country = "united states" AND score = 77 - 72 - 72 = 221
Can you tell me the Player that has the Country of united states, and the Score of 77-72-72=221?
CREATE TABLE table_name_68 (player VARCHAR, country VARCHAR, score VARCHAR)
SELECT team_2 FROM table_name_4 WHERE team_1 = "al qadsia"
What is the name of Team 2 with a Team 1 of Al Qadsia?
CREATE TABLE table_name_4 (team_2 VARCHAR, team_1 VARCHAR)
SELECT third_place FROM table_name_68 WHERE winner = "paul haarhuis"
Who earned third place when the winner was Paul Haarhuis?
CREATE TABLE table_name_68 (third_place VARCHAR, winner VARCHAR)
SELECT venue FROM table_name_56 WHERE year > 2001 AND competition = "summer olympics"
What is the venue when the year is after 2001 for the summer olympics?
CREATE TABLE table_name_56 (venue VARCHAR, year VARCHAR, competition VARCHAR)
SELECT regular_season_champion_s_ FROM table_name_70 WHERE year = "1943–44"
WHich Regular Season Champions has a Year of 1943–44?
CREATE TABLE table_name_70 (regular_season_champion_s_ VARCHAR, year VARCHAR)
SELECT MIN(year) FROM table_name_15 WHERE cause = "gas explosion" AND colliery = "tylorstown colliery" AND death_toll > 57
Count the lowest Year which has gas explosion, Colliery of tylorstown colliery, and a Death toll larger than 57?
CREATE TABLE table_name_15 (year INTEGER, death_toll VARCHAR, cause VARCHAR, colliery VARCHAR)
SELECT aircraft FROM table_name_27 WHERE weapon_systems_officer = "capt charles b. debellevue"
Which aircraft Weapon Systems Officer Capt Charles B. Debellevue belongs on?
CREATE TABLE table_name_27 (aircraft VARCHAR, weapon_systems_officer VARCHAR)
SELECT single FROM table_25760427_2 WHERE artist = "Travis"
What is the song released by Travis?
CREATE TABLE table_25760427_2 (single VARCHAR, artist VARCHAR)
SELECT built FROM table_name_16 WHERE location = "clarkdale"
In what year was the bridge in Clarkdale built?
CREATE TABLE table_name_16 (built VARCHAR, location VARCHAR)
SELECT COUNT(tries_against) FROM table_name_30 WHERE try_diff = "–17" AND points_for < 80
How many Tries against has a Try diff of –17 and Points for smaller than 80?
CREATE TABLE table_name_30 (tries_against VARCHAR, try_diff VARCHAR, points_for VARCHAR)
SELECT COUNT(DISTINCT city) FROM airports WHERE country = 'Greenland'
How many different cities do have some airport in the country of Greenland?
CREATE TABLE airports (city VARCHAR, country VARCHAR)
SELECT school_club_team FROM table_name_79 WHERE season = "2006-2012"
What is School/Club Team, when Season is 2006-2012?
CREATE TABLE table_name_79 (school_club_team VARCHAR, season VARCHAR)
SELECT oklahoma FROM table_name_6 WHERE texas = "kennedy"
What's the value for oklahoma when texas is kennedy?
CREATE TABLE table_name_6 (oklahoma VARCHAR, texas VARCHAR)
SELECT counties_represented FROM table_14009909_1 WHERE first_elected = 2006
Which country has a delegate who was first elected in 2006?
CREATE TABLE table_14009909_1 (counties_represented VARCHAR, first_elected VARCHAR)
SELECT MIN(salary), department_id FROM employees GROUP BY department_id
return the smallest salary for every departments.
CREATE TABLE employees (department_id VARCHAR, salary INTEGER)
SELECT year__ceremony_ FROM table_10321805_1 WHERE original_title = "La leggenda del santo bevitore"
What year was a movie with the original title La Leggenda del Santo Bevitore submitted?
CREATE TABLE table_10321805_1 (year__ceremony_ VARCHAR, original_title VARCHAR)
SELECT MIN(rank_asia) FROM table_2248784_4
What is the smallest Asian rank?
CREATE TABLE table_2248784_4 (rank_asia INTEGER)
SELECT circuit FROM table_name_99 WHERE date = "20 august"
Tell me the circuit for 20 august
CREATE TABLE table_name_99 (circuit VARCHAR, date VARCHAR)
SELECT MAX(total) FROM table_name_82 WHERE nation = "algeria" AND bronze > 2
What is the high total for algeria with over 2 bronzes?
CREATE TABLE table_name_82 (total INTEGER, nation VARCHAR, bronze VARCHAR)
SELECT bike FROM table_name_24 WHERE grid > 17 AND laps < 8 AND rider = "milos cihak"
What bike has a grid greater than 17, laps less than 8, with milos cihak as the rider?
CREATE TABLE table_name_24 (bike VARCHAR, rider VARCHAR, grid VARCHAR, laps VARCHAR)
SELECT capacity FROM table_name_77 WHERE colors = "purple and white"
Which capacity has a purple and white colors?
CREATE TABLE table_name_77 (capacity VARCHAR, colors VARCHAR)
SELECT event FROM table_name_81 WHERE competition = "world cross country championships"
Which event was part of the World Cross Country championships?
CREATE TABLE table_name_81 (event VARCHAR, competition VARCHAR)
SELECT MAX(year) FROM table_name_91 WHERE score = "4–6, 6–3, 7–5"
What is the most recent year in which the score was 4–6, 6–3, 7–5?
CREATE TABLE table_name_91 (year INTEGER, score VARCHAR)
SELECT headquarters, COUNT(*) FROM company GROUP BY headquarters
List all headquarters and the number of companies in each headquarter.
CREATE TABLE company (headquarters VARCHAR)
SELECT played_in FROM table_name_36 WHERE matches = "16"
Where were 16 matches played?
CREATE TABLE table_name_36 (played_in VARCHAR, matches VARCHAR)
SELECT winning_driver FROM table_name_25 WHERE race = "dutch grand prix"
Who was the winning driver for the Dutch Grand Prix?
CREATE TABLE table_name_25 (winning_driver VARCHAR, race VARCHAR)
SELECT MIN(round) FROM table_name_43 WHERE player = "ian forbes"
What is the lowest round number that Ian Forbes was picked in the draft?
CREATE TABLE table_name_43 (round INTEGER, player VARCHAR)
SELECT venue FROM table_name_77 WHERE opponent = "rochdale"
where did rochdale play as opponent?
CREATE TABLE table_name_77 (venue VARCHAR, opponent VARCHAR)
SELECT player FROM table_15621965_2 WHERE position = "Forward-Center"
Who plays the position of forward-center?
CREATE TABLE table_15621965_2 (player VARCHAR, position VARCHAR)
SELECT avg_finish FROM table_2190919_3 WHERE team_s_ = "#21/#07 SS-Green Light Racing"
With team #21/#07 ss-green light racing, what was the average finish number?
CREATE TABLE table_2190919_3 (avg_finish VARCHAR, team_s_ VARCHAR)
SELECT duration FROM table_name_53 WHERE count_palatine_of_the_rhine = "charles albert, elector of bavaria"
What is the duration for Count Palatine of the Rhine of charles albert, elector of bavaria?
CREATE TABLE table_name_53 (duration VARCHAR, count_palatine_of_the_rhine VARCHAR)
SELECT high_assists FROM table_27734286_7 WHERE game = 38
Who had the high assists for game number 38?
CREATE TABLE table_27734286_7 (high_assists VARCHAR, game VARCHAR)
SELECT home FROM table_name_28 WHERE decision = "ramo" AND visitor = "florida"
Who was the Home team when the Visitor was Florida, with a Decision of Ramo?
CREATE TABLE table_name_28 (home VARCHAR, decision VARCHAR, visitor VARCHAR)
SELECT max_aggregate_bandwidth__bi_directional_ FROM table_name_17 WHERE hypertransport_version = 2
What is the Max Aggregate bandwidth with a HyperTransport of 2?
CREATE TABLE table_name_17 (max_aggregate_bandwidth__bi_directional_ VARCHAR, hypertransport_version VARCHAR)
SELECT score FROM table_name_38 WHERE date = "june 1"
What was the score of the game on June 1?
CREATE TABLE table_name_38 (score VARCHAR, date VARCHAR)
SELECT result FROM table_name_14 WHERE attendance = "528"
For the game with 528 attendance, what was the result?
CREATE TABLE table_name_14 (result VARCHAR, attendance VARCHAR)
SELECT MIN(losses) FROM table_name_64 WHERE club = "south warrnambool" AND wins > 8
When South warrnambool has more than 8 wins, what is the least amount of losses?
CREATE TABLE table_name_64 (losses INTEGER, club VARCHAR, wins VARCHAR)
SELECT SUM(top_5) FROM table_name_68 WHERE tournament = "totals" AND events > 86
What is the sum of Top-5, when Tournament is Totals, and when Events is greater than 86?
CREATE TABLE table_name_68 (top_5 INTEGER, tournament VARCHAR, events VARCHAR)
SELECT type FROM table_name_2 WHERE nat = "ger" AND name = "marcell jansen"
Marcell Jansen of the nation GER has what for the type?
CREATE TABLE table_name_2 (type VARCHAR, nat VARCHAR, name VARCHAR)
SELECT result FROM table_name_10 WHERE loser = "memphis grizzlies ( 2)"
What is the Result when the memphis grizzlies ( 2) were the loser?
CREATE TABLE table_name_10 (result VARCHAR, loser VARCHAR)
SELECT l2_cache FROM table_name_42 WHERE frequency = "1333 mhz" AND model_number = "c3 1.3a"
Which L2-Cache has a Frequency of 1333 mhz, and a Model Number of c3 1.3a?
CREATE TABLE table_name_42 (l2_cache VARCHAR, frequency VARCHAR, model_number VARCHAR)
SELECT SUM(year) FROM table_name_50 WHERE genre = "first-person shooter"
What is total number of years that has genre of first-person shooter?
CREATE TABLE table_name_50 (year INTEGER, genre VARCHAR)