sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT COUNT(player) FROM table_28498999_6 WHERE points = 3015
CREATE TABLE INST, Here is a database schema( table schema);
what is the number of people where the pieces is 3015It is not neccessary to use all the tables.
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', prescriptions.startdate)) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2518 AND admissions.dischtime IS NULL) AND prescriptions.drug = 'bupropion' ORDER BY prescriptions.startdate LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
how many hours has it passed since patient 2518's first prescription of bupropion during their current hospital encounter?It is not neccessary to use all the tables.
SELECT Venue FROM table WHERE Game > 18 AND Opponent = morecambe
CREATE TABLE INST, Here is a database schema( table schema);
What is Venue, when Game is greater than 18, and when Opponent is Morecambe?.It is not neccessary to use all the tables.
SELECT AVG Wins FROM table WHERE Loses = 2 AND Draws < 0
CREATE TABLE INST, Here is a database schema( table schema);
What average Wins has Losses 2, and Draws less than 0?.It is not neccessary to use all the tables.
SELECT Competition FROM table WHERE Goals = deacon 10/10 AND Score = 40–12
CREATE TABLE INST, Here is a database schema( table schema);
Which competition has a Goal of deacon 10/10, and a Score of 40–12?.It is not neccessary to use all the tables.
SELECT Set 1 FROM table WHERE Set 3 = 16–25
CREATE TABLE INST, Here is a database schema( table schema);
Which Set 1 has a Set 3 of 16–25?.It is not neccessary to use all the tables.
SELECT general_classification FROM table_29077342_19 WHERE winner = "Mauricio Soler"
CREATE TABLE INST, Here is a database schema( table schema);
Name the general classification for mauricio solerIt is not neccessary to use all the tables.
SELECT played FROM table_name_51 WHERE division = "nbl div2" AND position = "12th"
CREATE TABLE INST, Here is a database schema( table schema);
What's the value for played when the division is nbl div2 with 12th position?It is not neccessary to use all the tables.
SELECT Away team score FROM table WHERE Venue = windy hill
CREATE TABLE INST, Here is a database schema( table schema);
What was the away team score at Windy Hill?.It is not neccessary to use all the tables.
SELECT MIN No. in series FROM table WHERE Title = "Rebuilding New York City's Subway"
CREATE TABLE INST, Here is a database schema( table schema);
What series number was the "rebuilding new york city's subway" project?.It is not neccessary to use all the tables.
SELECT Head coach FROM table WHERE Team = arminia bielefeld
CREATE TABLE INST, Here is a database schema( table schema);
Who is the head coach for the team, arminia bielefeld?.It is not neccessary to use all the tables.
SELECT COUNT(total) FROM table_name_32 WHERE gold = 1 AND rank < 2
CREATE TABLE INST, Here is a database schema( table schema);
How many totals have 1 gold and a rank smaller than 2?It is not neccessary to use all the tables.
SELECT MAX(pop__2010_) FROM table_name_85 WHERE latitude = 48.853051 AND water__sqmi_ < 0.9590000000000001
CREATE TABLE INST, Here is a database schema( table schema);
What was the population fo the township with a Latitude of 48.853051 and a Water (sqmi) smaller than 0.9590000000000001?It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Team = holden racing team AND Circuit = eastern creek raceway
CREATE TABLE INST, Here is a database schema( table schema);
What is Date, when Team is Holden Racing Team, and when Circuit is Eastern Creek Raceway?.It is not neccessary to use all the tables.
SELECT MIN Goals FROM table WHERE Ranking < 4 AND Years = 1996–13
CREATE TABLE INST, Here is a database schema( table schema);
Who had fewer goals than 4 during the years of 1996–13?.It is not neccessary to use all the tables.
SELECT 2010 FROM table_name_84 WHERE 2012 = "2r" AND tournament = "us open"
CREATE TABLE INST, Here is a database schema( table schema);
If the US Open tournament had 2r in 2012 what was it in 2010?It is not neccessary to use all the tables.
SELECT Record FROM table WHERE Decision = parent AND Home = philadelphia AND Date = december 12
CREATE TABLE INST, Here is a database schema( table schema);
What record has a decision of parent, Philadelphia as the home, with december 12 as the date?.It is not neccessary to use all the tables.
SELECT season__number FROM table_16175064_3 WHERE director_s_ = "Donald Crombie" AND series__number = 40
CREATE TABLE INST, Here is a database schema( table schema);
What is the season number of the episode directed by Donald Crombie and the series number is 40?It is not neccessary to use all the tables.
SELECT Label FROM table WHERE Release = liebesgrüsse aus ost-berlin
CREATE TABLE INST, Here is a database schema( table schema);
Which Label has a Release of liebesgrüsse aus ost-berlin?.It is not neccessary to use all the tables.
SELECT first_name, country_code FROM players ORDER BY birth_date LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
Find the first name and country code of the oldest player.It is not neccessary to use all the tables.
SELECT COUNT Index FROM table WHERE Ozone, Running 8 hourly mean (μg/m 3 ) = 66-99
CREATE TABLE INST, Here is a database schema( table schema);
How many different index numbers are there for an ozone, running 8 hourly mean of 66-99?.It is not neccessary to use all the tables.
SELECT high_rebounds FROM table_27704187_11 WHERE date = "April 8"
CREATE TABLE INST, Here is a database schema( table schema);
Who had the high rebounds on april 8?It is not neccessary to use all the tables.
SELECT money___$__ FROM table_name_1 WHERE player = "jodie mudd"
CREATE TABLE INST, Here is a database schema( table schema);
How much money did jodie mudd get?It is not neccessary to use all the tables.
SELECT School FROM table WHERE Hometown = Lake Charles, LA
CREATE TABLE INST, Here is a database schema( table schema);
What is the school of the player from Lake Charles, LA?.It is not neccessary to use all the tables.
SELECT DISTINCT flight.flight_id FROM airport, airport_service, city, flight WHERE (((flight.arrival_time <= 2230 AND flight.arrival_time >= 2130) AND city.city_code = airport_service.city_code AND city.city_name = 'SAN JOSE' AND flight.to_airport = airport_service.airport_code) AND airport.airport_code = 'LGA' AND flight.from_airport = airport.airport_code) AND flight.airline_code = 'UA'
CREATE TABLE INST, Here is a database schema( table schema);
what flights on UA leave LGA for SAN JOSE and arrive around 10pmIt is not neccessary to use all the tables.
SELECT attendance FROM table_name_13 WHERE result = "l12–21"
CREATE TABLE INST, Here is a database schema( table schema);
What Attendance has a Result of l12–21?It is not neccessary to use all the tables.
SELECT loser FROM table_name_72 WHERE sport = "hockey"
CREATE TABLE INST, Here is a database schema( table schema);
What losing team plays hockey?It is not neccessary to use all the tables.
SELECT qual FROM table_name_97 WHERE year = "1959"
CREATE TABLE INST, Here is a database schema( table schema);
What was the qualifying time of Jim Rathmann in 1959?It is not neccessary to use all the tables.
SELECT Years FROM table WHERE Position = mf
CREATE TABLE INST, Here is a database schema( table schema);
In what Years was the Player in MF Position?.It is not neccessary to use all the tables.
SELECT AVG(size__steps_) FROM table_name_62 WHERE interval_name = "minor third"
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the average size for minor thirdIt is not neccessary to use all the tables.
SELECT Title FROM table WHERE Original air date = October 21, 1998
CREATE TABLE INST, Here is a database schema( table schema);
What is the title of the episode with the original air date October 21, 1998?.It is not neccessary to use all the tables.
SELECT color_description FROM ref_colors
CREATE TABLE INST, Here is a database schema( table schema);
List the description of all the colors.It is not neccessary to use all the tables.
SELECT SUM(draws) FROM table_name_83 WHERE wins > 7 AND wimmera_fl = "nhill" AND losses > 8
CREATE TABLE INST, Here is a database schema( table schema);
How many Draws have Wins larger than 7 and a Wimmera FL of nhill and Losses larger than 8?It is not neccessary to use all the tables.
SELECT Height ft (m) FROM table WHERE Floors < 11
CREATE TABLE INST, Here is a database schema( table schema);
What is the hight in ft and m of the building with less than 11 floors?.It is not neccessary to use all the tables.
SELECT chassis FROM table_name_62 WHERE rounds = "1" AND driver = "maria teresa de filippis"
CREATE TABLE INST, Here is a database schema( table schema);
What is the name of the Chassis of Diver Maria Teresa de Filippis in round 1?It is not neccessary to use all the tables.
SELECT Rank FROM table WHERE Yardage = 58179
CREATE TABLE INST, Here is a database schema( table schema);
What is the rank of the player who got 58179 in yardage?.It is not neccessary to use all the tables.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND prescriptions.formulary_drug_cd = "ESMOBASE"
CREATE TABLE INST, Here is a database schema( table schema);
give me the number of patients whose admission location is emergency room admit and drug code is esmobase?It is not neccessary to use all the tables.
SELECT MAX Pop. ¹ FROM table WHERE Prefecture = tottori
CREATE TABLE INST, Here is a database schema( table schema);
Name the highest pop for tottori.It is not neccessary to use all the tables.
SELECT COUNT(year_joined) FROM table_name_68 WHERE size < 417 AND ihsaa_class = "a" AND school = "jac-cen-del"
CREATE TABLE INST, Here is a database schema( table schema);
How many years Joined have a Size smaller than 417 and an IHSAA Class of A and a School of jac-cen-del?It is not neccessary to use all the tables.
SELECT college_junior_club_team__league_ FROM table_name_31 WHERE player = "matthew bartkowski"
CREATE TABLE INST, Here is a database schema( table schema);
Which College/Junior/Club Team (league) does Matthew Bartkowski play for?It is not neccessary to use all the tables.
SELECT MAX(_number) FROM table_13956521_2 WHERE original_airdate = "March 14, 2001"
CREATE TABLE INST, Here is a database schema( table schema);
what is the maximum # with original airdate being march 14 2001It is not neccessary to use all the tables.
SELECT result FROM table_name_27 WHERE venue = "h"
CREATE TABLE INST, Here is a database schema( table schema);
What was the result of the game played in Venue H?It is not neccessary to use all the tables.
SELECT High assists FROM table WHERE Game = 4
CREATE TABLE INST, Here is a database schema( table schema);
Who had the highest assists in game 4?.It is not neccessary to use all the tables.
SELECT points FROM table_name_30 WHERE games = "348"
CREATE TABLE INST, Here is a database schema( table schema);
How many points were scored by the player who played 348 games?It is not neccessary to use all the tables.
SELECT TYPE, COUNT(*) FROM operate_company GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
What is the most common company type and how many are there?It is not neccessary to use all the tables.
SELECT Result FROM table WHERE First elected = 1918
CREATE TABLE INST, Here is a database schema( table schema);
What was the election result for the candidate first elected in 1918?.It is not neccessary to use all the tables.
SELECT Date of birth FROM table WHERE Name = pananmal punjabi
CREATE TABLE INST, Here is a database schema( table schema);
What is the Pananmal Punjabi's date of birth?.It is not neccessary to use all the tables.
SELECT Away team score FROM table WHERE Home team = essendon
CREATE TABLE INST, Here is a database schema( table schema);
what is the away team score when the home team is essendon?.It is not neccessary to use all the tables.
SELECT T1.id, T1.name FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id GROUP BY T1.id HAVING COUNT(*) > 1
CREATE TABLE INST, Here is a database schema( table schema);
What are the ids and names of the companies that operated more than one flight?It is not neccessary to use all the tables.
SELECT COUNT Round FROM table WHERE School = ucla
CREATE TABLE INST, Here is a database schema( table schema);
What is the total number of rounds that UCLA has?.It is not neccessary to use all the tables.
SELECT Distance FROM table WHERE Event = breaststroke AND Location = beijing, chn
CREATE TABLE INST, Here is a database schema( table schema);
Which Distance has an Event of breaststroke, and a Location of beijing, chn?.It is not neccessary to use all the tables.
SELECT Release type FROM table WHERE Album = napisten hava
CREATE TABLE INST, Here is a database schema( table schema);
What type of release was Napisten Hava?.It is not neccessary to use all the tables.
SELECT method FROM table_name_76 WHERE res = "loss" AND time = "5:00"
CREATE TABLE INST, Here is a database schema( table schema);
What is the method where there is a loss with time 5:00?It is not neccessary to use all the tables.
SELECT AVG(money___) AS $__ FROM table_name_74 WHERE score = 69 - 69 - 76 - 69 = 283
CREATE TABLE INST, Here is a database schema( table schema);
What is the average Money ( $ ) when Score is "69-69-76-69=283"?It is not neccessary to use all the tables.
SELECT MAX(average) FROM table_name_41 WHERE goals = 34 AND matches < 37
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest Average when Goals is "34" and when Matches is less than 37?It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Scorers = parkinson
CREATE TABLE INST, Here is a database schema( table schema);
what is the date when scorers is parkinson?.It is not neccessary to use all the tables.
SELECT Incumbent FROM table WHERE Candidates = Joseph Hiester (DR) 83.2% Roswell Wells (F) 16.8%
CREATE TABLE INST, Here is a database schema( table schema);
Name the incumbent for candidates Joseph Hiester (dr) 83.2% Roswell Wells (f) 16.8%..It is not neccessary to use all the tables.
SELECT driving_force_gt FROM table_name_2 WHERE gt_force = "no" AND driving_force_pro = "no" AND g27_racing_wheel = "no"
CREATE TABLE INST, Here is a database schema( table schema);
GT Force of no, and a Driving Force Pro of no, and a G27 Racing Wheel of no has what driving force gt?It is not neccessary to use all the tables.
SELECT District FROM table WHERE Candidates = William Madison Whittington (D) Unopposed
CREATE TABLE INST, Here is a database schema( table schema);
what's the district  with candidates being william madison whittington (d) unopposed.It is not neccessary to use all the tables.
SELECT COUNT Title FROM table WHERE Production code = NABF07
CREATE TABLE INST, Here is a database schema( table schema);
How many titles for the production code of NABF07?.It is not neccessary to use all the tables.
SELECT COUNT(valves) FROM table_25695027_1 WHERE years_built = "1902-05"
CREATE TABLE INST, Here is a database schema( table schema);
How many types of valves were used on this engine that was built on 1902-05?It is not neccessary to use all the tables.
SELECT COUNT(wins) FROM table_name_95 WHERE events = 7 AND top_10 > 2
CREATE TABLE INST, Here is a database schema( table schema);
How many wins are related to events of 7 and more than 2 top-10s?It is not neccessary to use all the tables.
SELECT Famous_Title FROM artist WHERE Artist = "Triumfall"
CREATE TABLE INST, Here is a database schema( table schema);
What are the famous titles of the artist "Triumfall"?It is not neccessary to use all the tables.
SELECT LOCATION FROM cinema WHERE openning_year >= 2010 GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
What is the location with the most cinemas opened in year 2010 or later?It is not neccessary to use all the tables.
SELECT MAX(rank) FROM table_name_19 WHERE nation = "italy" AND gold > 1
CREATE TABLE INST, Here is a database schema( table schema);
what is the highest rank for italy when gold is more than 1?It is not neccessary to use all the tables.
SELECT AVG Silver FROM table WHERE Bronze < 15 AND Nation = montenegro AND Total > 11
CREATE TABLE INST, Here is a database schema( table schema);
What is the average amount of silver medals Montenegro, who has less than 15 bronze and more than 11 total medals, has?.It is not neccessary to use all the tables.
SELECT name FROM table_name_44 WHERE nationality = "belgium"
CREATE TABLE INST, Here is a database schema( table schema);
Which player is from Belgium?It is not neccessary to use all the tables.
SELECT Manner of departure FROM table WHERE Outgoing manager = Geninho
CREATE TABLE INST, Here is a database schema( table schema);
Why did Geninho leave as manager?.It is not neccessary to use all the tables.
SELECT Chassis FROM table WHERE Engine = porsche flat-4 AND Year < 1958
CREATE TABLE INST, Here is a database schema( table schema);
What chassis did the porsche flat-4 use before 1958?.It is not neccessary to use all the tables.
SELECT status FROM table_171250_2 WHERE official_name = "Saint-Jacques"
CREATE TABLE INST, Here is a database schema( table schema);
What are that status(es) of saint-jacques?It is not neccessary to use all the tables.
SELECT * FROM table_train_87 WHERE body_mass_index_bmi > 18 AND body_mass_index_bmi < 32
CREATE TABLE INST, Here is a database schema( table schema);
body mass index ( bmi ) between 18 and 32 kilograms per square meter ( kg / m^2 )It is not neccessary to use all the tables.
SELECT Percentage (2011) FROM table WHERE Population (2006) < 8,085 AND Population (2011) < 145
CREATE TABLE INST, Here is a database schema( table schema);
What percentage of people in 2011 had a mother tongue that was shared by less than 8,085 in 2006 and less than 145 in 2011?.It is not neccessary to use all the tables.
SELECT template_type_description FROM Ref_template_types WHERE template_type_code = "AD"
CREATE TABLE INST, Here is a database schema( table schema);
What is the template type descriptions for template type code "AD".It is not neccessary to use all the tables.
SELECT drivers FROM table_name_61 WHERE tyre = "k" AND team = "avanzza rosso"
CREATE TABLE INST, Here is a database schema( table schema);
Who is the driver with a tyre of k for Avanzza Rosso?It is not neccessary to use all the tables.
SELECT AVG(position) FROM table_name_19 WHERE against < 57 AND team = "juventus"
CREATE TABLE INST, Here is a database schema( table schema);
What is the average Position with less than 57 against and the team is Juventus?It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Attendance = 25,034
CREATE TABLE INST, Here is a database schema( table schema);
What is the score of the game attended by 25,034?.It is not neccessary to use all the tables.
SELECT Location FROM table WHERE Tournament = buick-goodwrench open
CREATE TABLE INST, Here is a database schema( table schema);
What is the Location for the buick-goodwrench open?.It is not neccessary to use all the tables.
SELECT COUNT(player) FROM table_16570286_4 WHERE best_bowling = "4/125"
CREATE TABLE INST, Here is a database schema( table schema);
How many players Bowled 4/125?It is not neccessary to use all the tables.
SELECT English FROM table WHERE Bulgarian = бяха чули
CREATE TABLE INST, Here is a database schema( table schema);
What's the English Pluperfect when the Bulgarian is бяха чули?.It is not neccessary to use all the tables.
SELECT Losing Hand FROM table WHERE Winning Hand = 7h 7s
CREATE TABLE INST, Here is a database schema( table schema);
What was the losing hand where the winning hand was 7h 7s?.It is not neccessary to use all the tables.
SELECT Written by FROM table WHERE Production code = 2J5153
CREATE TABLE INST, Here is a database schema( table schema);
Who wrote the episode with the production code 2j5153?.It is not neccessary to use all the tables.
SELECT right_ascension___j2000__ FROM table_name_2 WHERE object_type = "globular cluster" AND apparent_magnitude = 8.5 AND ngc_number = 6273
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the right ascensuon for object type of globular cluster and apparent magnitude of 8.5 and NGC number of 6273It is not neccessary to use all the tables.
SELECT Country FROM table WHERE Player = bobby nichols
CREATE TABLE INST, Here is a database schema( table schema);
What country does Bobby Nichols play for?.It is not neccessary to use all the tables.
SELECT Date performed FROM table WHERE Main contestant = jatin shah AND Co-contestant (Yaar vs. Pyaar) = shalini chandran
CREATE TABLE INST, Here is a database schema( table schema);
What is the date of the performance by Jatin Shah and co-contestant is Shalini Chandran?.It is not neccessary to use all the tables.
SELECT opponent FROM table_name_42 WHERE surface = "hard"
CREATE TABLE INST, Here is a database schema( table schema);
What person was played against when the playing surface was hard?It is not neccessary to use all the tables.
SELECT SUM Points FROM table WHERE Opponent = new york islanders AND Game < 65
CREATE TABLE INST, Here is a database schema( table schema);
Which Points have an Opponent of new york islanders, and a Game smaller than 65?.It is not neccessary to use all the tables.
SELECT COUNT Release date FROM table WHERE Country = west germany AND Release format = vinyl
CREATE TABLE INST, Here is a database schema( table schema);
How many release dates have a Country of west germany, and a Release format of vinyl?.It is not neccessary to use all the tables.
SELECT 2010 FROM table WHERE 2006 = a AND 2009 = 1r
CREATE TABLE INST, Here is a database schema( table schema);
What is the value for 2010 when the value for 2006 is A and the value for 2009 is 1R?.It is not neccessary to use all the tables.
SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T1.name = 'DVD drive'
CREATE TABLE INST, Here is a database schema( table schema);
Find the name of companies that do not make DVD drive.It is not neccessary to use all the tables.
SELECT team FROM table_11964154_7 WHERE game = 25
CREATE TABLE INST, Here is a database schema( table schema);
Whom did they play on game number 25?It is not neccessary to use all the tables.
SELECT MIN Points FROM table WHERE Player = willie heston AND Touchdowns < 3
CREATE TABLE INST, Here is a database schema( table schema);
What is the fewest Points that has Willie Heston as Player and less than 3 as Touchdowns?.It is not neccessary to use all the tables.
SELECT SUM Tries FROM table WHERE Goals > 0
CREATE TABLE INST, Here is a database schema( table schema);
How many tries have goals greater than 0?.It is not neccessary to use all the tables.
SELECT episode FROM table_name_62 WHERE viewers__m_ > 5.63 AND households__rating_share_ = "4.5/7"
CREATE TABLE INST, Here is a database schema( table schema);
Name the episode for viewers bigger than 5.63 and the households rating is 4.5/7It is not neccessary to use all the tables.
SELECT current_name FROM table_name_91 WHERE year_first_opened > 2011
CREATE TABLE INST, Here is a database schema( table schema);
What ride opened after 2011?It is not neccessary to use all the tables.
SELECT Location FROM table WHERE Champion = anke huber
CREATE TABLE INST, Here is a database schema( table schema);
What location did Anke Huber win the championship?.It is not neccessary to use all the tables.
SELECT COUNT(high_rebounds) FROM table_17621978_11 WHERE date = "April 21"
CREATE TABLE INST, Here is a database schema( table schema);
Name the number of high rebounds for april 21It is not neccessary to use all the tables.
SELECT MAX(round) FROM table_name_51 WHERE name = "david kimball" AND overall < 229
CREATE TABLE INST, Here is a database schema( table schema);
Name of David Kimball and an Overall smaller than 229 is what highest round?It is not neccessary to use all the tables.
SELECT 1861 FROM table WHERE Year = year AND 1881 = 1991
CREATE TABLE INST, Here is a database schema( table schema);
What's the 1861 had 1991 in 1881 and a year of year?.It is not neccessary to use all the tables.
SELECT COUNT(title) FROM table_26493520_1 WHERE written_by = "Alexander Woo" AND directed_by = "Scott Winant"
CREATE TABLE INST, Here is a database schema( table schema);
How many episodes were written by Alexander Woo and directed by Scott Winant?It is not neccessary to use all the tables.
SELECT district FROM table_1342270_5 WHERE incumbent = "William Fadjo Cravens"
CREATE TABLE INST, Here is a database schema( table schema);
William Fadjo Cravens serves the fourth district of Arkansas.It is not neccessary to use all the tables.