sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-3041')) AND intakeoutput.cellpath LIKE '%intake%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m-%d', intakeoutput.intakeoutputtime) = '03-18' ORDER BY intakeoutput.intakeoutputtime DESC LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
what was the name of the last intake that patient 016-3041 had on 03/18/last year.It is not neccessary to use all the tables.
SELECT chartevents.charttime 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 = 25814)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rate' AND d_items.linksto = 'chartevents') AND chartevents.valuenum < 78.0 AND DATETIME(chartevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') AND STRFTIME('%d', chartevents.charttime) = '30' ORDER BY chartevents.charttime LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
when was the first time the heart rate for patient 25814 was less than 78.0 on this month/30?It is not neccessary to use all the tables.
SELECT home_team AS score FROM table_name_70 WHERE away_team = "hawthorn"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Home team score when away team is hawthorn?It is not neccessary to use all the tables.
SELECT Second FROM table WHERE Third = jean-michel arsenault
CREATE TABLE INST, Here is a database schema( table schema);
Which second's third is Jean-Michel Arsenault?.It is not neccessary to use all the tables.
SELECT Total FROM table WHERE Player = Jamie Carragher
CREATE TABLE INST, Here is a database schema( table schema);
Name the total for jamie carragher.It is not neccessary to use all the tables.
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.department = 'CLLING' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Spring' AND semester.semester_id = course_offering.semester AND semester.year = 2016
CREATE TABLE INST, Here is a database schema( table schema);
This Spring are there any CLLING classes considered upper-level ?It is not neccessary to use all the tables.
SELECT Audio FROM table WHERE Title = a storm of swords
CREATE TABLE INST, Here is a database schema( table schema);
Which audio has a Title of a storm of swords?.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.age < "89" AND procedures.short_title = "Aortocor bypas-2 cor art"
CREATE TABLE INST, Here is a database schema( table schema);
what is the number of patients who had (aorto)coronary bypass of two coronary arteries and were less than 89 years of age?It is not neccessary to use all the tables.
SELECT % of global Catholic pop. FROM table WHERE Total Population > 1,528,384,440 AND % Catholic = 3.33%
CREATE TABLE INST, Here is a database schema( table schema);
with catholic of 3.33% and total population more than 1,528,384,440, what is the % global catholic pop.?.It is not neccessary to use all the tables.
SELECT Original title FROM table WHERE Film title used in nomination = Zozo
CREATE TABLE INST, Here is a database schema( table schema);
What's the original title of the film Zozo?.It is not neccessary to use all the tables.
SELECT AVG Decile FROM table WHERE Name = te puru school
CREATE TABLE INST, Here is a database schema( table schema);
What is the average decile for te puru school?.It is not neccessary to use all the tables.
SELECT MIN(gold) FROM table_name_98 WHERE silver = 2 AND sport = "electronic sports"
CREATE TABLE INST, Here is a database schema( table schema);
I want the lowest Gold for silver being 2 and electronic sportsIt is not neccessary to use all the tables.
SELECT COUNT Result FROM table WHERE Record = 3-0
CREATE TABLE INST, Here is a database schema( table schema);
How many wins or losses were there when the record was 3-0?.It is not neccessary to use all the tables.
SELECT Crowd FROM table WHERE Away team score = 6.15 (51)
CREATE TABLE INST, Here is a database schema( table schema);
What was the size of the crowd when the away team scored 6.15 (51)?.It is not neccessary to use all the tables.
SELECT player FROM table_name_34 WHERE college = "northwestern"
CREATE TABLE INST, Here is a database schema( table schema);
What player belongs to Northwestern College?It is not neccessary to use all the tables.
SELECT "Characters" FROM table_65727 WHERE "Title" = 'suppressed duck'
CREATE TABLE INST, Here is a database schema( table schema);
What are the characters from the movie Suppressed Duck?It is not neccessary to use all the tables.
SELECT Home Town FROM table WHERE Player = steve zakuani
CREATE TABLE INST, Here is a database schema( table schema);
From what town was Steve Zakuani?.It is not neccessary to use all the tables.
SELECT MIN Total FROM table WHERE Rider = christina liebherr
CREATE TABLE INST, Here is a database schema( table schema);
What was the total for christina liebherr?.It is not neccessary to use all the tables.
SELECT "Studio host" FROM table_34206 WHERE "Play-by-play" = 'sean grande' AND "Flagship Station" = 'wrko' AND "Year" = '2005-06'
CREATE TABLE INST, Here is a database schema( table schema);
Play-by-play of sean grande, and a Flagship Station of wrko, and a Year of 2005-06 had what studio host?It is not neccessary to use all the tables.
SELECT WIAA Classification FROM table WHERE High School = Vancouver iTech Prepratory
CREATE TABLE INST, Here is a database schema( table schema);
What wiaa classifications does vancouver itech prepratory have?.It is not neccessary to use all the tables.
SELECT Outcome FROM table WHERE Opponent = mari andersson
CREATE TABLE INST, Here is a database schema( table schema);
What was the outcome in mari andersson's tournament?.It is not neccessary to use all the tables.
SELECT COUNT To par FROM table WHERE Player = laurie ayton
CREATE TABLE INST, Here is a database schema( table schema);
What is the to total number of par with laurie ayton?.It is not neccessary to use all the tables.
SELECT SUM(crowd) FROM table_name_69 WHERE venue = "kardinia park"
CREATE TABLE INST, Here is a database schema( table schema);
How large was the crowd at the Kardinia Park venue games?It is not neccessary to use all the tables.
SELECT Batting partners FROM table WHERE Fielding team = india AND Season = 1997
CREATE TABLE INST, Here is a database schema( table schema);
Who were the batting partners that played for India in 1997?.It is not neccessary to use all the tables.
SELECT horse FROM table_name_11 WHERE faults = "9" AND total = 46.36
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the horse when the faults are 9 and the total is 46.36It is not neccessary to use all the tables.
SELECT MAX Laps FROM table WHERE Time/Retired = engine AND Grid = 5
CREATE TABLE INST, Here is a database schema( table schema);
Name the highest laps for time/retired of engine and grid of 5.It is not neccessary to use all the tables.
SELECT MAX(division) FROM table_14723382_1
CREATE TABLE INST, Here is a database schema( table schema);
What is the largest numbered?It is not neccessary to use all the tables.
SELECT team FROM table_name_21 WHERE draws = "15"
CREATE TABLE INST, Here is a database schema( table schema);
Which team had 15 draws?It is not neccessary to use all the tables.
SELECT Position FROM table WHERE Player = kenneth udjus
CREATE TABLE INST, Here is a database schema( table schema);
What Position has a Player named kenneth udjus?.It is not neccessary to use all the tables.
SELECT team FROM table_1266602_2 WHERE crew_chief = "Wally Rogers"
CREATE TABLE INST, Here is a database schema( table schema);
Which teams used Wally Rogers as their crew chief?It is not neccessary to use all the tables.
SELECT rider FROM table_name_31 WHERE rounds = "7" AND motorcycle = "ducati 999 rs"
CREATE TABLE INST, Here is a database schema( table schema);
Who is riding the Ducati 999 RS in Round 7?It is not neccessary to use all the tables.
SELECT Capacity in use FROM table WHERE Annual change = 21.8%
CREATE TABLE INST, Here is a database schema( table schema);
What is the Capacity in use with an Annual change that is 21.8%?.It is not neccessary to use all the tables.
SELECT COUNT Opponents FROM table WHERE Opponent = Duke
CREATE TABLE INST, Here is a database schema( table schema);
How many times were Duke the opponents?.It is not neccessary to use all the tables.
SELECT "Label" FROM table_75841 WHERE "Date" = '28 march 2007' AND "Catalog" = 'magik muzik cd 07'
CREATE TABLE INST, Here is a database schema( table schema);
Which label released the catalog Magik Muzik CD 07 on 28 March 2007?It is not neccessary to use all the tables.
SELECT motor FROM table_name_98 WHERE apogee = "713 km"
CREATE TABLE INST, Here is a database schema( table schema);
What kind of Motor has a Apogee of 713 km?It is not neccessary to use all the tables.
SELECT SUM(total) FROM table_name_10 WHERE gold > 1 AND bronze > 0
CREATE TABLE INST, Here is a database schema( table schema);
Name the sum of total with gold more than 1 and bronze more than 0It is not neccessary to use all the tables.
SELECT AVG("attendance") FROM table_204_605 WHERE id <= 3
CREATE TABLE INST, Here is a database schema( table schema);
what was the average number of fans in attendance in the first three games ?It is not neccessary to use all the tables.
SELECT nfl_club FROM table_name_39 WHERE pick < 74 AND round > 2
CREATE TABLE INST, Here is a database schema( table schema);
What is the NFL club with a pick less than 74 and a round greater than 2?It is not neccessary to use all the tables.
SELECT AVG(games) FROM table_name_88 WHERE name = "pablo prigioni" AND assists > 14
CREATE TABLE INST, Here is a database schema( table schema);
What is the mean number of games for pablo prigioni when there are more than 14 assists?It is not neccessary to use all the tables.
SELECT imperative FROM table_name_37 WHERE subjunctive = "du måchast"
CREATE TABLE INST, Here is a database schema( table schema);
With a subjunctive of du måchast what is the imperative?It is not neccessary to use all the tables.
SELECT COUNT(population) FROM table_1449176_1 WHERE common_of = "Settimo Torinese"
CREATE TABLE INST, Here is a database schema( table schema);
How may population figures are given for Settimo TorineseIt is not neccessary to use all the tables.
SELECT Nationality FROM table WHERE Date = 6 july 1942
CREATE TABLE INST, Here is a database schema( table schema);
Name Nationality is on 6 july 1942?.It is not neccessary to use all the tables.
SELECT MAX No. in series FROM table WHERE Production code = 1.11
CREATE TABLE INST, Here is a database schema( table schema);
How many number of series have the production code of 1.11?.It is not neccessary to use all the tables.
SELECT First elected FROM table WHERE Incumbent = John Thomas Wilson
CREATE TABLE INST, Here is a database schema( table schema);
When was incumbent John Thomas Wilson first elected? .It is not neccessary to use all the tables.
SELECT To par FROM table WHERE Score = 71-74=145 AND Player = tom weiskopf
CREATE TABLE INST, Here is a database schema( table schema);
What is the to par of player tom weiskopf, who has a 71-74=145 score?.It is not neccessary to use all the tables.
SELECT AVG(score) FROM table_name_35 WHERE place = "t1" AND player = "hubert green"
CREATE TABLE INST, Here is a database schema( table schema);
Which Score has a Place of t1 and a Player of hubert green?It is not neccessary to use all the tables.
SELECT COUNT Gold FROM table WHERE Bronze > 3
CREATE TABLE INST, Here is a database schema( table schema);
What is the total number of Gold medals for the Nation with more than 3 Bronze?.It is not neccessary to use all the tables.
SELECT COUNT 1 credit FROM table WHERE 3 credits = 180
CREATE TABLE INST, Here is a database schema( table schema);
How many times is 3 credits 180?.It is not neccessary to use all the tables.
SELECT genre FROM table_name_85 WHERE developer_s_ = "nintendo ead"
CREATE TABLE INST, Here is a database schema( table schema);
What is the genre of the game developed by Nintendo EAD?It is not neccessary to use all the tables.
SELECT Name FROM table WHERE Number = 98
CREATE TABLE INST, Here is a database schema( table schema);
who is number 98?.It is not neccessary to use all the tables.
SELECT Player FROM table WHERE Score = 71-73-68-75=287
CREATE TABLE INST, Here is a database schema( table schema);
Which player had a score of 71-73-68-75=287?.It is not neccessary to use all the tables.
SELECT event FROM table_17417383_6 WHERE athlete = "Redouane Bouchtouk"
CREATE TABLE INST, Here is a database schema( table schema);
Name the event for redouane bouchtoukIt is not neccessary to use all the tables.
SELECT date FROM table_name_79 WHERE record = "21-26"
CREATE TABLE INST, Here is a database schema( table schema);
On what date was the record 21-26?It is not neccessary to use all the tables.
SELECT Class A FROM table WHERE School Year = 1987-88
CREATE TABLE INST, Here is a database schema( table schema);
For what Class A is the school year 1987-88?.It is not neccessary to use all the tables.
SELECT fa_cup_goals FROM table_name_78 WHERE total > 16 AND league_cup_goals = "1" AND club = "norwich city"
CREATE TABLE INST, Here is a database schema( table schema);
What is the amount of FA cups goals that were made when the total goals is greater than 16, and the league cup goals is 1 for the Norwich City club?It is not neccessary to use all the tables.
SELECT Period FROM table WHERE Country = south korea AND Peak position = #1
CREATE TABLE INST, Here is a database schema( table schema);
Name the period for south korea with peak position of #1.It is not neccessary to use all the tables.
SELECT Date of vacancy FROM table WHERE Position in table = 23rd
CREATE TABLE INST, Here is a database schema( table schema);
At what date did the 23rd manager vacate the position?.It is not neccessary to use all the tables.
SELECT season AS premiere FROM table_1145977_2 WHERE viewers__in_millions_ = "14.71"
CREATE TABLE INST, Here is a database schema( table schema);
When did the season air where the viewership was 14.71 million?It is not neccessary to use all the tables.
SELECT Streak FROM table WHERE Date = May 9
CREATE TABLE INST, Here is a database schema( table schema);
How many games had they won or lost in a row on May 9?.It is not neccessary to use all the tables.
SELECT 2nd member FROM table WHERE Assembled = 3 november 1529
CREATE TABLE INST, Here is a database schema( table schema);
Who was the 2nd member of the parliament that was assembled on 3 november 1529?.It is not neccessary to use all the tables.
SELECT time FROM table_name_27 WHERE opponent = "stephanie palmer"
CREATE TABLE INST, Here is a database schema( table schema);
What is the time when the opponent is stephanie palmer?It is not neccessary to use all the tables.
SELECT demographic.days_stay, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "7578"
CREATE TABLE INST, Here is a database schema( table schema);
what is days of hospital stay and death status of subject id 7578?It is not neccessary to use all the tables.
SELECT COUNT("Title") FROM table_16369 WHERE "Production code" = '2395113A'
CREATE TABLE INST, Here is a database schema( table schema);
What's the total number of episodes with the production code 2395113A?It is not neccessary to use all the tables.
SELECT team_2 FROM table_17103566_1 WHERE result = "ICL World by 8 wickets"
CREATE TABLE INST, Here is a database schema( table schema);
What is team 2 where the result is ICL world by 8 wickets?It is not neccessary to use all the tables.
SELECT MAX Extra points FROM table WHERE Player = herman everhardus AND Field goals > 0
CREATE TABLE INST, Here is a database schema( table schema);
Which Extra points is the highest one that has a Player of herman everhardus, and a Field goals larger than 0?.It is not neccessary to use all the tables.
SELECT Production code FROM table WHERE No. in series = 1
CREATE TABLE INST, Here is a database schema( table schema);
What was the production code for episode #1?.It is not neccessary to use all the tables.
SELECT nickname FROM table_262495_1 WHERE undergraduate_enrollment = 9386
CREATE TABLE INST, Here is a database schema( table schema);
When 9386 is the undergraduate enrollment what is the nickname?It is not neccessary to use all the tables.
SELECT AVG(losses) FROM table_name_43 WHERE against > 1255 AND wins = 0 AND draws < 0
CREATE TABLE INST, Here is a database schema( table schema);
What is the losses average when the against is greater than 1255 and wins is 0 and the draws less than 0?It is not neccessary to use all the tables.
SELECT SUM Crowd FROM table WHERE Venue = glenferrie oval
CREATE TABLE INST, Here is a database schema( table schema);
What is the sum of all crowds present at the Glenferrie Oval venue?.It is not neccessary to use all the tables.
SELECT top_goalscorer FROM table_2429942_2 WHERE season = "2001-02"
CREATE TABLE INST, Here is a database schema( table schema);
Who was the top goalscorer for season 2001-02?It is not neccessary to use all the tables.
SELECT MAX Laps led FROM table WHERE Chassis = Lotus-Ford 34/3
CREATE TABLE INST, Here is a database schema( table schema);
What is the largest laps led with the lotus-ford 34/3 chassis?.It is not neccessary to use all the tables.
SELECT Enrollment FROM table WHERE Colors = Green & Black
CREATE TABLE INST, Here is a database schema( table schema);
What is the enrollment for the colors green & black?.It is not neccessary to use all the tables.
SELECT loss FROM table_name_79 WHERE date = "june 2"
CREATE TABLE INST, Here is a database schema( table schema);
What was the loss for June 2?It is not neccessary to use all the tables.
SELECT MIN Season FROM table WHERE Level < 1
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the least season with level less than 1.It is not neccessary to use all the tables.
SELECT home_team AS score FROM table_name_27 WHERE home_team = "st kilda"
CREATE TABLE INST, Here is a database schema( table schema);
What is the home team score for St Kilda's home team?It is not neccessary to use all the tables.
SELECT home_team AS score FROM table_name_41 WHERE venue = "western oval"
CREATE TABLE INST, Here is a database schema( table schema);
What did the home team score when playing at Western Oval?It is not neccessary to use all the tables.
SELECT rainfall_totals__million_m_3__ FROM table_26609958_1 WHERE hydrographic_basin = "Martha Brae, River"
CREATE TABLE INST, Here is a database schema( table schema);
When martha brae river is the hydrographic basin what is the rainfall totals (million m 3)?It is not neccessary to use all the tables.
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'hyperkalemia - due to excess intake')
CREATE TABLE INST, Here is a database schema( table schema);
count the number of patients who were diagnosed with hyperkalemia - due to excess intake.It is not neccessary to use all the tables.
SELECT country FROM table_name_6 WHERE type = "loan"
CREATE TABLE INST, Here is a database schema( table schema);
What country has a loan as the type?It is not neccessary to use all the tables.
SELECT SUM("Amerindian") FROM table_7002 WHERE "White" = '6,02' AND "Total" > '100,00'
CREATE TABLE INST, Here is a database schema( table schema);
What is the sum of Amerindian, when White is 6,02, and when Total is greater than 100,00?It is not neccessary to use all the tables.
SELECT Result FROM table WHERE Date = 26th
CREATE TABLE INST, Here is a database schema( table schema);
What was the result on the 26th?.It is not neccessary to use all the tables.
SELECT retitled_as_same FROM table_name_92 WHERE show = "supermarket sweep"
CREATE TABLE INST, Here is a database schema( table schema);
Which retitled network has a Show of supermarket sweep?It is not neccessary to use all the tables.
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%holland%' ORDER BY Reputation DESC LIMIT 150
CREATE TABLE INST, Here is a database schema( table schema);
Top 150 users from Nethelands. Top 150 SO users from ChinaIt is not neccessary to use all the tables.
SELECT SUM Avg/G FROM table WHERE Gain = 1,839
CREATE TABLE INST, Here is a database schema( table schema);
Which Avg/G has a Gain of 1,839?.It is not neccessary to use all the tables.
SELECT "Written by" FROM table_24702 WHERE "Directed by" = 'Reginald Hudlin'
CREATE TABLE INST, Here is a database schema( table schema);
reginald hudlin directed how many written by.It is not neccessary to use all the tables.
SELECT build_date FROM table_name_61 WHERE prr_class = "brs24"
CREATE TABLE INST, Here is a database schema( table schema);
What is the build date of the model with a PRR Class of brs24?It is not neccessary to use all the tables.
SELECT MIN Extra points FROM table
CREATE TABLE INST, Here is a database schema( table schema);
Name the least extra points.It is not neccessary to use all the tables.
SELECT T1.resident_id, T1.other_details, COUNT(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY COUNT(*) DESC
CREATE TABLE INST, Here is a database schema( table schema);
How many services has each resident requested? List the resident id details and the count in descending order of the count.It is not neccessary to use all the tables.
SELECT Affiliation FROM table WHERE Player = Kwaku Nyamekye
CREATE TABLE INST, Here is a database schema( table schema);
What university is kwaku nyamekye affiliated with?.It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Away team = st kilda
CREATE TABLE INST, Here is a database schema( table schema);
What day did St Kilda play as the away team?.It is not neccessary to use all the tables.
SELECT location FROM table_name_68 WHERE date = "feb 10"
CREATE TABLE INST, Here is a database schema( table schema);
What is the location of the tournament on Feb 10?It is not neccessary to use all the tables.
SELECT origin, COUNT(*) FROM train GROUP BY origin
CREATE TABLE INST, Here is a database schema( table schema);
Find the number of trains starting from each origin. Plot them as bar chart.It is not neccessary to use all the tables.
SELECT june_10_11 FROM table_25287007_2 WHERE november_3 = "153"
CREATE TABLE INST, Here is a database schema( table schema);
How many solar eclipse on June 10-11 while November 3 is 153?It is not neccessary to use all the tables.
SELECT AVG(erp_w) FROM table_name_36 WHERE call_sign = "w237br"
CREATE TABLE INST, Here is a database schema( table schema);
Name the average ERP W and call sign of w237brIt is not neccessary to use all the tables.
SELECT assists FROM table_name_14 WHERE team = "smu" AND total_points = "85"
CREATE TABLE INST, Here is a database schema( table schema);
What assists has the Team SMU and the total points of 85?It is not neccessary to use all the tables.
SELECT COUNT Caliber FROM table WHERE Type = LB/RN
CREATE TABLE INST, Here is a database schema( table schema);
How many calibers require the type LB/RN?.It is not neccessary to use all the tables.
SELECT name FROM table_name_83 WHERE locale = "holland"
CREATE TABLE INST, Here is a database schema( table schema);
what is the name of the holland localeIt is not neccessary to use all the tables.
SELECT Score FROM table WHERE Visitor = boston bruins AND Date = march 13
CREATE TABLE INST, Here is a database schema( table schema);
What is the score of the Boston Bruins away game on March 13?.It is not neccessary to use all the tables.
SELECT Surface FROM table WHERE Tournament = pune, india
CREATE TABLE INST, Here is a database schema( table schema);
What Surface has a Tournament of pune, india?.It is not neccessary to use all the tables.
SELECT D.O.B. FROM table WHERE Surname = cresswell
CREATE TABLE INST, Here is a database schema( table schema);
Which DOB has a Surname of cresswell?.It is not neccessary to use all the tables.