instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What is the class of team liqui moly equipe, which has less than 71 laps? | CREATE TABLE table_48102 ("Class" text,"Team" text,"Driver" text,"Chassis \u2013 Engine" text,"Laps" real) | SELECT "Class" FROM table_48102 WHERE "Laps" < '71' AND "Team" = 'liqui moly equipe' |
If the playoff berth is 17, what is the AFC championship number? | CREATE TABLE table_23060 ("Team" text,"Division Titles" real,"Playoff Berths" real,"AFL Titles" real,"AFC Championships" real,"Super Bowl Championships" real) | SELECT "AFC Championships" FROM table_23060 WHERE "Playoff Berths" = '17' |
What was the range of finishing position for 15 awarded platinum points? | CREATE TABLE table_11254821_2 (finishing_position VARCHAR,points_awarded__platinum_ VARCHAR) | SELECT finishing_position FROM table_11254821_2 WHERE points_awarded__platinum_ = 15 |
What is the attendance number for December 2, 1979? | CREATE TABLE table_70615 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT SUM("Attendance") FROM table_70615 WHERE "Date" = 'december 2, 1979' |
How many seconds is a shuttle run that give 2 points? | CREATE TABLE table_name_54 (shuttle_run__sec_ VARCHAR,points VARCHAR) | SELECT shuttle_run__sec_ FROM table_name_54 WHERE points = 2 |
Questions Using Popular Tags In January 2019. Questions Using Popular Tags In January 2019
Tags with rate of use over 4 times on this site. | 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 CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE FlagTypes (Id number,Name text,Description text)C... | SELECT Id AS "post_link", Id, CreationDate, AnswerCount, CommentCount, rate.TagId FROM Posts, PostTags, (SELECT COUNT(PostId) AS Rate, TagId FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AND Posts.CreationDate < '2019-03-01' AND Posts.CreationDate > '2019-01-01' GROUP BY TagId, TagName... |
In what place is the player with a score of 72-66-75=213? | CREATE TABLE table_name_13 (place VARCHAR,score VARCHAR) | SELECT place FROM table_name_13 WHERE score = 72 - 66 - 75 = 213 |
What is the location attendance of the game with a 27-22 record? | CREATE TABLE table_38827 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Location Attendance" FROM table_38827 WHERE "Record" = '27-22' |
how many patients are admitted under urgency and followed the procedure colonoscopy? | 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 text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.short_title = "Colonoscopy" |
What is the amount of assists for richmond kickers and points larger than 24 | CREATE TABLE table_name_32 (assists INTEGER,club VARCHAR,points VARCHAR) | SELECT SUM(assists) FROM table_name_32 WHERE club = "richmond kickers" AND points > 24 |
what was the four most often given procedures for patients 40s? | 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 patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 4 |
Who was the Republican when the green was Harold Burbank? | CREATE TABLE table_name_27 (republican VARCHAR,green VARCHAR) | SELECT republican FROM table_name_27 WHERE green = "harold burbank" |
How big (in km2) is Persarmenia? | CREATE TABLE table_26375 ("Province (ashkharh)" text,"Armenian name" text,"Area (km\u00b2)" real,"Number of cantons (gavars)" real,"Center" text) | SELECT "Area (km\u00b2)" FROM table_26375 WHERE "Province (ashkharh)" = 'Persarmenia' |
What is the score March 27? | CREATE TABLE table_name_55 (score VARCHAR,date VARCHAR) | SELECT score FROM table_name_55 WHERE date = "march 27" |
Top 10 Meta users from Nigeria. | 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 PostTypes (Id number,Name text)CREATE TABLE Tags (Id number,Tag... | SELECT * FROM Users WHERE Location LIKE '%Nigeria' ORDER BY Reputation DESC LIMIT 10 |
How many pints does the Cambrian Welfare RFC have? | CREATE TABLE table_name_50 (points_for VARCHAR,club VARCHAR) | SELECT points_for FROM table_name_50 WHERE club = "cambrian welfare rfc" |
What kind of Sanskrit has a Kannada of uttara ? | CREATE TABLE table_35105 ("Sanskrit \u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d" text,"Tamil \u0ba4\u0bae\u0bbf\u0bb4\u0bcd" text,"Telugu \u0c24\u0c46\u0c32\u0c41\u0c17\u0c41" text,"Kannada \u0c95\u0ca8\u0ccd\u0ca8\u0ca1" text,"Malayalam \u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02" text,"Mongolian" text) | SELECT "Sanskrit \u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d" FROM table_35105 WHERE "Kannada \u0c95\u0ca8\u0ccd\u0ca8\u0ca1" = 'uttara ಉತ್ತರಾ' |
How is the marriage of who became queen on 30 October 1816 husband's accession? | CREATE TABLE table_6115 ("Name" text,"Birth" text,"Marriage" text,"Became Queen" text,"Ceased to be Queen" text,"Death" text,"Spouse" text) | SELECT "Marriage" FROM table_6115 WHERE "Became Queen" = '30 october 1816 husband''s accession' |
How many customers live in Prague city? | CREATE TABLE media_types (id number,name text)CREATE TABLE employees (id number,last_name text,first_name text,title text,reports_to number,birth_date time,hire_date time,address text,city text,state text,country text,postal_code text,phone text,fax text,email text)CREATE TABLE invoices (id number,customer_id number,in... | SELECT COUNT(*) FROM customers WHERE city = "Prague" |
What was the rating/share for 18-49 for the episode that had 5.90 million viewers? | CREATE TABLE table_23730973_5 (rating VARCHAR,viewers__millions_ VARCHAR) | SELECT rating / SHARE(18 - 49) FROM table_23730973_5 WHERE viewers__millions_ = "5.90" |
Return a bar chart on what are the different ship flags, and how many ships have each?, list by the Y-axis in descending. | CREATE TABLE captain (Captain_ID int,Name text,Ship_ID int,age text,Class text,Rank text)CREATE TABLE Ship (Ship_ID int,Name text,Type text,Built_Year real,Class text,Flag text) | SELECT Flag, COUNT(*) FROM Ship GROUP BY Flag ORDER BY COUNT(*) DESC |
provide the admission time and marital status of subject id 6983. | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)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,ethni... | SELECT demographic.marital_status, demographic.admittime FROM demographic WHERE demographic.subject_id = "6983" |
Which format has january 21, 2002 as the date? | CREATE TABLE table_44036 ("Region" text,"Date" text,"Label" text,"Format" text,"Catalog" text) | SELECT "Format" FROM table_44036 WHERE "Date" = 'january 21, 2002' |
What is the link of rnaz that predicts an alignment of input? | CREATE TABLE table_34127 ("Name" text,"Number of sequences Number of sequences: ." text,"Alignment Alignment: predicts an alignment,." text,"Structure Structure: predicts structure,." text,"Link" text) | SELECT "Link" FROM table_34127 WHERE "Alignment Alignment: predicts an alignment , ." = 'input' AND "Name" = 'rnaz' |
What kind of Week 4 has a Week 9 of all housemates? | CREATE TABLE table_59962 ("Week 1" text,"Week 2" text,"Week 3" text,"Week 4" text,"Week 5" text,"Week 6" text,"Week 7" text,"Week 8" text,"Week 9" text,"Week 10 FINAL" text) | SELECT "Week 4" FROM table_59962 WHERE "Week 9" = 'all housemates' |
What was the transfer fee for the player moving in the winter window and ending in a year after 2010? | CREATE TABLE table_7726 ("Nat." text,"Name" text,"Moving from" text,"Type" text,"Transfer window" text,"Ends" real,"Transfer fee" text) | SELECT "Transfer fee" FROM table_7726 WHERE "Ends" > '2010' AND "Transfer window" = 'winter' |
Role of narrator, and a Radio Station/Production Company of bbc audiobooks, and a Release/Air Date of 13 november 2008 is what sum of the year? | CREATE TABLE table_67776 ("Year" real,"Role" text,"Author" text,"Radio Station/Production Company" text,"Release/Air Date" text) | SELECT SUM("Year") FROM table_67776 WHERE "Role" = 'narrator' AND "Radio Station/Production Company" = 'bbc audiobooks' AND "Release/Air Date" = '13 november 2008' |
Show team id vs acc_percent as scatter plot use a different color for each All_Games | CREATE TABLE basketball_match (Team_ID int,School_ID int,Team_Name text,ACC_Regular_Season text,ACC_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Percent int,All_Home text,All_Road text,All_Neutral text)CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,En... | SELECT Team_ID, ACC_Percent FROM basketball_match GROUP BY All_Games |
what is the number of delegates younger than 20 ? | CREATE TABLE table_204_20 (id number,"represent" text,"contestant" text,"age" number,"height" text,"hometown" text) | SELECT COUNT("contestant") FROM table_204_20 WHERE "age" < 20 |
Which Team has a Qualification of entry to the 2004 chinese super league, and a 2002 Position smaller than 6, and a 2003 Position smaller than 9, and a Total Position larger than 3.5? | CREATE TABLE table_65384 ("Team" text,"2002 Position" real,"2003 Position" real,"Total Position" real,"Qualification" text) | SELECT "Team" FROM table_65384 WHERE "Qualification" = 'entry to the 2004 chinese super league' AND "2002 Position" < '6' AND "2003 Position" < '9' AND "Total Position" > '3.5' |
current plasma creatinine >= 0.5 mg / dl | CREATE TABLE table_train_111 ("id" int,"mini_mental_state_examination_mmse" int,"liver_disease" bool,"geriatric_depression_scale_gds" int,"rosen_modified_hachinski_ischemic_score" int,"plasma_creatinine" float,"NOUSE" float) | SELECT * FROM table_train_111 WHERE plasma_creatinine >= 0.5 |
count the number of patients whose diagnoses short title is acute uri nos and lab test fluid is ascites? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Acute uri NOS" AND lab.fluid = "Ascites" |
Which Winner has a Runner-up of larne, and a Season of 2003 04? | CREATE TABLE table_name_13 (winner VARCHAR,runner_up VARCHAR,season VARCHAR) | SELECT winner FROM table_name_13 WHERE runner_up = "larne" AND season = "2003–04" |
What year was USF founded? | CREATE TABLE table_262 ("University Name" text,"Acronym" text,"Date founded" real,"Website" text,"Official registration notes" text) | SELECT "Date founded" FROM table_262 WHERE "Acronym" = 'USF' |
which country/countries has the same number of total metals as thailand ? | CREATE TABLE table_204_183 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number) | SELECT "nation" FROM table_204_183 WHERE "nation" <> 'thailand' AND "total" = (SELECT "total" FROM table_204_183 WHERE "nation" = 'thailand') |
Visualize a scatter chart about the correlation between Credits and DNO . | CREATE TABLE Minor_in (StuID INTEGER,DNO INTEGER)CREATE TABLE Enrolled_in (StuID INTEGER,CID VARCHAR(7),Grade VARCHAR(2))CREATE TABLE Course (CID VARCHAR(7),CName VARCHAR(40),Credits INTEGER,Instructor INTEGER,Days VARCHAR(5),Hours VARCHAR(11),DNO INTEGER)CREATE TABLE Faculty (FacID INTEGER,Lname VARCHAR(15),Fname VARC... | SELECT Credits, DNO FROM Course ORDER BY Credits |
During the week does 588 usually have 2 or 3 lectures ? | CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE ta (campus_job_id int,studen... | SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday, semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND c... |
Top 1000 reputation whores in C++ tag. | CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDate time,CreationModeratorId number,ApprovalDate time,ApprovalModeratorId number,DeactivationDat... | SELECT Users.Id AS Id, Users.DisplayName AS "user_link", SUM(Answers.Score) * 10 AS Reputation 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 JOIN PostTags ON PostTags.PostId = Answers.ParentId INNER JOIN Tags ON T... |
what was the name of the mission previous to cosmos 300 ? | CREATE TABLE table_204_633 (id number,"launch date" text,"operator" text,"name" text,"sample origin" text,"samples returned" text,"recovery date" text,"mission result" text) | SELECT "name" FROM table_204_633 WHERE id = (SELECT id FROM table_204_633 WHERE "name" = 'cosmos 300') - 1 |
How many grids had a Time/Retired of +4 laps? | CREATE TABLE table_43494 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real) | SELECT COUNT("Grid") FROM table_43494 WHERE "Time/Retired" = '+4 laps' |
how many featured guests are there in total ? | CREATE TABLE table_204_184 (id number,"#" number,"title" text,"producer(s)" text,"featured guest(s)" text,"length" text) | SELECT COUNT("featured guest(s)") FROM table_204_184 |
In what place did the golfer representing Zimbabwe finish? | CREATE TABLE table_name_60 (place VARCHAR,country VARCHAR) | SELECT place FROM table_name_60 WHERE country = "zimbabwe" |
How many total songs has the order #1 | CREATE TABLE table_21501518_1 (song_choice VARCHAR,order__number VARCHAR) | SELECT COUNT(song_choice) FROM table_21501518_1 WHERE order__number = "1" |
In what season was the overall record 29-7? | CREATE TABLE table_19441 ("Season" text,"Coach" text,"Overall" text,"Conference" text,"Standing" text,"Postseason" text) | SELECT "Season" FROM table_19441 WHERE "Overall" = '29-7' |
What is the English title for Ansikte Mot Ansikte? | CREATE TABLE table_68616 ("Year" text,"English title" text,"Original title" text,"Country" text,"Director" text) | SELECT "English title" FROM table_68616 WHERE "Original title" = 'ansikte mot ansikte' |
Which gc37-01 v10 engine has the fewest points? | CREATE TABLE table_15328 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Tyres" text,"Points" real) | SELECT MIN("Points") FROM table_15328 WHERE "Engine" = 'gc37-01 v10' |
how many patients whose admission location is phys referral/normal deli and discharge location is home? | CREATE TABLE procedures (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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND demographic.discharge_location = "HOME" |
How many players played each position Plot them as bar chart, and rank in asc by the y-axis. | CREATE TABLE team (Team_id int,Name text)CREATE TABLE player (Player_ID int,Player text,Years_Played text,Total_WL text,Singles_WL text,Doubles_WL text,Team int)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 ... | SELECT Position, COUNT(*) FROM match_season GROUP BY Position ORDER BY COUNT(*) |
Which venue has 16 against? | CREATE TABLE table_name_5 (venue VARCHAR,against VARCHAR) | SELECT venue FROM table_name_5 WHERE against = 16 |
What is the pick # when the new jersey devils is the nhl team? | CREATE TABLE table_30854 ("Pick #" real,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text) | SELECT "Pick #" FROM table_30854 WHERE "NHL team" = 'New Jersey Devils' |
what is the mchc difference/difference of patient 032-17571 second measured on the last hospital visit compared to the first value measured on the last hospital visit? | 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 (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 = '032-17571' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi... |
provide the number of patients whose diagnoses long title is antineoplastic and immunosuppressive drugs causing adverse effects in therapeutic use and drug type is main? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid 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 diagnoses (subject_id text,hadm_id tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Antineoplastic and immunosuppressive drugs causing adverse effects in therapeutic use" AND ... |
What is Score, when Attendance is 2,444? | CREATE TABLE table_name_33 (score VARCHAR,attendance VARCHAR) | SELECT score FROM table_name_33 WHERE attendance = "2,444" |
Between which years were there 241 fokker 70 model cabins built? | CREATE TABLE table_name_43 (period VARCHAR,built VARCHAR,model VARCHAR) | SELECT period FROM table_name_43 WHERE built < 241 AND model = "fokker 70" |
Name the republican steve sauerberg for august 12, 2008 | CREATE TABLE table_21037 ("Poll Source" text,"Dates administered" text,"Democrat: Dick Durbin" text,"Republican: Steve Sauerberg" text,"Lead Margin" real) | SELECT "Republican: Steve Sauerberg" FROM table_21037 WHERE "Dates administered" = 'August 12, 2008' |
how long did bernard pilon serve in the canadian army ? | CREATE TABLE table_204_608 (id number,"name" text,"elected party" text,"constituency" text,"elected date" text,"military service" text) | SELECT "military service" - "military service" FROM table_204_608 WHERE "name" = 'bernard pilon' |
What is the Money of the T4 Place Player with a Score of 71-66-74-67=278? | CREATE TABLE table_name_64 (money___ INTEGER,place VARCHAR,score VARCHAR) | SELECT AVG(money___) AS $__ FROM table_name_64 WHERE place = "t4" AND score = 71 - 66 - 74 - 67 = 278 |
How many female patients have a prescription for aspirin ec? | CREATE TABLE procedures (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 diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "F" AND prescriptions.drug = "Aspirin EC" |
what is the number of hours elapsed since the last time patient 033-22108 had a d5w intake on the current intensive care unit visit? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE allergy (allergyid number,patientunitst... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', intakeoutput.intakeoutputtime)) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ... |
What was the date of the game when Atlanta was the home team? | CREATE TABLE table_51441 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Decision" text,"Attendance" real,"Record" text) | SELECT "Date" FROM table_51441 WHERE "Home" = 'atlanta' |
Who is the Trainer with the Year of 2013? | CREATE TABLE table_name_33 (trainer VARCHAR,year VARCHAR) | SELECT trainer FROM table_name_33 WHERE year = "2013" |
what is the dose of sodium bicarbonate that is first prescribed to patient 10811 since 05/2103? | 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 (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE outputevents (row_id... | SELECT prescriptions.dose_val_rx FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10811) AND prescriptions.drug = 'sodium bicarbonate' AND STRFTIME('%y-%m', prescriptions.startdate) >= '2103-05' ORDER BY prescriptions.startdate LIMIT 1 |
In what Round was Pick 138? | CREATE TABLE table_39413 ("Round" real,"Pick" real,"Player" text,"Nationality" text,"College" text) | SELECT SUM("Round") FROM table_39413 WHERE "Pick" = '138' |
What years did the player with a t71 finish win? | CREATE TABLE table_60790 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" text,"Finish" text) | SELECT "Year(s) won" FROM table_60790 WHERE "Finish" = 't71' |
What is the defective year for the regular year of 29 days and month sequence of 2? | CREATE TABLE table_30897 ("Month Sequence" real,"Numbered Month" text,"Month Name" text,"Regular Year" text,"Defective Year" real,"Excessive Year" real) | SELECT MAX("Defective Year") FROM table_30897 WHERE "Regular Year" = '29 days' AND "Month Sequence" = '2' |
What is the name of the technician whose team is not 'NYY', and count them by a bar chart | CREATE TABLE repair (repair_ID int,name text,Launch_Date text,Notes text)CREATE TABLE machine (Machine_ID int,Making_Year int,Class text,Team text,Machine_series text,value_points real,quality_rank int)CREATE TABLE technician (technician_id real,Name text,Team text,Starting_Year real,Age int)CREATE TABLE repair_assignm... | SELECT Name, COUNT(Name) FROM technician WHERE Team <> "NYY" GROUP BY Name |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, find hire_date and the sum of employee_id bin hire_date by weekday, and visualize them by a bar chart, and sort in desc by the y-axis. | CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2),COMMISSION_PCT decima... | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(EMPLOYEE_ID) DESC |
Who was the finalist when the MVP was Romain Sato? | CREATE TABLE table_2095 ("Season" text,"Final Venue" text,"Champion" text,"Result" text,"Finalist" text,"MVP" text) | SELECT "Finalist" FROM table_2095 WHERE "MVP" = 'Romain Sato' |
Which clubs have one or more members whose advisor is '1121'? | CREATE TABLE student (stuid number,lname text,fname text,age number,sex text,major number,advisor number,city_code text)CREATE TABLE member_of_club (stuid number,clubid number,position text)CREATE TABLE club (clubid number,clubname text,clubdesc text,clublocation text) | SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121 |
what is the drug that patient 19352 was prescribed for within 2 days after the diagnosis of hx traumatic fracture until 22 months ago? | CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)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 d_icd_diagnoses (r... | SELECT t2.drug FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 19352 AND diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'hx tra... |
Visualize the general trend of sum share count over the date of transaction, sort in descending by the X-axis. | CREATE TABLE Investors (investor_id INTEGER,Investor_details VARCHAR(255))CREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR(10),transaction_type_description VARCHAR(80))CREATE TABLE Sales (sales_transaction_id INTEGER,sales_details VARCHAR(255))CREATE TABLE Transactions_Lots (transaction_id INTEGER,lot_... | SELECT date_of_transaction, SUM(share_count) FROM Transactions ORDER BY date_of_transaction DESC |
What is the Late Middle English equivalent of the Anglian g, g? | CREATE TABLE table_28177800_5 (late_middle_english VARCHAR,late_old_english__anglian_ VARCHAR) | SELECT late_middle_english FROM table_28177800_5 WHERE late_old_english__anglian_ = "æg, ǣg" |
What was the episode number for 'Going Bodmin'? | CREATE TABLE table_24058 ("Episode No." real,"Title" text,"Directed by" text,"Written by" text,"Viewers (millions)" text,"Original airdate" text) | SELECT MAX("Episode No.") FROM table_24058 WHERE "Title" = 'Going Bodmin' |
How many touchdowns were scored by William Cole? | CREATE TABLE table_39585 ("Player" text,"Touchdowns" real,"Extra points" real,"Field goals" real,"Points" real) | SELECT "Touchdowns" FROM table_39585 WHERE "Player" = 'william cole' |
Give me the comparison about All_Games_Percent over the ACC_Regular_Season , and sort in descending by the bars. | CREATE TABLE basketball_match (Team_ID int,School_ID int,Team_Name text,ACC_Regular_Season text,ACC_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Percent int,All_Home text,All_Road text,All_Neutral text)CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,En... | SELECT ACC_Regular_Season, All_Games_Percent FROM basketball_match ORDER BY ACC_Regular_Season DESC |
What rounds did RML Racing Silverline and James Nash compete? | CREATE TABLE table_65927 ("Team" text,"Car Spec." text,"Drivers" text,"Class" text,"Rounds" text) | SELECT "Rounds" FROM table_65927 WHERE "Team" = 'rml racing silverline' AND "Drivers" = 'james nash' |
Name the score for pacers visitor on 14 april 2008 | CREATE TABLE table_11226 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Leading scorer" text,"Attendance" real,"Record" text) | SELECT "Score" FROM table_11226 WHERE "Visitor" = 'pacers' AND "Date" = '14 april 2008' |
Show birthdates of the professors in charge of ACCT-211 and bin the date by year interval in a line chart, display X-axis in asc order. | CREATE TABLE PROFESSOR (EMP_NUM int,DEPT_CODE varchar(10),PROF_OFFICE varchar(50),PROF_EXTENSION varchar(4),PROF_HIGH_DEGREE varchar(5))CREATE TABLE COURSE (CRS_CODE varchar(10),DEPT_CODE varchar(10),CRS_DESCRIPTION varchar(35),CRS_CREDIT float(8))CREATE TABLE ENROLL (CLASS_CODE varchar(5),STU_NUM int,ENROLL_GRADE varc... | SELECT EMP_DOB, COUNT(EMP_DOB) FROM EMPLOYEE AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = "ACCT-211" ORDER BY EMP_DOB |
Which City has a Result of w, and a Competition of international friendly (unofficial match), and a Score of 1-0? | CREATE TABLE table_37478 ("Date" text,"City" text,"Result" text,"Score" text,"Competition" text) | SELECT "City" FROM table_37478 WHERE "Result" = 'w' AND "Competition" = 'international friendly (unofficial match)' AND "Score" = '1-0' |
What is the 1995 value with of the 1993 ATP Masters Series? | CREATE TABLE table_34222 ("Tournament" text,"1990" text,"1991" text,"1992" text,"1993" text,"1994" text,"1995" text,"1996" text,"1997" text,"1998" text,"Career SR" text,"Career Win-Loss" text) | SELECT "1995" FROM table_34222 WHERE "1993" = 'atp masters series' |
What was the Pick Number when the position was wide receiver, the college was Southern Miss with an overall less than 186? | CREATE TABLE table_6626 ("Round" real,"Pick #" real,"Overall" real,"Name" text,"Position" text,"College" text) | SELECT AVG("Pick #") FROM table_6626 WHERE "Position" = 'wide receiver' AND "College" = 'southern miss' AND "Overall" < '186' |
When was the first beatification in Korea that was canonised before 1984? | CREATE TABLE table_32112 ("Name" text,"Martyred" real,"Place" text,"Beatified" real,"Canonised" real) | SELECT MIN("Beatified") FROM table_32112 WHERE "Place" = 'korea' AND "Canonised" < '1984' |
What horse does todd pletcher ride with odds of 14.20-1? | CREATE TABLE table_55341 ("Finish Position" text,"Lengths Behind" text,"Post Position" real,"Horse name" text,"Trainer" text,"Jockey" text,"Owner" text,"Post Time Odds" text) | SELECT "Horse name" FROM table_55341 WHERE "Jockey" = 'todd pletcher' AND "Post Time Odds" = '14.20-1' |
how many episodes in the serie were title 'the key | CREATE TABLE table_74425 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"U.S. viewers (million)" text) | SELECT COUNT("No. in series") FROM table_74425 WHERE "Title" = 'The Key' |
get the number of patients with diagnoses icd9 code 99662 who had ascitic fluid lab test done. | 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 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 ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "99662" AND lab.fluid = "Ascites" |
What school is in Ligonier? | CREATE TABLE table_name_11 (school VARCHAR,location VARCHAR) | SELECT school FROM table_name_11 WHERE location = "ligonier" |
For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of phone_number and manager_id , and rank total number in descending order please. | CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),E... | SELECT PHONE_NUMBER, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY MANAGER_ID DESC |
How many schools did Derrick Green attend? | CREATE TABLE table_17075 ("Player" text,"Position" text,"School" text,"Hometown" text,"College" text) | SELECT COUNT("School") FROM table_17075 WHERE "Player" = 'Derrick Green' |
what is admission type and procedure long title of subject id 2560? | 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 demographic.admission_type, procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560" |
What rank is Germany? | CREATE TABLE table_name_74 (rank VARCHAR,country VARCHAR) | SELECT rank FROM table_name_74 WHERE country = "germany" |
When the Away team is south melbourne, what's the Home team score? | CREATE TABLE table_77872 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Home team score" FROM table_77872 WHERE "Away team" = 'south melbourne' |
Where did the cable-stayed Badong Bridge open in 2005? | CREATE TABLE table_name_18 (location VARCHAR,name VARCHAR,type VARCHAR,opened VARCHAR) | SELECT location FROM table_name_18 WHERE type = "cable-stayed" AND opened = 2005 AND name = "badong bridge" |
Draw a bar chart of dept code versus the total number, order y axis in descending order. | CREATE TABLE COURSE (CRS_CODE varchar(10),DEPT_CODE varchar(10),CRS_DESCRIPTION varchar(35),CRS_CREDIT float(8))CREATE TABLE ENROLL (CLASS_CODE varchar(5),STU_NUM int,ENROLL_GRADE varchar(50))CREATE TABLE DEPARTMENT (DEPT_CODE varchar(10),DEPT_NAME varchar(30),SCHOOL_CODE varchar(8),EMP_NUM int,DEPT_ADDRESS varchar(20)... | SELECT DEPT_CODE, COUNT(*) FROM STUDENT GROUP BY DEPT_CODE ORDER BY COUNT(*) DESC |
What is the second leg for Team 1 Servette? | CREATE TABLE table_60354 ("Team 1" text,"Agg." text,"Team 2" text,"1st leg" text,"2nd leg" text) | SELECT "2nd leg" FROM table_60354 WHERE "Team 1" = 'servette' |
how many days has passed since patient 005-4471 received his first diagnosis of post spinal surgery - cervical on their current 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 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnosis.diagnosistime)) FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-4471' ... |
Whcih was the Class AAA in school year 2006-07? | CREATE TABLE table_name_85 (class_aAA VARCHAR,school_year VARCHAR) | SELECT class_aAA FROM table_name_85 WHERE school_year = "2006-07" |
What Russian has an Avoirdupois value of 0.686 gr? | CREATE TABLE table_name_16 (russian VARCHAR,avoirdupois_value VARCHAR) | SELECT russian FROM table_name_16 WHERE avoirdupois_value = "0.686 gr" |
List the positions of players whose average number of points scored by that position is larger than 20, compare the number of positions, and order total number in descending order. | CREATE TABLE club (Club_ID int,name text,Region text,Start_year text)CREATE TABLE competition_result (Competition_ID int,Club_ID_1 int,Club_ID_2 int,Score text)CREATE TABLE player (Player_ID int,name text,Position text,Club_ID int,Apps real,Tries real,Goals text,Points real)CREATE TABLE competition (Competition_ID int,... | SELECT Position, COUNT(Position) FROM player GROUP BY Position HAVING AVG(Points) >= 20 ORDER BY COUNT(Position) DESC |
What player has The United States as the country, with t2 as the place? | CREATE TABLE table_name_9 (player VARCHAR,country VARCHAR,place VARCHAR) | SELECT player FROM table_name_9 WHERE country = "united states" AND place = "t2" |
What is Apogee, when Inclination is 65 , and when Launch Date/Time is ( GMT ) is 15 February 1973, 01:11? | CREATE TABLE table_12858 ("Designation" text,"Launch date/time (GMT)" text,"Mass" text,"Apogee" text,"Inclination" text) | SELECT "Apogee" FROM table_12858 WHERE "Inclination" = '65°' AND "Launch date/time ( GMT )" = '15 february 1973, 01:11' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.