instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What is the SZDSZ percentage with an MSZP of 25% on 25/2/2009? | CREATE TABLE table_name_8 (szdsz VARCHAR,mszp VARCHAR,date VARCHAR) | SELECT szdsz FROM table_name_8 WHERE mszp = "25%" AND date = "25/2/2009" |
Which co-stars did Kalyanji-anandji direct in 1963? | CREATE TABLE table_2528382_2 (co_stars VARCHAR,music_director VARCHAR,year VARCHAR) | SELECT co_stars FROM table_2528382_2 WHERE music_director = "Kalyanji-Anandji" AND year = "1963" |
For PHRMACOL 611 , who usually teaches the class ? | CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE course_prerequisite (... | SELECT COUNT(instructor.name), instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'PHRMACOL' AND course.number = 611 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id ... |
Who left a position on 24 January? | CREATE TABLE table_21561 ("Team" text,"Outgoing manager" text,"Manner of departure" text,"Date of vacancy" text,"Replaced by" text,"Date of appointment" text) | SELECT "Outgoing manager" FROM table_21561 WHERE "Date of vacancy" = '24 January' |
Rank smaller than 5, and a Time of 31 03.093 is what rider? | CREATE TABLE table_name_8 (rider VARCHAR,rank VARCHAR,time VARCHAR) | SELECT rider FROM table_name_8 WHERE rank < 5 AND time = "31’ 03.093" |
indicate the monthly maximum amount of heartrate for patient 022-44805 until 12 days ago. | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage tex... | SELECT MAX(vitalperiodic.heartrate) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-44805')) AND NOT vitalperiodic.heartrate IS NULL... |
Which tournament had Richard Krajicek as a finalist? | CREATE TABLE table_name_85 (tournament VARCHAR,finalist VARCHAR) | SELECT tournament FROM table_name_85 WHERE finalist = "richard krajicek" |
what is average age of patients whose marital status is single and year of birth is greater than 2087? | 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 AVG(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.dob_year > "2087" |
What Player in Opposition of Kilkenny has a Total of 10? | CREATE TABLE table_69897 ("Rank" real,"Player" text,"County" text,"Tally" text,"Total" real,"Opposition" text) | SELECT "Player" FROM table_69897 WHERE "Total" = '10' AND "Opposition" = 'kilkenny' |
Name the Report of tourist trophy? | CREATE TABLE table_59454 ("Name" text,"Circuit" text,"Date" text,"Winning driver" text,"Winning constructor" text,"Report" text) | SELECT "Report" FROM table_59454 WHERE "Name" = 'tourist trophy' |
When included ram (mib) is the model what is the sonnet? | CREATE TABLE table_3002894_4 (sonnet VARCHAR,model VARCHAR) | SELECT sonnet FROM table_3002894_4 WHERE model = "Included RAM (MiB)" |
What was the position of the player who was picked in round 22? | CREATE TABLE table_46758 ("Round" real,"Pick" real,"Overall" real,"Name" text,"Position" text,"College" text) | SELECT "Position" FROM table_46758 WHERE "Round" = '22' |
Which Finish position has a 4th Day of bumped robinson? | CREATE TABLE table_13609 ("Year" real,"Finish position" text,"1st day" text,"2nd day" text,"3rd day" text,"4th Day" text) | SELECT "Finish position" FROM table_13609 WHERE "4th Day" = 'bumped robinson' |
What is Score, when Opponent is 'Daniel Gimeno-Traver'? | CREATE TABLE table_name_38 (score VARCHAR,opponent VARCHAR) | SELECT score FROM table_name_38 WHERE opponent = "daniel gimeno-traver" |
calculate the difference between the total input and the output today for patient 15794. | 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 patients (row_id numb... | SELECT (SELECT SUM(inputevents_cv.amount) 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 = 15794)) AND DATETIME(inputevents_cv.charttime, 'start of day') = DATETIME(CURRENT_... |
What 2007-08 season has marcianise as the city? | CREATE TABLE table_name_60 (city VARCHAR) | SELECT 2007 AS _08_season FROM table_name_60 WHERE city = "marcianise" |
To declare a major in MEMS , are there certain classes that I need to take ? | CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_cre... | SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%MEMS%' AND program_course.category LIKE 'PreMajor' AND program_course.course_id = course.course_id |
how much weight was patient 20166's last weight when they came to the hospital first time? | 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 patients (row_id numb... | SELECT 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 = 20166 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND chartevents.ite... |
List the campus that have between 600 and 1000 faculty lines in year 2004. | CREATE TABLE faculty (campus VARCHAR,faculty VARCHAR)CREATE TABLE campuses (id VARCHAR) | SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T1.year = 2004 |
how much does a drug cost, oxycodone-acetaminophen elixir? | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE chartevents (row_id number,subject_id number,... | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'prescriptions' AND cost.event_id IN (SELECT prescriptions.row_id FROM prescriptions WHERE prescriptions.drug = 'oxycodone-acetaminophen elixir') |
Upvotes per Question/Answer for postgresql tag. | CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId number,UserDisplayName text,Comment text,Text text,ContentLicense text)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE Votes (Id number,PostId n... | SELECT DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS StartOfMonth, COUNT(DISTINCT Posts.Id) AS Questions, COUNT(*) AS UpVotes, ROUND(COUNT(*) / CAST(COUNT(DISTINCT Posts.Id) AS DECIMAL), 2) AS UpVotesPerQuestion, ROUND(SUM(CASE WHEN Votes.PostId IS NULL THEN 1 ELSE 0 END) / CAST(COUNT(DISTINCT Posts.Id) AS DEC... |
blood pressure greater than 160 / 105 mmhg | CREATE TABLE table_train_202 ("id" int,"systolic_blood_pressure_sbp" int,"body_weight" float,"diabetic" string,"qtc" int,"diastolic_blood_pressure_dbp" int,"body_mass_index_bmi" float,"clinical_diagnosis" bool,"NOUSE" float) | SELECT * FROM table_train_202 WHERE systolic_blood_pressure_sbp >= 160 OR diastolic_blood_pressure_dbp >= 105 |
what is admission type and primary disease of subject id 12220? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)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 te... | SELECT demographic.admission_type, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "12220" |
Most viewed questions | Most votes. | CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId number,UserDisplayName text,Comment tex... | SELECT Questions.Id AS "post_link", Questions.Title, Questions.AnswerCount, Questions.ViewCount, Questions.FavoriteCount, Questions.Score, Questions.LastActivityDate FROM Posts AS Answers INNER JOIN Posts AS Questions ON Questions.Id = Answers.ParentId INNER JOIN Users AS Users ON Answers.OwnerUserId = Users.Id INNER J... |
what is the last team ? | CREATE TABLE table_204_129 (id number,"place" number,"team" text,"titles" number,"runners-up" number,"winning years" text) | SELECT "team" FROM table_204_129 ORDER BY id DESC LIMIT 1 |
What was the result of the game versus Tulsa? | CREATE TABLE table_name_80 (result VARCHAR,opponent VARCHAR) | SELECT result FROM table_name_80 WHERE opponent = "tulsa" |
for patients who have been diagnosed with fx lumbar vertebra-close this year what are the five most common procedures that followed within 2 months? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE d_items (row_id number,itemid number,label text... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.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, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissi... |
List the hardware model name for the phones that have screen mode type 'Text' or RAM size greater than 32. | CREATE TABLE phone (Hardware_Model_name VARCHAR,chip_model VARCHAR,screen_mode VARCHAR)CREATE TABLE screen_mode (Graphics_mode VARCHAR,Type VARCHAR)CREATE TABLE chip_model (Model_name VARCHAR,RAM_MiB VARCHAR) | SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T3.Type = "Text" OR T1.RAM_MiB > 32 |
What is the date with the catalogue number ptcd-1015-6? | CREATE TABLE table_name_59 (date VARCHAR,catalogue__number VARCHAR) | SELECT date FROM table_name_59 WHERE catalogue__number = "ptcd-1015-6" |
Which H/A/N has a score of 105* ? | CREATE TABLE table_61520 ("Score" text,"Pos." real,"Inn." real,"Venue" text,"H/A/N" text) | SELECT "H/A/N" FROM table_61520 WHERE "Score" = '105*♠' |
how many nations have a total of 1 medal won ? | CREATE TABLE table_204_311 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number) | SELECT COUNT("nation") FROM table_204_311 WHERE "total" = 1 |
when was the first hospital admission time of patient 016-22566 that had been admitted on the direct admit since 2 years ago? | CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE microlab (microlabi... | SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '016-22566' AND patient.hospitaladmitsource = 'direct admit' AND DATETIME(patient.hospitaladmittime) >= DATETIME(CURRENT_TIME(), '-2 year') ORDER BY patient.hospitaladmittime LIMIT 1 |
Which player had a position of QB for Texas Tech? | CREATE TABLE table_name_84 (player VARCHAR,pos VARCHAR,college VARCHAR) | SELECT player FROM table_name_84 WHERE pos = "qb" AND college = "texas tech" |
show me the top four most common diagnoses of patients with the age of 20s? | CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,langu... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN... |
which EMNLP 2010 papers have been cited the most ? | CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE paperdataset (paperid int,datasetid int)CREATE TABLE field (fieldid int)CREATE TABLE paper (paperid int,title varchar,venueid int,year int,numciting int,numcitedby int,journalid int)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE dataset (... | SELECT DISTINCT cite.citedpaperid, COUNT(cite.citedpaperid) FROM cite, paper, venue WHERE paper.paperid = cite.citedpaperid AND paper.year = 2010 AND venue.venueid = paper.venueid AND venue.venuename = 'EMNLP' GROUP BY cite.citedpaperid ORDER BY COUNT(cite.citedpaperid) DESC |
Which Pocona Municipality (%) is the lowest one that has a Puerto Villarroel Municipality (%) smaller than 14.6, and a Chimor Municipality (%) of 5.1, and an Entre R os Municipality (%) smaller than 0.9? | CREATE TABLE table_39524 ("Ethnic group" text,"Totora Municipality (%)" real,"Pojo Municipality (%)" real,"Pocona Municipality (%)" real,"Chimor\u00e9 Municipality (%)" real,"Puerto Villarroel Municipality (%)" real,"Entre R\u00edos Municipality (%)" real) | SELECT MIN("Pocona Municipality (%)") FROM table_39524 WHERE "Puerto Villarroel Municipality (%)" < '14.6' AND "Chimor\u00e9 Municipality (%)" = '5.1' AND "Entre R\u00edos Municipality (%)" < '0.9' |
What is the sum of gold medals for a rank of 14? | CREATE TABLE table_name_95 (gold INTEGER,rank VARCHAR) | SELECT SUM(gold) FROM table_name_95 WHERE rank = "14" |
what is the daily average amount of urinary catheter output: indwelling/continuous ure that patient 015-91239 had on the current icu visit? | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,... | SELECT AVG(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-91239') AND patient.unitdischargetime IS NUL... |
Average number of answers depending on the weekday when the question was posted. | CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId number,UserDisplayName text,Comment text,Text text,ContentLicense text)CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationI... | WITH tmp AS (SELECT AnswerCount AS ACount, Period = TIME_TO_STR(CreationDate, '%W') FROM Posts WHERE PostTypeId = 1) SELECT Period, AVG(CAST(ACount AS FLOAT)) FROM tmp GROUP BY Period ORDER BY Period |
What is the car specs for team Airwaves BMW's driver Rob Collard? | CREATE TABLE table_65929 ("Team" text,"Car Spec." text,"Drivers" text,"Class" text,"Rounds" text) | SELECT "Car Spec." FROM table_65929 WHERE "Team" = 'airwaves bmw' AND "Drivers" = 'rob collard' |
How many authors are there? | CREATE TABLE inst (instid number,name text,country text)CREATE TABLE papers (paperid number,title text)CREATE TABLE authorship (authid number,instid number,paperid number,authorder number)CREATE TABLE authors (authid number,lname text,fname text) | SELECT COUNT(*) FROM authors |
If the episode number is 2-01 what is the original UK air date? | CREATE TABLE table_2570269_2 (original_air_date__uk_ VARCHAR,episode__number VARCHAR) | SELECT original_air_date__uk_ FROM table_2570269_2 WHERE episode__number = "2-01" |
How many papers were written on the developing world this year ? | CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE paperkeyphrase (paperid int,keyphraseid int)CREATE TABLE paper (paperid int,title varchar,venueid ... | SELECT DISTINCT COUNT(paper.paperid) FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'developing world' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = year0 |
What was the score of the second leg with an agg of 4-6? | CREATE TABLE table_name_50 (agg VARCHAR) | SELECT 2 AS nd_leg FROM table_name_50 WHERE agg = "4-6" |
What was the highest number of bronze medals when there were a total of 4 medals, 1 silver medals, and less than 2 medals? | CREATE TABLE table_66494 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT MAX("Bronze") FROM table_66494 WHERE "Total" = '4' AND "Silver" = '1' AND "Gold" < '2' |
what country has dubai | CREATE TABLE table_name_89 (country VARCHAR,town VARCHAR) | SELECT country FROM table_name_89 WHERE town = "dubai" |
What is the latest year that has an n/a mintage and an Issue Price of $89.95? | CREATE TABLE table_name_39 (year INTEGER,mintage VARCHAR,issue_price VARCHAR) | SELECT MAX(year) FROM table_name_39 WHERE mintage = "n/a" AND issue_price = "$89.95" |
how much is the difference of weights of patient 017-101426 second measured on the last hospital visit compared to the first value measured on the last hospital visit? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE lab (labid number,patientunitstayid number,lab... | SELECT (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-101426' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1) AND NOT patient.admissionweight IS N... |
how many people had died after being diagnosed with defibrination syndrome during the same month? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)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 procedures_icd (row_id n... | SELECT COUNT(DISTINCT t2.subject_id) 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 = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_di... |
What did the home team score when the away team was South Melbourne? | CREATE TABLE table_name_31 (home_team VARCHAR,away_team VARCHAR) | SELECT home_team AS score FROM table_name_31 WHERE away_team = "south melbourne" |
count the number of patients who were prescribed pantoprazole sodium within the same month after receiving a cont inv mec ven 96+ hrs procedure. | CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE inputevents_cv (row_id number,subject_id number... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'cont inv me... |
How many bronzes for the nation with over 20 total, under 26 golds, and over 0 silvers? | CREATE TABLE table_6534 ("Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT COUNT("Bronze") FROM table_6534 WHERE "Silver" > '0' AND "Total" > '20' AND "Gold" < '26' |
What is the number of physicians in the region with an all nurses number of 91? | CREATE TABLE table_name_76 (_specialist_ VARCHAR,physician__gp_ INTEGER,all_nurses VARCHAR) | SELECT MIN(physician__gp_) & _specialist_ FROM table_name_76 WHERE all_nurses = 91 |
what is the number of patients having antiplatelet agent - aggregation inhibitors until 2101? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'antiplatelet agent - aggregation inhibitors' AND STRFTIME('%y', treatment.treatmenttime) <= '2101') |
What is the number of sequences for the name Alifoldz? | CREATE TABLE table_name_72 (number_of_sequences_number_of_sequences VARCHAR,name VARCHAR) | SELECT number_of_sequences_number_of_sequences AS :_ FROM table_name_72 WHERE name = "alifoldz" |
What is the average value for 2005, when the value for Average annual is 767? | CREATE TABLE table_name_32 (average_annual VARCHAR) | SELECT AVG(2005) FROM table_name_32 WHERE average_annual = 767 |
Which NPL net's bank was citibank? | CREATE TABLE table_39602 ("Bank" text,"Asset" real,"Loans" real,"NPL Net" text,"Deposits" real,"Net Interest Income" real,"Non-Interest Income" real,"Net Profit" real,"No. of Employees" text,"No. of Branches/Offices" real,"No. of ATMs" text) | SELECT "NPL Net" FROM table_39602 WHERE "Bank" = 'citibank' |
What is the timeslot rank when the rating is smaller than 2.6 and the share is more than 4? | CREATE TABLE table_name_97 (rank__timeslot_ INTEGER,rating VARCHAR,share VARCHAR) | SELECT AVG(rank__timeslot_) FROM table_name_97 WHERE rating < 2.6 AND share > 4 |
Which Poll Source has a Republican Jim Risch of 43%? | CREATE TABLE table_49264 ("Poll Source" text,"Dates administered" text,"Democrat: Larry LaRocco" text,"Republican: Jim Risch" text,"Lead Margin" real) | SELECT "Poll Source" FROM table_49264 WHERE "Republican: Jim Risch" = '43%' |
What is the monounsaturated fat with 15g of saturated fat? | CREATE TABLE table_63509 ("Total fat" text,"Saturated fat" text,"Monounsaturated fat" text,"Polyunsaturated fat" text,"Smoke point" text) | SELECT "Monounsaturated fat" FROM table_63509 WHERE "Saturated fat" = '15g' |
List of all distinct tags. | CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId number,UserDisplayName text,Comment text,Text text,ContentLicense text)CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE... | SELECT * FROM Posts WHERE Tags LIKE '%redis%' |
How many different services are provided by all stations? | CREATE TABLE station (services VARCHAR) | SELECT COUNT(DISTINCT services) FROM station |
What are the average rating and resolution of songs that are in Bangla? | CREATE TABLE artist (artist_name text,country text,gender text,preferred_genre text)CREATE TABLE files (f_id number,artist_name text,file_size text,duration text,formats text)CREATE TABLE genre (g_name text,rating text,most_popular_in text)CREATE TABLE song (song_name text,artist_name text,country text,f_id number,genr... | SELECT AVG(rating), AVG(resolution) FROM song WHERE languages = "bangla" |
Show names of technicians in ascending order of quality rank of the machine they are assigned. | CREATE TABLE machine (machine_id VARCHAR,quality_rank VARCHAR)CREATE TABLE technician (Name VARCHAR,technician_ID VARCHAR)CREATE TABLE repair_assignment (machine_id VARCHAR,technician_ID VARCHAR) | SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank |
What is the average rank Finland, which has 1 bronze, more than 1 silver, and less than 0 gold, has? | CREATE TABLE table_name_6 (rank INTEGER,gold VARCHAR,nation VARCHAR,bronze VARCHAR,silver VARCHAR) | SELECT AVG(rank) FROM table_name_6 WHERE bronze = 1 AND silver > 1 AND nation = "finland" AND gold < 0 |
provide the number of patients whose language is cape and admission location is trsf within this facility? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "CAPE" AND demographic.admission_location = "TRSF WITHIN THIS FACILITY" |
In what year did Aslan receive a Lifetime Achievement Award and Snow Patrol perform? | CREATE TABLE table_name_56 (year VARCHAR,band VARCHAR,lifetime_achievement_award VARCHAR) | SELECT year FROM table_name_56 WHERE band = "snow patrol" AND lifetime_achievement_award = "aslan" |
Whare the names, friends, and ages of all people who are older than the average age of a person? | CREATE TABLE person (name text,age number,city text,gender text,job text)CREATE TABLE personfriend (name text,friend text,year number) | SELECT DISTINCT T2.name, T2.friend, T1.age FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM person) |
what is minimum age of patients whose marital status is married and discharge location is disch-tran to psych hosp? | 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 procedures (subject_id text,hadm_id text,icd9_code text,sho... | SELECT MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.discharge_location = "DISCH-TRAN TO PSYCH HOSP" |
Tell me the date for rudolf caracciola for avusrennen | CREATE TABLE table_name_91 (date VARCHAR,winning_driver VARCHAR,name VARCHAR) | SELECT date FROM table_name_91 WHERE winning_driver = "rudolf caracciola" AND name = "avusrennen" |
Tell me the category for 2012 and drama league award | CREATE TABLE table_4395 ("Year" real,"Award" text,"Category" text,"Nominated Work" text,"Result" text) | SELECT "Category" FROM table_4395 WHERE "Year" = '2012' AND "Award" = 'drama league award' |
what was the size when tom daley appeared | CREATE TABLE table_30955 ("Episode" text,"First broadcast" text,"Andrew and Georgies guest" text,"Jamie and Johns guest" text,"Scores" text) | SELECT "Episode" FROM table_30955 WHERE "Jamie and Johns guest" = 'Tom Daley' |
What is the place of the player with a 71-69-66=206 score? | CREATE TABLE table_name_95 (place VARCHAR,score VARCHAR) | SELECT place FROM table_name_95 WHERE score = 71 - 69 - 66 = 206 |
count the number of patients who were diagnosed with sec hyperparathyrd-renal until 3 years ago and did not return to the hospital within 2 months. | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE patients (row_id number,subject_id... | SELECT (SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'sec hyperp... |
indicate the yearly maximum volume of chest tube output: mediastinal anterior that patient 028-39354 has had until 1335 days ago. | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemic... | SELECT MAX(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-39354')) AND intakeoutput.celllabel = 'chest... |
how much is the difference in anion gap of patient 027-85328 second measured on the current hospital visit compared to the first value measured on the current hospital visit? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE intakeoutput (intakeoutputid number,patientuni... | SELECT (SELECT 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 = '027-85328' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = 'anion... |
Highest Voted Comments on Questions. | CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayName text,LastEditDate time,LastActivityDate time,Title text,Ta... | SELECT c.Score, c.Text, c.Id AS "comment_link" FROM Comments AS c INNER JOIN Posts AS q ON q.Id = c.PostId WHERE q.PostTypeId = 1 GROUP BY c.Score, c.Text, c.Id ORDER BY c.Score DESC LIMIT 100 |
which is the maximun serie episode number when the millions of North American spectators is 3.14? | CREATE TABLE table_73413 ("Season no." real,"Series no." real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" real,"U.S. Viewers (millions)" text) | SELECT MAX("Series no.") FROM table_73413 WHERE "U.S. Viewers (millions)" = '3.14' |
does the sao2 of patient 004-49903 today have been normal? | CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labres... | SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-49903')) AND vitalperiodic.sao2 BETWEEN sao2_lower AND sao2_uppe... |
What is the enrollment at delaware valley college? | CREATE TABLE table_261906_2 (joined_mac INTEGER,institution VARCHAR) | SELECT MAX(joined_mac) FROM table_261906_2 WHERE institution = "Delaware Valley College" |
what date was game 29? | CREATE TABLE table_29862 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Date" FROM table_29862 WHERE "Game" = '29' |
Which Team has 19 Carries, and a Week larger than 13? | CREATE TABLE table_name_18 (team VARCHAR,carries VARCHAR,week VARCHAR) | SELECT team FROM table_name_18 WHERE carries = 19 AND week > 13 |
display the employee number, name( first name and last name ) and job title for all employees whose salary is more than any salary of those employees whose job title is PU_MAN. | CREATE TABLE job_history (employee_id number,start_date time,end_date time,job_id text,department_id number)CREATE TABLE departments (department_id number,department_name text,manager_id number,location_id number)CREATE TABLE countries (country_id text,country_name text,region_id number)CREATE TABLE employees (employee... | SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN') |
For the venue of suwon world cup stadium , suwon , south korea and a Score of 3 0 what is the result? | CREATE TABLE table_33137 ("Goal" real,"Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Result" FROM table_33137 WHERE "Venue" = 'suwon world cup stadium , suwon , south korea' AND "Score" = '3–0' |
tell me the number of married patients who have been diagnosed with hypertensive chronic kidney disease, unspecified, with chronic kidney disease stage i through stage iv, or unspecified. | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title 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 procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "MARRIED" AND diagnoses.short_title = "Hy kid NOS w cr kid I-IV" |
this year, what were the top three most frequent specimen tests given to patients within 2 months after being diagnosed with adv eff medicinal nos. | CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABL... | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_... |
What is the combined of 2 overalls and 5 slaloms? | CREATE TABLE table_68186 ("Season" real,"Overall" text,"Slalom" text,"Giant Slalom" text,"Super G" text,"Downhill" text,"Combined" text) | SELECT "Combined" FROM table_68186 WHERE "Overall" = '2' AND "Slalom" = '5' |
How many poles are there in the Formula Three Euroseries in the 2008 season with more than 0 F/Laps? | CREATE TABLE table_name_40 (poles INTEGER,f_laps VARCHAR,series VARCHAR,season VARCHAR) | SELECT SUM(poles) FROM table_name_40 WHERE series = "formula three euroseries" AND season = "2008" AND f_laps > 0 |
Name the competition of 2010 of dnp | CREATE TABLE table_name_6 (competition VARCHAR) | SELECT competition FROM table_name_6 WHERE 2010 = "dnp" |
List the name of tracks belongs to genre Rock or media type is MPEG audio file. | CREATE TABLE playlists (id number,name text)CREATE TABLE playlist_tracks (playlist_id number,track_id number)CREATE TABLE artists (id number,name text)CREATE TABLE invoices (id number,customer_id number,invoice_date time,billing_address text,billing_city text,billing_state text,billing_country text,billing_postal_code ... | SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" OR T3.name = "MPEG audio file" |
In what Round is John Parco a Center? | CREATE TABLE table_name_70 (round VARCHAR,position VARCHAR,player VARCHAR) | SELECT round FROM table_name_70 WHERE position = "center" AND player = "john parco" |
How many points did Corbari Italia earn in 1985? | CREATE TABLE table_15209 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Points" real) | SELECT "Points" FROM table_15209 WHERE "Entrant" = 'corbari italia' AND "Year" = '1985' |
Who is the home team when the san francisco 49ers are visiting with a result of 42-14? | CREATE TABLE table_name_92 (home_team VARCHAR,visiting_team VARCHAR,result VARCHAR) | SELECT home_team FROM table_name_92 WHERE visiting_team = "san francisco 49ers" AND result = "42-14" |
What is the Home with an Away that is toronto rebels? | CREATE TABLE table_6963 ("Date" text,"Time" text,"Home" text,"Away" text,"Score" text,"Ground" text) | SELECT "Home" FROM table_6963 WHERE "Away" = 'toronto rebels' |
How many seats does leader Raymond McCartney have? | CREATE TABLE table_name_2 (number_of_seats INTEGER,leader VARCHAR) | SELECT SUM(number_of_seats) FROM table_name_2 WHERE leader = "raymond mccartney" |
what flights are there from PITTSBURGH to SAN FRANCISCO on friday | CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)CREATE TABLE compartment_class (compartment v... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND date_day.day_number = 25 AND date_day.month_number = 6... |
How many episode titles does episode 19 in the season have? | CREATE TABLE table_28802668_3 (title VARCHAR,no_in_season VARCHAR) | SELECT COUNT(title) FROM table_28802668_3 WHERE no_in_season = 19 |
what was the total amount of the input patient 14621 had received on 06/22/2105? | CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status text,ethnicity text,a... | SELECT SUM(inputevents_cv.amount) 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 = 14621)) AND STRFTIME('%y-%m-%d', inputevents_cv.charttime) = '2105-06-22' |
what is the total number of players listed in the table ? | CREATE TABLE table_204_329 (id number,"no." number,"score" number,"player" text,"team" text,"balls" number,"inns." number,"opposing team" text,"date" text,"result" text) | SELECT COUNT("player") FROM table_204_329 |
Show the draft pick numbers and draft classes of players whose positions are defenders Show bar chart, and display from high to low by the x-axis. | CREATE TABLE match_season (Season real,Player text,Position text,Country int,Team int,Draft_Pick_Number int,Draft_Class text,College text)CREATE TABLE country (Country_id int,Country_name text,Capital text,Official_native_language text)CREATE TABLE player (Player_ID int,Player text,Years_Played text,Total_WL text,Singl... | SELECT Draft_Class, Draft_Pick_Number FROM match_season WHERE Position = "Defender" ORDER BY Draft_Class DESC |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.