instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
count the number of times patient 18517 has had the po intake on the last intensive care unit visit. | CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE icustays (row_id number,subject_id number,hadm_id nu... | SELECT COUNT(*) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 18517) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND inputevents_cv.itemid IN ... |
If the chief judge is Glen E. Conrad, what is the region? | CREATE TABLE table_2735 ("Region" text,"Citation" text,"Court of Appeals" text,"Established" real,"Judges" real,"Meeting places" real,"Chief judge" text) | SELECT "Region" FROM table_2735 WHERE "Chief judge" = 'Glen E. Conrad' |
One 6 November 2007 what was the manner of departure for the coach release in football league one? | CREATE TABLE table_30376 ("Team" text,"Outgoing manager" text,"Manner of departure" text,"Date of vacancy" text,"Replaced by" text,"Date of appointment" text,"Position in table" text) | SELECT "Manner of departure" FROM table_30376 WHERE "Date of appointment" = '6 November 2007' |
Name the number of clock rate mhz when bandwidth mb/s is 2400 | CREATE TABLE table_19205 ("Designation" text,"Bus width (bits)" real,"Channels" text,"Clock rate (MHz)" real,"Bandwidth (MB/s)" real) | SELECT COUNT("Clock rate (MHz)") FROM table_19205 WHERE "Bandwidth (MB/s)" = '2400' |
Ratio of reputation estimated by votes got, vs. real reputation. We calculate the rep of the users by counting only the up/down/accept votes (so: no bounty, edits, -100 for rudeness, 1 rep limit, community owned posts, -1 for answer downs, no rep for most deleted posts, and no rep for self-answer accepts). Then we see ... | CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score num... | WITH VoteRep AS (SELECT 1 AS VoteTypeId, 15 AS Rep UNION SELECT 2, 10 UNION SELECT 3, -2), Raw AS (SELECT Users.Id, 1.0 * SUM(VoteRep.Rep) / MIN(Users.Reputation) AS EstRep, MIN(Users.Reputation) AS Reputation FROM Users, Posts, Votes, VoteRep WHERE Posts.OwnerUserId = Users.Id AND Votes.PostId = Posts.Id AND Votes.Vot... |
what are the number of times super league appears under the top rugby league level column ? | CREATE TABLE table_204_387 (id number,"name" text,"country" text,"top rugby league level" text,"top union level" text,"top representation level" text,"rugby league debut" number,"rugby union debut" number) | SELECT COUNT(*) FROM table_204_387 WHERE "top rugby league level" = 'super league' |
What is the date of the label Alfa records, a CD format, and an alca-9201 catalog? | CREATE TABLE table_69911 ("Region" text,"Date" text,"Label" text,"Format" text,"Catalog" text) | SELECT "Date" FROM table_69911 WHERE "Label" = 'alfa records' AND "Format" = 'cd' AND "Catalog" = 'alca-9201' |
what is the monthly minimum sodium value for patient 7400 in 2104? | CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE chartevents (... | SELECT MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 7400) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'sodium') AND STRFTIME('%y', labevents.charttime) = '2104' GROUP BY STRFTIME(... |
What is the Money ($) player Loren Roberts has made? | CREATE TABLE table_47784 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money ($)" real) | SELECT MAX("Money ( $ )") FROM table_47784 WHERE "Player" = 'loren roberts' |
how many times did Casey Martin win? | CREATE TABLE table_21175 ("Year" real,"Tournaments played" real,"Cuts made" real,"Wins" real,"Best finish" text,"Earnings ($)" real,"Money list rank" text) | SELECT MAX("Wins") FROM table_21175 |
what were the five most commonly diagnosed diagnoses for patients who previously received a insert intercostal cath within 2 months since 2102? | CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wardid number,last_wardid nu... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissi... |
What is the 1st leg with a 4-3 agg.? | CREATE TABLE table_name_25 (agg VARCHAR) | SELECT 1 AS st_leg FROM table_name_25 WHERE agg = "4-3" |
What is the date that is Away team is Honduras? | CREATE TABLE table_name_25 (date VARCHAR,away_team VARCHAR) | SELECT date FROM table_name_25 WHERE away_team = "honduras" |
What is the 1999 tournament that has a Q1 in 2003 and a Q3 in 2002? | CREATE TABLE table_name_2 (Id VARCHAR) | SELECT 1999 FROM table_name_2 WHERE 2003 = "q1" AND 2002 = "q3" |
Which week was the game held at Kingdome on October 13, 1991? | CREATE TABLE table_name_71 (week INTEGER,game_site VARCHAR,date VARCHAR) | SELECT MIN(week) FROM table_name_71 WHERE game_site = "kingdome" AND date = "october 13, 1991" |
What is the Closure date of Hunterston B | CREATE TABLE table_19257 ("AGR Power Station" text,"Net MWe" real,"Construction started" real,"Connected to grid" real,"Commercial operation" real,"Accounting closure date" real) | SELECT MIN("Accounting closure date") FROM table_19257 WHERE "AGR Power Station" = 'Hunterston B' |
When someone was first elected in 1898 what was the result? | CREATE TABLE table_name_53 (result VARCHAR,first_elected VARCHAR) | SELECT result FROM table_name_53 WHERE first_elected = "1898" |
Which providers use version 2008? | CREATE TABLE table_19365 ("Application" text,"Version" text,"Cmdlets" text,"Provider" text,"Management GUI" text) | SELECT "Provider" FROM table_19365 WHERE "Version" = '2008' |
Show the name of colleges that have at least two players. | CREATE TABLE match_season (College VARCHAR) | SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 |
What was the score of the game that led to a 7-5 record? | CREATE TABLE table_name_91 (score VARCHAR,record VARCHAR) | SELECT score FROM table_name_91 WHERE record = "7-5" |
Who is the PBA team with Mlqu college? | CREATE TABLE table_name_68 (pba_team VARCHAR,college VARCHAR) | SELECT pba_team FROM table_name_68 WHERE college = "mlqu" |
What was the stadium in Moorabbin, Victoria built for? | CREATE TABLE table_28885977_1 (built_for VARCHAR,location VARCHAR) | SELECT built_for FROM table_28885977_1 WHERE location = "Moorabbin, Victoria" |
what is the number of mclaren ford constructors ? | CREATE TABLE table_203_804 (id number,"pos" text,"no" number,"driver" text,"constructor" text,"laps" number,"time/retired" text,"grid" number) | SELECT COUNT("constructor") FROM table_203_804 WHERE "constructor" = 'mclaren-ford' |
Just give me a histogram that X is the details of the organization and the Y-axis is the number of things they own, sort by the Y-axis in ascending. | CREATE TABLE Residents (resident_id INTEGER,property_id INTEGER,date_moved_in DATETIME,date_moved_out DATETIME,other_details VARCHAR(255))CREATE TABLE Things (thing_id INTEGER,organization_id INTEGER,Type_of_Thing_Code CHAR(15),service_type_code CHAR(10),service_details VARCHAR(255))CREATE TABLE Timed_Locations_of_Thin... | SELECT organization_details, COUNT(organization_details) FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id GROUP BY organization_details ORDER BY COUNT(organization_details) |
Ken Wright of the National Party was from which province? | CREATE TABLE table_54243 ("Name" text,"Party" text,"Province" text,"Term expires" real,"Term of office" text) | SELECT "Province" FROM table_54243 WHERE "Party" = 'national' AND "Name" = 'ken wright' |
who won the season in the north before ec bayreuth did in 2002-03 ? | CREATE TABLE table_204_1 (id number,"season" text,"north" text,"south" text,"east" text,"west" text) | SELECT "north" FROM table_204_1 WHERE id = (SELECT id FROM table_204_1 WHERE "north" = 'ec bayreuth') - 1 |
What is the lowest number of silvers for countries in rank 12 with more than 0 bronze? | CREATE TABLE table_name_73 (silver INTEGER,rank VARCHAR,bronze VARCHAR) | SELECT MIN(silver) FROM table_name_73 WHERE rank = "12" AND bronze > 0 |
how many cyclist do not have -1 laps down ? | CREATE TABLE table_204_552 (id number,"rank" number,"cyclist" text,"team" text,"laps\ndown" number,"notes" text) | SELECT COUNT("cyclist") FROM table_204_552 WHERE "laps\ndown" IS NULL |
What is the total number of fruit trees of the governorate with more than 12,141 vegetables, less than 153,232 industrial crops, and less than 3,140 cereals? | CREATE TABLE table_12847 ("Governorate" text,"Cereals" real,"Fruit Trees" real,"Olives" real,"Industrial crops" real,"Vegetables" real) | SELECT COUNT("Fruit Trees") FROM table_12847 WHERE "Vegetables" > '12,141' AND "Industrial crops" < '153,232' AND "Cereals" < '3,140' |
When did the vice president with a vice over 6 take office? | CREATE TABLE table_48660 ("President" text,"Vice" real,"Romanized (Hangul)" text,"Took office" text,"Left office" text,"Political party" text) | SELECT "Took office" FROM table_48660 WHERE "Vice" > '6' |
What is the largest number of 10 C points for a team with 39 total points? | CREATE TABLE table_28169 ("Pos" real,"Team" text,"07 A Pts" real,"08 C Pts" real,"08 A Pts" real,"09 C Pts" real,"09 A Pts" real,"10 C Pts" real,"Total Pts" real,"Total Pld" real,"Avg" text) | SELECT MAX("10 C Pts") FROM table_28169 WHERE "Total Pts" = '39' |
What was the date for Game 41? | CREATE TABLE table_name_33 (date VARCHAR,game VARCHAR) | SELECT date FROM table_name_33 WHERE game = "41" |
What position does Matt Hobgood play? | CREATE TABLE table_17035 ("Player" text,"Position" text,"School" text,"Hometown" text,"MLB Draft" text) | SELECT "Position" FROM table_17035 WHERE "Player" = 'Matt Hobgood' |
What is the Tie no of the game with an Attendance of 4,658? | CREATE TABLE table_name_34 (tie_no VARCHAR,attendance VARCHAR) | SELECT tie_no FROM table_name_34 WHERE attendance = "4,658" |
Display a bar chart for what are the ids and details for all organizations that have grants of more than 6000 dollars?, could you list by the Y from high to low? | CREATE TABLE Staff_Roles (role_code VARCHAR(10),role_description VARCHAR(255))CREATE TABLE Document_Types (document_type_code VARCHAR(10),document_description VARCHAR(255))CREATE TABLE Organisation_Types (organisation_type VARCHAR(10),organisation_type_description VARCHAR(255))CREATE TABLE Research_Staff (staff_id INTE... | SELECT T2.organisation_details, T1.organisation_id FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_details ORDER BY T1.organisation_id DESC |
what is procedure short title of subject name francis baseler? | CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag text,admission_location text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Francis Baseler" |
What shows at 12:30 pm when 1:30 pm is All My Children? | CREATE TABLE table_61202 ("7:00 am" text,"7:30 am" text,"8:00 am" text,"9:00 am" text,"11:00 am" text,"noon" text,"12:30 pm" text,"1:00 pm" text,"1:30 pm" text,"2:00 pm" text,"3:00 pm" text,"3:30 pm" text,"4:00 pm" text,"4:30 pm" text,"5:00 pm" text,"6:30 pm" text) | SELECT "12:30 pm" FROM table_61202 WHERE "1:30 pm" = 'all my children' |
When did the High Park Demons play Away? | CREATE TABLE table_75790 ("Date" text,"Time" text,"Home" text,"Away" text,"Score" text,"Ground" text) | SELECT "Date" FROM table_75790 WHERE "Away" = 'high park demons' |
Goalsagainst that has a Points of 108, and a Lost smaller than 14 has what average? | CREATE TABLE table_name_40 (goalsagainst INTEGER,points VARCHAR,lost VARCHAR) | SELECT AVG(goalsagainst) FROM table_name_40 WHERE points = 108 AND lost < 14 |
how many patients whose age is less than 59 and drug route is replace? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "59" AND prescriptions.route = "REPLACE" |
how many patients whose admission year is less than 2200 and procedure long title is other bronchoscopy? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2200" AND procedures.long_title = "Other bronchoscopy" |
What is the name of a running back in a round before round 3? | CREATE TABLE table_32201 ("Round" real,"Overall" real,"Player" text,"Position" text,"School/Club Team" text) | SELECT "Player" FROM table_32201 WHERE "Round" < '3' AND "Position" = 'running back' |
calculate the five year survival rate of the patients diagnosed with hematoma complic proc. | CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE procedures_icd (row_i... | SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t2.charttime) > 5 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id... |
Which game has a number lower than 57 and more than 50 points? | CREATE TABLE table_name_25 (location VARCHAR,game VARCHAR,points VARCHAR) | SELECT location FROM table_name_25 WHERE game < 57 AND points > 50 |
What is the segment A on episode 237? | CREATE TABLE table_19924 ("Series Ep." text,"Episode" real,"Segment A" text,"Segment B" text,"Segment C" text,"Segment D" text) | SELECT "Segment A" FROM table_19924 WHERE "Episode" = '237' |
What was the maximum speed for the P4-1 (24/36 ps)? | CREATE TABLE table_45301 ("Type" text,"Construction period" text,"Cylinder" text,"Capacity" text,"Power" text,"Vmax" text) | SELECT "Vmax" FROM table_45301 WHERE "Type" = 'p4-1 (24/36 ps)' |
Top 200 User from Iran. | CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Users.Id AS "user_link", Reputation FROM Users WHERE (LOWER(Location) LIKE '%iran%' OR UPPER(Location) LIKE 'IR') ORDER BY Reputation DESC LIMIT 200 |
Which character was nominated in the 2010 Indian Television Academy Awards? | CREATE TABLE table_77310 ("Year" real,"Award Ceremony" text,"Category" text,"Show" text,"Character" text,"Result" text) | SELECT "Character" FROM table_77310 WHERE "Year" = '2010' AND "Award Ceremony" = 'indian television academy awards' |
Number of questions where Accepted Answer < Top voted answer and Accepted Answer > 3. | CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDate time,CreationModera... | SELECT COUNT(p.Id) FROM Posts AS p, Posts AS a WHERE p.PostTypeId = 1 AND NOT p.AcceptedAnswerId IS NULL AND a.Id = p.AcceptedAnswerId AND (SELECT MAX(Score) FROM Posts AS q WHERE q.ParentId = p.Id) > a.Score AND a.Score > 3 |
Which Surface has Semifinalists of wally masur malivai washington? | CREATE TABLE table_50566 ("Tournament" text,"Surface" text,"Week" text,"Winner and score" text,"Finalist" text,"Semifinalists" text) | SELECT "Surface" FROM table_50566 WHERE "Semifinalists" = 'wally masur malivai washington' |
For those employees who was hired before 2002-06-21, for manager_id, hire_date, visualize the trend, and display X-axis in descending order. | CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME... | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY HIRE_DATE DESC |
What is the Stadium that hosts the team Jacksonville Jaguars? | CREATE TABLE table_name_1 (stadium VARCHAR,host_team VARCHAR) | SELECT stadium FROM table_name_1 WHERE host_team = "jacksonville jaguars" |
How many drivers did not participate in the races held in 2009? | CREATE TABLE pitstops (raceid number,driverid number,stop number,lap number,time text,duration text,milliseconds number)CREATE TABLE drivers (driverid number,driverref text,number number,code text,forename text,surname text,dob text,nationality text,url text)CREATE TABLE constructors (constructorid number,constructorre... | SELECT COUNT(DISTINCT driverid) FROM results WHERE NOT raceid IN (SELECT raceid FROM races WHERE year <> 2009) |
For those records from the products and each product's manufacturer, give me the comparison about the amount of headquarter over the headquarter , and group by attribute headquarter, I want to rank by the bars in ascending. | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT Headquarter, COUNT(Headquarter) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter |
Which home captian has aus by 295 runs as the result? | CREATE TABLE table_name_21 (home_captain VARCHAR,result VARCHAR) | SELECT home_captain FROM table_name_21 WHERE result = "aus by 295 runs" |
Name the points classification for levi leipheimer | CREATE TABLE table_29077342_19 (points_classification VARCHAR,general_classification VARCHAR) | SELECT points_classification FROM table_29077342_19 WHERE general_classification = "Levi Leipheimer" |
was patient 006-172277 excreting any output (ml)-urethral catheter temperature probe 18 fr. during this hospital encounter? | CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,dischargeweight number,hospitaladmittime time,hospitaladmitsource text,unitadmittime time,unitdischargetime tim... | SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-172277' AND patient.hospitaldischargetime IS NULL)) AND intakeoutp... |
How many calendar items do we have? | CREATE TABLE ref_calendar (calendar_date time,day_number number)CREATE TABLE employees (employee_id number,role_code text,employee_name text,gender_mfu text,date_of_birth time,other_details text)CREATE TABLE ref_locations (location_code text,location_name text,location_description text)CREATE TABLE ref_document_types (... | SELECT COUNT(*) FROM ref_calendar |
What home team has an n/a attendance? | CREATE TABLE table_7887 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Decision" text,"Attendance" text,"Record" text,"Points" real) | SELECT "Home" FROM table_7887 WHERE "Attendance" = 'n/a' |
what is since 12/2105 maximum tacrolimus-fk506 value of patient 008-40862? | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE diagnosis... | SELECT MAX(lab.labresult) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '008-40862')) AND lab.labname = 'tacrolimus-fk506' AND STRFTIME('%y-%m', lab.labres... |
what is the total when bronze is 0 and the nation is hungary? | CREATE TABLE table_46553 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT MAX("Total") FROM table_46553 WHERE "Bronze" = '0' AND "Nation" = 'hungary' |
WHich Tournament has a Finalist of gustavo kuerten (4)? | CREATE TABLE table_name_31 (tournament VARCHAR,finalist VARCHAR) | SELECT tournament FROM table_name_31 WHERE finalist = "gustavo kuerten (4)" |
What is the number that is the lowest overall for the College of Baylor? | CREATE TABLE table_name_44 (overall INTEGER,college VARCHAR) | SELECT MIN(overall) FROM table_name_44 WHERE college = "baylor" |
Which course had a jockey of Royston FFrench? | CREATE TABLE table_69268 ("Race" text,"Dist (f)" real,"Course" text,"Prize (\u00a3K)" real,"Runners" real,"Placing" real,"Margin" text,"Jockey" text,"Trainer" text) | SELECT "Course" FROM table_69268 WHERE "Jockey" = 'royston ffrench' |
What result has a Score of 1 0, and a Competition of 2014 fifa world cup qualification? | CREATE TABLE table_58450 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Result" FROM table_58450 WHERE "Score" = '1–0' AND "Competition" = '2014 fifa world cup qualification' |
Name the format for super callanetics | CREATE TABLE table_27303975_2 (format VARCHAR,title VARCHAR) | SELECT format FROM table_27303975_2 WHERE title = "Super Callanetics" |
Which Entrant has an Engine of climax straight-4, and Points larger than 0? | CREATE TABLE table_68033 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Points" real) | SELECT "Entrant" FROM table_68033 WHERE "Engine" = 'climax straight-4' AND "Points" > '0' |
Who was the home team at the game with a crowd larger than 32,576? | CREATE TABLE table_name_20 (home_team VARCHAR,crowd INTEGER) | SELECT home_team AS score FROM table_name_20 WHERE crowd > 32 OFFSET 576 |
Which Class has a Quantity larger than 96? | CREATE TABLE table_64341 ("Class" text,"Railway number(s)" text,"Quantity" real,"Year(s) of manufacture" text,"Type" text) | SELECT "Class" FROM table_64341 WHERE "Quantity" > '96' |
Name the game site with result of w 20-14 | CREATE TABLE table_15112 ("Week" text,"Date" text,"Opponent" text,"Result" text,"Game site" text,"Record" text,"Attendance" text) | SELECT "Game site" FROM table_15112 WHERE "Result" = 'w 20-14' |
explain meal codes SD/D | CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_time int,dual_carrier text,flight_days text,flight_id int,flig... | SELECT DISTINCT compartment, meal_code, meal_description, meal_number FROM food_service WHERE meal_code = 'SD/D' |
Top 500 Users in India. It will gives you Top 500 Users who belongs to India. | CREATE TABLE Users (Id number,Reputation number,CreationDate time,DisplayName text,LastAccessDate time,WebsiteUrl text,Location text,AboutMe text,Views number,UpVotes number,DownVotes number,ProfileImageUrl text,EmailHash text,AccountId number)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class numbe... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%india%' OR UPPER(Location) LIKE '%IND' ORDER BY Reputation DESC LIMIT 5000 |
What is the series number for the Golden Frog? | CREATE TABLE table_24510 ("Series #" real,"Title" text,"Story #" real,"Artist" text,"Strip numbers" text,"Number of strips" text,"Dates of original publication of strip" text) | SELECT "Series #" FROM table_24510 WHERE "Title" = 'The Golden Frog' |
What is the Total, when To Par is less than 14, when Finish is T12, and when Player is 'Julius Boros'? | CREATE TABLE table_name_13 (total VARCHAR,player VARCHAR,to_par VARCHAR,finish VARCHAR) | SELECT total FROM table_name_13 WHERE to_par < 14 AND finish = "t12" AND player = "julius boros" |
tell me the name of the patient with patient id 3284. | CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag text,admission_location text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT demographic.name FROM demographic WHERE demographic.subject_id = "3284" |
What is the name and date of the race that occurred most recently? | CREATE TABLE seasons (year number,url text)CREATE TABLE races (raceid number,year number,round number,circuitid number,name text,date text,time text,url text)CREATE TABLE constructorstandings (constructorstandingsid number,raceid number,constructorid number,points number,position number,positiontext text,wins number)CR... | SELECT name, date FROM races ORDER BY date DESC LIMIT 1 |
calculate one year survival probability of patients who were prescribed furosemide 40 mg tab after having been diagnosed with stroke - ischemic stroke? | CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,observationtime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,l... | SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t4.diagnosistime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.uniquepid, t2.diagnosistime FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid... |
What is the score at shay stadium? | CREATE TABLE table_58216 ("Date" text,"Competition" text,"Venue" text,"Result" text,"Score" text,"Goals" text) | SELECT "Score" FROM table_58216 WHERE "Venue" = 'shay stadium' |
What is MATSCIE 489 ? | CREATE TABLE student (student_id int,lastname varchar,firstname varchar,program_id int,declare_major varchar,total_credit int,total_gpa float,entered_as varchar,admit_term int,predicted_graduation_semester int,degree varchar,minor varchar,internship varchar)CREATE TABLE instructor (instructor_id int,name varchar,uniqna... | SELECT DISTINCT name FROM course WHERE department = 'MATSCIE' AND number = 489 |
Who is the player from the United States in T4 place with a score of 68-73-68=209? | CREATE TABLE table_48811 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text) | SELECT "Player" FROM table_48811 WHERE "Country" = 'united states' AND "Place" = 't4' AND "Score" = '68-73-68=209' |
On what date was Game 1? | CREATE TABLE table_5053 ("Game" text,"Date" text,"Home Team" text,"Result" text,"Road Team" text) | SELECT "Date" FROM table_5053 WHERE "Game" = 'game 1' |
What was the most recent year for Dean Van Lines? | CREATE TABLE table_70885 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Points" real) | SELECT MAX("Year") FROM table_70885 WHERE "Entrant" = 'dean van lines' |
How low was the income where services is 72.5? | CREATE TABLE table_18870 ("District" text,"2010 Population (000)" real,"2008 GDP (USD bn) a" text,"2008 GDP per capita (USD) a" real,"Agri culture b" text,"Mining b" text,"Manufac turing b" text,"Services & cons truction b" text,"Exports (USD mn) 2011" real,"Median mo. salary (USD) a e" real,"Vehicles (per 1000) d" rea... | SELECT "Income poverty f" FROM table_18870 WHERE "Services & cons truction b" = '72.5' |
What country is player Raymond Floyd from? | CREATE TABLE table_49933 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" text,"Finish" text) | SELECT "Country" FROM table_49933 WHERE "Player" = 'raymond floyd' |
In what district was Tim Holden the incumbent? | CREATE TABLE table_18162 ("District" text,"Incumbent" text,"Party" text,"First elected" text,"Results" text,"Candidates" text) | SELECT "District" FROM table_18162 WHERE "Incumbent" = 'Tim Holden' |
Name the family for uk31 | CREATE TABLE table_23411 ("No. overall" text,"No. in series" real,"Family/families" text,"Location(s)" text,"Original air date" text) | SELECT "Family/families" FROM table_23411 WHERE "No. overall" = 'UK31' |
What are the names of the mills which are not located in 'Donceel'? | CREATE TABLE mill (architect_id number,id number,location text,name text,type text,built_year number,notes text)CREATE TABLE bridge (architect_id number,id number,name text,location text,length_meters number,length_feet number)CREATE TABLE architect (id text,name text,nationality text,gender text) | SELECT name FROM mill WHERE location <> 'Donceel' |
What is the lowest Cuts made with less than 72.48 scoring average? | CREATE TABLE table_7480 ("Year" real,"Events played" real,"Cuts made" real,"Wins" real,"2nds" real,"Top 10s" real,"Best finish" text,"Earnings ($)" real,"Rank" text,"Scoring average" real,"Scoring rank" text) | SELECT MIN("Cuts made") FROM table_7480 WHERE "Scoring average" < '72.48' |
What is the call sign for country station fm 93.1? | CREATE TABLE table_66086 ("Frequency" text,"Call sign" text,"Branding" text,"Format" text,"Owner" text) | SELECT "Call sign" FROM table_66086 WHERE "Format" = 'country' AND "Frequency" = 'fm 93.1' |
how many games had no points scored ? | CREATE TABLE table_204_267 (id number,"tie no" number,"home team" text,"score" text,"away team" text,"date" text) | SELECT COUNT(*) FROM table_204_267 WHERE "score" + "score" = 0 |
Which 1st Party has an Election of 1893 by-election? | CREATE TABLE table_name_10 (election VARCHAR) | SELECT 1 AS st_party FROM table_name_10 WHERE election = "1893 by-election" |
What is the record when the high points is listed as Stephen Curry (32)? | CREATE TABLE table_29938 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Record" FROM table_29938 WHERE "High points" = 'Stephen Curry (32)' |
what's the salmonella with escherichia being sepb (escn) | CREATE TABLE table_16049 ("\u2193 Function / Genus \u2192" text,"Shigella" text,"Salmonella" text,"Yersinia" text,"Escherichia" text) | SELECT "Salmonella" FROM table_16049 WHERE "Escherichia" = 'SepB (EscN)' |
Name the official website which has dish of and callsign of kvtv | CREATE TABLE table_name_18 (official_website VARCHAR,dish VARCHAR,callsign VARCHAR) | SELECT official_website FROM table_name_18 WHERE dish = "•" AND callsign = "kvtv" |
On what date was the attendance a bye? | CREATE TABLE table_name_44 (date VARCHAR,attendance VARCHAR) | SELECT date FROM table_name_44 WHERE attendance = "bye" |
Which Lost has Drawn larger than 12, and Goals Against of 54? | CREATE TABLE table_47157 ("Position" real,"Team" text,"Played" real,"Drawn" real,"Lost" real,"Goals For" real,"Goals Against" real,"Goal Difference" text,"Points 1" real) | SELECT MAX("Lost") FROM table_47157 WHERE "Drawn" > '12' AND "Goals Against" = '54' |
Name the result for dolly parton | CREATE TABLE table_23047 ("Week #" text,"Theme" text,"Song choice" text,"Original artist" text,"Order #" text,"Result" text) | SELECT "Result" FROM table_23047 WHERE "Original artist" = 'Dolly Parton' |
What is the To par when fredrik andersson hed was runner-up? | CREATE TABLE table_42727 ("Date" text,"Tournament" text,"Winning score" text,"To par" text,"Margin of victory" text,"Runner(s)-up" text) | SELECT "To par" FROM table_42727 WHERE "Runner(s)-up" = 'fredrik andersson hed' |
Which Payment has a Type of 2d, and a Release date of january 2003? | CREATE TABLE table_name_31 (payment VARCHAR,type VARCHAR,release_date VARCHAR) | SELECT payment FROM table_name_31 WHERE type = "2d" AND release_date = "january 2003" |
what is the record when the opponent is jeff williams? | CREATE TABLE table_name_37 (record VARCHAR,opponent VARCHAR) | SELECT record FROM table_name_37 WHERE opponent = "jeff williams" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.