sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT career FROM table_name_70 WHERE 2006 = "3r" AND 1999 = "2r"
CREATE TABLE INST, Here is a database schema( table schema);
What is the career for the 2006 3r and the 1999 2r?It is not neccessary to use all the tables.
SELECT UserId, UserId AS "user_link", COUNT(PostId) FROM PostHistory WHERE PostHistoryTypeId = 10 GROUP BY UserId
CREATE TABLE INST, Here is a database schema( table schema);
questions closed by mods vs community.It is not neccessary to use all the tables.
SELECT save FROM table_name_76 WHERE loss = "santiago (2–2)"
CREATE TABLE INST, Here is a database schema( table schema);
What's the save when the loss was santiago (2–2)?It is not neccessary to use all the tables.
SELECT discipline FROM table_22360_3 WHERE bronze = 0
CREATE TABLE INST, Here is a database schema( table schema);
Name the discipline for bronze being 0It is not neccessary to use all the tables.
SELECT home FROM table_name_8 WHERE date = "april 14"
CREATE TABLE INST, Here is a database schema( table schema);
Who was at home on april 14?It is not neccessary to use all the tables.
SELECT Class FROM table WHERE DRG Number(s) = 99 201
CREATE TABLE INST, Here is a database schema( table schema);
What class has 99 201 as the DRG Number(s)?.It is not neccessary to use all the tables.
SELECT DISTINCT ground_service.transport_type FROM airport, ground_service WHERE airport.airport_code = 'ONT' AND ground_service.airport_code = airport.airport_code AND ground_service.transport_type = 'TAXI'
CREATE TABLE INST, Here is a database schema( table schema);
is there TAXI service at the ONT airportIt is not neccessary to use all the tables.
SELECT Tournament FROM table WHERE Date = 6 october 2008
CREATE TABLE INST, Here is a database schema( table schema);
What is Tournament, when Date is "6 October 2008"?.It is not neccessary to use all the tables.
SELECT SALARY, MANAGER_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
CREATE TABLE INST, Here is a database schema( table schema);
For all employees who have the letters D or S in their first name, return a scatter chart about the correlation between salary and manager_id .It is not neccessary to use all the tables.
SELECT drivers FROM table_name_21 WHERE engine = "chevrolet" AND chassis = "eagle"
CREATE TABLE INST, Here is a database schema( table schema);
Who drove the Chevrolet with the Eagle chassis?It is not neccessary to use all the tables.
SELECT away_team AS score FROM table_name_46 WHERE venue = "western oval"
CREATE TABLE INST, Here is a database schema( table schema);
What was the away team score at western oval?It is not neccessary to use all the tables.
SELECT Torque FROM table WHERE Engine = 6.3l v12
CREATE TABLE INST, Here is a database schema( table schema);
What is the torque of the 6.3l v12 engine?.It is not neccessary to use all the tables.
SELECT COUNT Status FROM table WHERE County = Wayne
CREATE TABLE INST, Here is a database schema( table schema);
How many statuses are listed for Wayne county? .It is not neccessary to use all the tables.
SELECT "Away team score" FROM table_32550 WHERE "Venue" = 'arden street oval'
CREATE TABLE INST, Here is a database schema( table schema);
What was the away team score in the game at Arden Street Oval?It is not neccessary to use all the tables.
SELECT COUNT Winning driver FROM table WHERE Race Name = I Dessau Autobahnspinne
CREATE TABLE INST, Here is a database schema( table schema);
How many winners did I Dessau Autobahnspinne have?.It is not neccessary to use all the tables.
SELECT nickname FROM table_16432543_1 WHERE established = 1773
CREATE TABLE INST, Here is a database schema( table schema);
Nickname of the school established in 1773It is not neccessary to use all the tables.
SELECT D 42 √ FROM table WHERE D 45 √ = r 16
CREATE TABLE INST, Here is a database schema( table schema);
What is the D 42 √ number when the D 45 √ is r 16?.It is not neccessary to use all the tables.
SELECT Tie no FROM table WHERE Home team = swindon town
CREATE TABLE INST, Here is a database schema( table schema);
What was the tie number with the home team of Swindon Town?.It is not neccessary to use all the tables.
SELECT MAX November FROM table WHERE Game < 12 AND Opponent = @ detroit red wings
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest November that has a game less than 12, and @ detroit red wings as the opponent?.It is not neccessary to use all the tables.
SELECT COUNT(*) FROM course, course_offering, semester WHERE course_offering.start_time > '10:00:00' AND course.course_id = course_offering.course_id AND course.department = 'AUTO' AND course.number = 590 AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016
CREATE TABLE INST, Here is a database schema( table schema);
Are there many sections of AUTO 590 after 10 A.M. ?It is not neccessary to use all the tables.
SELECT winner FROM table_name_38 WHERE circuit = "amaroo park"
CREATE TABLE INST, Here is a database schema( table schema);
Who was the winner on the Amaroo Park circuit?It is not neccessary to use all the tables.
SELECT City of License FROM table WHERE Network = latv
CREATE TABLE INST, Here is a database schema( table schema);
In which city is the network latv licensed?.It is not neccessary to use all the tables.
SELECT Player FROM table WHERE Score = 73-65=138
CREATE TABLE INST, Here is a database schema( table schema);
What is the name of the golfer that has the score of 73-65=138?.It is not neccessary to use all the tables.
SELECT AVG(year) FROM table_name_50 WHERE play = "much ado about nothing" AND recipient = "ray virta"
CREATE TABLE INST, Here is a database schema( table schema);
Name the average year for much ado about nothing and recipient of ray virtaIt is not neccessary to use all the tables.
SELECT nation FROM table_name_90 WHERE points = 300.38
CREATE TABLE INST, Here is a database schema( table schema);
Which Nation has Points of 300.38?It is not neccessary to use all the tables.
SELECT SUM(silver) FROM table_name_5 WHERE bronze = 0 AND rank < 2
CREATE TABLE INST, Here is a database schema( table schema);
What is the number of silver when bronze is 0 and rank is less than 2?It is not neccessary to use all the tables.
SELECT championship FROM table_name_66 WHERE date = "26 may 1986"
CREATE TABLE INST, Here is a database schema( table schema);
What Championship has a Date of 26 may 1986?It is not neccessary to use all the tables.
SELECT "Report" FROM table_16256 WHERE "Race Name" = 'Long Beach Grand Prix'
CREATE TABLE INST, Here is a database schema( table schema);
what is the name of the report that lists the race name as long beach grand prix?It is not neccessary to use all the tables.
SELECT SUM(points) FROM table_name_58 WHERE year = 1988
CREATE TABLE INST, Here is a database schema( table schema);
What is the total point for the year listed in 1988?It is not neccessary to use all the tables.
SELECT MAX(population__2010_) FROM table_2144436_1 WHERE barangay = "Minane"
CREATE TABLE INST, Here is a database schema( table schema);
What was the population in 2010 for MinaneIt is not neccessary to use all the tables.
SELECT NFL Team FROM table WHERE Player = Aaron Williams
CREATE TABLE INST, Here is a database schema( table schema);
What NFL Teams have the player Aaron Williams?.It is not neccessary to use all the tables.
SELECT MAX(crowd) FROM table_name_36 WHERE away_team = "st kilda"
CREATE TABLE INST, Here is a database schema( table schema);
What was the largest amount of spectators when St Kilda was the away team?It is not neccessary to use all the tables.
SELECT Cover model FROM table WHERE Centerfold model = scarlett keegan
CREATE TABLE INST, Here is a database schema( table schema);
Which Cover model has a Centerfold model of scarlett keegan?.It is not neccessary to use all the tables.
SELECT Title FROM table WHERE Peak position = 10 AND Weeks on chart < 19
CREATE TABLE INST, Here is a database schema( table schema);
What is the title of the single with the peak position of 10 and weeks on chart is less than 19?.It is not neccessary to use all the tables.
SELECT Home team score FROM table WHERE Venue = vfl park
CREATE TABLE INST, Here is a database schema( table schema);
At the venue Vfl Park, what was the Home team score?.It is not neccessary to use all the tables.
SELECT 2010 FROM table WHERE Tournament = olympic games
CREATE TABLE INST, Here is a database schema( table schema);
Which 2010 stat featured the tournament of the Olympic Games?.It is not neccessary to use all the tables.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "6" AND procedures.long_title = "Procedure on single vessel"
CREATE TABLE INST, Here is a database schema( table schema);
calculate the number of patients who had procedure on single vessel and stayed in hospital for more than 6 daysIt is not neccessary to use all the tables.
SELECT AVG Number of households FROM table WHERE Median household income = $43,889
CREATE TABLE INST, Here is a database schema( table schema);
How many households have a Median household income of $43,889?.It is not neccessary to use all the tables.
SELECT make FROM table_name_24 WHERE drivers = "hisashi wada"
CREATE TABLE INST, Here is a database schema( table schema);
What is the make of the vehicle for driver Hisashi Wada?It is not neccessary to use all the tables.
SELECT Venue FROM table WHERE Home team = st kilda
CREATE TABLE INST, Here is a database schema( table schema);
What is the name of the venue where home team st kilda played?.It is not neccessary to use all the tables.
SELECT match FROM table_name_19 WHERE competition = "semifinal" AND location = "san francisco"
CREATE TABLE INST, Here is a database schema( table schema);
Which Match played in a Location of San Francisco has a Competition of Semifinal?It is not neccessary to use all the tables.
SELECT MIN Birth/2012 FROM table WHERE January–December 2012 = Tver Oblast
CREATE TABLE INST, Here is a database schema( table schema);
What were the total number of 2012 births for the January–December 2012 Tver Oblast region?.It is not neccessary to use all the tables.
SELECT 1998 FROM table_name_86 WHERE 2011 = "30.4"
CREATE TABLE INST, Here is a database schema( table schema);
What is the 1998 value if the 2011 value is 30.4?It is not neccessary to use all the tables.
SELECT To par FROM table WHERE Year(s) won = 1982
CREATE TABLE INST, Here is a database schema( table schema);
What To par was won in 1982?.It is not neccessary to use all the tables.
SELECT COUNT(area__km²_) FROM table_14986292_1 WHERE population_density_2010___km²_ = 514
CREATE TABLE INST, Here is a database schema( table schema);
Name the number of area where population density 2010 for 514It is not neccessary to use all the tables.
SELECT Director FROM table WHERE Title = antz
CREATE TABLE INST, Here is a database schema( table schema);
Who is the director of Antz?.It is not neccessary to use all the tables.
SELECT YEAR(p.CreationDate), CAST(SUM(CASE WHEN VoteTypeId = 2 THEN 1 ELSE -1 END) AS DECIMAL) / COUNT(p.Id) AS "avgscore" FROM Posts AS p LEFT OUTER JOIN Votes AS v ON p.Id = v.PostId WHERE p.CreationDate < DATEADD(dd, 14, GETDATE()) AND v.CreationDate <= DATEADD(dd, 14, p.CreationDate) AND VoteTypeId IN (2, 3) AND p.PostTypeId = 1 GROUP BY YEAR(p.CreationDate) ORDER BY YEAR(p.CreationDate)
CREATE TABLE INST, Here is a database schema( table schema);
AVERAGE SCORE using votes on questions in FIRST 14 DAYS, by year.It is not neccessary to use all the tables.
SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'
CREATE TABLE INST, Here is a database schema( table schema);
Find the name of rooms booked by some customers whose first name contains ROY.It is not neccessary to use all the tables.
SELECT DISTINCT TYPE FROM vocals
CREATE TABLE INST, Here is a database schema( table schema);
Find all the vocal types.It is not neccessary to use all the tables.
SELECT Scientific name FROM table WHERE Common name = Veiled chameleon
CREATE TABLE INST, Here is a database schema( table schema);
Name the scientific name for veiled chameleon.It is not neccessary to use all the tables.
SELECT date FROM table_name_95 WHERE race = "british grand prix"
CREATE TABLE INST, Here is a database schema( table schema);
When were the British Grand Prix races?It is not neccessary to use all the tables.
SELECT weight__kg_ FROM table_1358608_4 WHERE race = "Ranvet Stakes"
CREATE TABLE INST, Here is a database schema( table schema);
What was the weight in kg on the day of the race at Ranvet Stakes?It is not neccessary to use all the tables.
SELECT network FROM table_name_66 WHERE play_by_play = "marv albert" AND year < 1994
CREATE TABLE INST, Here is a database schema( table schema);
What is the network with the play-by-play Marv Albert before 1994?It is not neccessary to use all the tables.
SELECT COUNT First elected FROM table WHERE District = New York2
CREATE TABLE INST, Here is a database schema( table schema);
how many first elected with district being new york2.It is not neccessary to use all the tables.
SELECT AllergyType, COUNT(*) FROM Allergy_Type GROUP BY AllergyType
CREATE TABLE INST, Here is a database schema( table schema);
Show all allergy types and the number of allergies in each type. Plot them as bar chart.It is not neccessary to use all the tables.
SELECT COUNT November FROM table WHERE February > 8.53 AND March = 20.21 AND September < 7.9
CREATE TABLE INST, Here is a database schema( table schema);
What is the total number for November, larger than 8.53 in February, 20.21 in March, and less than 7.9 in September?.It is not neccessary to use all the tables.
SELECT COUNT Party FROM table WHERE Incumbent = Tom Foley
CREATE TABLE INST, Here is a database schema( table schema);
How many parties is Tom Foley a member of?.It is not neccessary to use all the tables.
SELECT MAX Season FROM table WHERE Home Team = chonburi AND Away Team = melbourne victory
CREATE TABLE INST, Here is a database schema( table schema);
Can you tell me the highest Season that has the Home Team of chonburi, and the Away Team of melbourne victory?.It is not neccessary to use all the tables.
SELECT "Unit" FROM table_39799 WHERE "Location" = 'argentina'
CREATE TABLE INST, Here is a database schema( table schema);
What unit is in Argentina?It is not neccessary to use all the tables.
SELECT DISTINCT secretary_vote FROM voting_record WHERE election_cycle = "Fall"
CREATE TABLE INST, Here is a database schema( table schema);
What are the distinct secretary votes in the fall election cycle?It is not neccessary to use all the tables.
SELECT geust FROM table_name_45 WHERE result = "0:9"
CREATE TABLE INST, Here is a database schema( table schema);
What is Geust when Result is 0:9?It is not neccessary to use all the tables.
SELECT Home team FROM table WHERE Attendance = 7 february 1996 AND Tie no = 1
CREATE TABLE INST, Here is a database schema( table schema);
Who is the home team that attended on 7 February 1996 and had a tie no of 1?.It is not neccessary to use all the tables.
SELECT MIN(sex_ratio__rural_) FROM table_10710364_2
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest sex ratio in rural areas?It is not neccessary to use all the tables.
SELECT SUM Avg/G FROM table WHERE Name = opponents AND Effic < 129.73
CREATE TABLE INST, Here is a database schema( table schema);
Which Avg/G that has a Name of opponents, and an Effic smaller than 129.73?.It is not neccessary to use all the tables.
SELECT destination FROM Flight GROUP BY destination ORDER BY COUNT(*) LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
Which destination has least number of flights?It is not neccessary to use all the tables.
SELECT game FROM table_17340355_6 WHERE team = "Milwaukee"
CREATE TABLE INST, Here is a database schema( table schema);
Which game was played by team milwaukeeIt is not neccessary to use all the tables.
SELECT Points FROM table WHERE Club = blaengarw rfc
CREATE TABLE INST, Here is a database schema( table schema);
what is the points when the club blaengarw rfc?.It is not neccessary to use all the tables.
SELECT Team 2 FROM table WHERE Team 1 = barcelona
CREATE TABLE INST, Here is a database schema( table schema);
Which Team 2 faced Team 1 from Barcelona?.It is not neccessary to use all the tables.
SELECT date__from_ FROM table_name_66 WHERE location = "zaltbommel"
CREATE TABLE INST, Here is a database schema( table schema);
On what date did the event at Zaltbommel begin?It is not neccessary to use all the tables.
SELECT COUNT(pos) FROM table_name_51 WHERE points < 10 AND qualifying > 7 AND race_1 = "ret" AND driver = "jonathan grant"
CREATE TABLE INST, Here is a database schema( table schema);
What is the total number of positions with less than 10 points more than 7 qualifying ret value in Race 1 and Jonathan Grant driving?It is not neccessary to use all the tables.
SELECT Week FROM table WHERE Home Team = detroit AND Divisional Record = (3-0) AND Overall Record = (5-1) AND Away Team = minnesota
CREATE TABLE INST, Here is a database schema( table schema);
Can you tell me the Week that has the Home Team of detroit, and the Divisional Record of (3-0), and the Overall Record of (5-1), and the Away Team of minnesota?.It is not neccessary to use all the tables.
SELECT away_captain FROM table_name_72 WHERE result = "draw" AND venue = "lord's"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Away captain when the Result was draw and a Venue of lord's?It is not neccessary to use all the tables.
SELECT Writer(s) FROM table WHERE Production code = 2395114
CREATE TABLE INST, Here is a database schema( table schema);
Who's the writer for the episode with a production code 2395114?.It is not neccessary to use all the tables.
SELECT frequency FROM table_name_70 WHERE city = "nuevo laredo" AND name = "el diario de nuevo laredo"
CREATE TABLE INST, Here is a database schema( table schema);
What is the frequency of the newspaper el diario de nuevo laredo in the city of nuevo laredo ?It is not neccessary to use all the tables.
SELECT SUM Rank FROM table WHERE Bronze < 5 AND Country = japan AND Silver > 3
CREATE TABLE INST, Here is a database schema( table schema);
What was the sum of the ranks for Japan who had less than 5 bronze medals and more than 3 silvers?.It is not neccessary to use all the tables.
SELECT oberliga_hessen FROM table_14242137_4 WHERE oberliga_baden_württemberg = "SV Sandhausen" AND oberliga_südwest = "FSV Salmrohr"
CREATE TABLE INST, Here is a database schema( table schema);
Name the oberliga hessen for sv sandhausen and fsv salmrohrIt is not neccessary to use all the tables.
SELECT "Social Democratic Party" FROM table_19959 WHERE "Control" = 'Labour'
CREATE TABLE INST, Here is a database schema( table schema);
Name the social democratic party for labourIt is not neccessary to use all the tables.
SELECT MIN(founded) FROM table_name_83 WHERE type = "private" AND nickname = "mountaineers"
CREATE TABLE INST, Here is a database schema( table schema);
Which of the private colleges is the oldest and whose nickname is the Mountaineers?It is not neccessary to use all the tables.
SELECT rank FROM table_name_32 WHERE director = "danny devito"
CREATE TABLE INST, Here is a database schema( table schema);
What is the rank of the film directed by danny devito?It is not neccessary to use all the tables.
SELECT score FROM table_name_5 WHERE set_3 = "26–28"
CREATE TABLE INST, Here is a database schema( table schema);
What is the score when the set 3 is 26–28?It is not neccessary to use all the tables.
SELECT SUM Against FROM table WHERE Wins < 9 AND Losses < 16 AND Byes = 2 AND Ballarat FL = ballarat
CREATE TABLE INST, Here is a database schema( table schema);
What is the total against that has wins less than 9, and losses less than 16, and 2 as the byes, and Ballarat FL of ballarat?.It is not neccessary to use all the tables.
SELECT Venue FROM table WHERE Away team = melbourne
CREATE TABLE INST, Here is a database schema( table schema);
What venue did melbourne play at as the away team?.It is not neccessary to use all the tables.
SELECT Outcome FROM table WHERE Opponent = roger federer
CREATE TABLE INST, Here is a database schema( table schema);
What is the outcome of the match with Roger Federer as the opponent?.It is not neccessary to use all the tables.
SELECT state FROM table_name_73 WHERE hometown = "lincoln, de"
CREATE TABLE INST, Here is a database schema( table schema);
What state has lincoln, de as the hometown?It is not neccessary to use all the tables.
SELECT result FROM table_1341930_40 WHERE district = "South Carolina 4"
CREATE TABLE INST, Here is a database schema( table schema);
Name the result for south carolina 4It is not neccessary to use all the tables.
SELECT record FROM table_name_50 WHERE week = 2
CREATE TABLE INST, Here is a database schema( table schema);
What is the Record in Week 2?It is not neccessary to use all the tables.
SELECT Performer 3 FROM table WHERE Date = 15 july 1994
CREATE TABLE INST, Here is a database schema( table schema);
Date of 15 july 1994 involves which performer 3?.It is not neccessary to use all the tables.
SELECT MIN 2008 FROM table WHERE Year = guizhou AND 2005 < 31
CREATE TABLE INST, Here is a database schema( table schema);
Name the lowest 2008 for guizhou when 2005 is less than 31.It is not neccessary to use all the tables.
SELECT Record FROM table WHERE Date = june 8
CREATE TABLE INST, Here is a database schema( table schema);
On the date of June 8 what was the record?.It is not neccessary to use all the tables.
SELECT opponents_in_the_final FROM table_name_44 WHERE tournament = "puebla"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Opponents from the final with a Tournament that is puebla?It is not neccessary to use all the tables.
SELECT couple FROM table_26375386_16 WHERE total = 8
CREATE TABLE INST, Here is a database schema( table schema);
What couple had a total of 8?It is not neccessary to use all the tables.
SELECT laps FROM table_name_59 WHERE driver = "yannick dalmas"
CREATE TABLE INST, Here is a database schema( table schema);
How many laps did Yannick Dalmas do?It is not neccessary to use all the tables.
SELECT SUM Events FROM table WHERE Top-10 = 7 AND Top-5 > 4
CREATE TABLE INST, Here is a database schema( table schema);
What is the sum of Events, when Top-10 is 7, and when Top-5 is greater than 4?.It is not neccessary to use all the tables.
SELECT Away team FROM table WHERE Tie no = 3
CREATE TABLE INST, Here is a database schema( table schema);
Which away team has a tie number of 3?.It is not neccessary to use all the tables.
SELECT Jul 2009 FROM table WHERE Result, Parliam. election 2005 = 6.5%
CREATE TABLE INST, Here is a database schema( table schema);
What was the polling percentage in Jul 2009 when the Parliament Election result of 2005 was 6.5%?.It is not neccessary to use all the tables.
SELECT date FROM table_name_16 WHERE score = "130-100"
CREATE TABLE INST, Here is a database schema( table schema);
What was the date with a resulted score of 130-100?It is not neccessary to use all the tables.
SELECT SUM Apps FROM table WHERE Name = keith treacy
CREATE TABLE INST, Here is a database schema( table schema);
What is the total of apps for Keith Treacy?.It is not neccessary to use all the tables.
SELECT MAX(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 9294)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp mean' AND d_items.linksto = 'chartevents') AND DATETIME(chartevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') AND STRFTIME('%d', chartevents.charttime) = '09'
CREATE TABLE INST, Here is a database schema( table schema);
what was the maximum value for arterial bp mean for patient 9294 on this month/09?It is not neccessary to use all the tables.
SELECT Geographical Regions FROM table WHERE Hometown = imbert
CREATE TABLE INST, Here is a database schema( table schema);
What is the geographical region for hometown Imbert?.It is not neccessary to use all the tables.
SELECT 3 AS rd_place FROM table_name_36 WHERE runner_up = "runner-up"
CREATE TABLE INST, Here is a database schema( table schema);
What shows for 3rd place when Runner-up shows as runner-up?It is not neccessary to use all the tables.