instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What's cameron dantley's total avg/g for loss less than 35? | CREATE TABLE table_name_69 (avg_g VARCHAR,name VARCHAR,loss VARCHAR) | SELECT COUNT(avg_g) FROM table_name_69 WHERE name = "cameron dantley" AND loss < 35 |
with build 5/69-6/69 what's the order? | CREATE TABLE table_name_89 (order INTEGER,built VARCHAR) | SELECT SUM(order) FROM table_name_89 WHERE built = "5/69-6/69" |
Find the component amounts and names of all furnitures that have more than 10 components, order by the Num_of_Component in descending. | CREATE TABLE furniture_manufacte (Manufacturer_ID int,Furniture_ID int,Price_in_Dollar real)CREATE TABLE furniture (Furniture_ID int,Name text,Num_of_Component int,Market_Rate real)CREATE TABLE manufacturer (Manufacturer_ID int,Open_Year real,Name text,Num_of_Factories int,Num_of_Shops int) | SELECT Name, Num_of_Component FROM furniture WHERE Num_of_Component > 10 ORDER BY Num_of_Component DESC |
What is the average Bronze, when Nation is 'North Korea', and when Total is greater than 5? | CREATE TABLE table_name_53 (bronze INTEGER,nation VARCHAR,total VARCHAR) | SELECT AVG(bronze) FROM table_name_53 WHERE nation = "north korea" AND total > 5 |
Name who directed the production code 1l10 | CREATE TABLE table_25604014_9 (directed_by VARCHAR,production_code VARCHAR) | SELECT directed_by FROM table_25604014_9 WHERE production_code = "1L10" |
Which website has 1921 as the year founded? | CREATE TABLE table_name_76 (website VARCHAR,founded VARCHAR) | SELECT website FROM table_name_76 WHERE founded = 1921 |
what films had their weekend end dates in january ? | CREATE TABLE table_203_180 (id number,"#" number,"weekend end date" text,"film" text,"weekend gross (millions)" text,"notes" text) | SELECT "film" FROM table_203_180 WHERE "weekend end date" = 1 |
what is the maximum hospital cost when it involves acute copd exacerbation since 4 years ago? | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid num... | SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'acute copd exacerbation')) AND DATETIME(cost... |
What are the lowest points with 2013 as the year, and goals less than 0? | CREATE TABLE table_63411 ("Year" text,"Matches" real,"Tries" real,"Goals" real,"Points" real) | SELECT MIN("Points") FROM table_63411 WHERE "Year" = '2013' AND "Goals" < '0' |
On what date was the catalog scyl-934,623 for Australia? | CREATE TABLE table_47062 ("Region" text,"Date" text,"Label" text,"Format" text,"Catalog" text) | SELECT "Date" FROM table_47062 WHERE "Catalog" = 'scyl-934,623' AND "Region" = 'australia' |
During the Fall , what classes are available ? | CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE course_offering (offering_id int,course_id int,semester int,section_number int,start_time time,end_time time,monday varchar,tuesday varchar,wednesday varchar,thursday varchar,friday varchar,saturday varchar,sunday varchar,has_final_project va... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND semester.semester = 'Fall' AND semester.semester_id = course_offering.semester AND semester.year = 2016 |
What's the location for men's speed skating? | CREATE TABLE table_name_70 (location VARCHAR,distance VARCHAR) | SELECT location FROM table_name_70 WHERE distance = "men's speed skating" |
Which country had more than 2 silvers and less than 4 golds? | CREATE TABLE table_41765 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT "Nation" FROM table_41765 WHERE "Silver" > '2' AND "Gold" < '4' |
what are the top three medications that were prescribed to mouth and jaw tumor - oral cavity squamous cell ca female patients of the 60 or above during the same month after they have been diagnosed with mouth and jaw tumor - oral cavity squamous cell ca? | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissio... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'mouth and jaw tumor - oral cavity squamous cell ca... |
What is the Genre when the Artist is Prince? | CREATE TABLE table_70726 ("Artist" text,"Country of origin" text,"Period active" text,"Release-year of first charted record" real,"Genre" text,"Claimed sales" text) | SELECT "Genre" FROM table_70726 WHERE "Artist" = 'prince' |
what's the incumbent with district being massachusetts 2 | CREATE TABLE table_18290 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "Incumbent" FROM table_18290 WHERE "District" = 'Massachusetts 2' |
What is the total of Mark O'meara? | CREATE TABLE table_name_88 (total INTEGER,player VARCHAR) | SELECT MIN(total) FROM table_name_88 WHERE player = "mark o'meara" |
Azure threads average Day To Answer by month. | 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 FlagTypes (Id number,Name text,Description text)CREATE TABLE Re... | SELECT COUNT(*) AS AnsweredVolume, SUM(CAST((JULIANDAY(CreationDate) - JULIANDAY(P.CreationDate)) * 1440.0 AS INT)) AS TotalTime, TIME_TO_STR(P.CreationDate, '%Y') AS "year", TIME_TO_STR(P.CreationDate, '%m') AS Month FROM Posts AS P INNER JOIN Posts AS P1 ON P.AcceptedAnswerId = P1.Id WHERE (P.Tags LIKE '%<azure%' OR ... |
How many female students have milk or egg allergies? | CREATE TABLE has_allergy (StuID VARCHAR,allergy VARCHAR)CREATE TABLE Student (StuID VARCHAR,sex VARCHAR) | SELECT COUNT(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = "F" AND T1.allergy = "Milk" OR T1.allergy = "Eggs" |
How many documents for each document type name? Visualize by a ar chart, sort in desc by the x-axis. | CREATE TABLE Ref_Document_Types (Document_Type_Code CHAR(15),Document_Type_Name VARCHAR(255),Document_Type_Description VARCHAR(255))CREATE TABLE Ref_Budget_Codes (Budget_Type_Code CHAR(15),Budget_Type_Description VARCHAR(255))CREATE TABLE Statements (Statement_ID INTEGER,Statement_Details VARCHAR(255))CREATE TABLE Proj... | SELECT Document_Type_Name, COUNT(Document_Type_Name) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code GROUP BY Document_Type_Name ORDER BY Document_Type_Name DESC |
Which Name has a Term end of 18 july 1944? | CREATE TABLE table_9443 ("Name" text,"Born-Died" text,"Term start" text,"Term end" text,"Political Party" text) | SELECT "Name" FROM table_9443 WHERE "Term end" = '18 july 1944' |
what director has credit for directing the most films ? | CREATE TABLE table_203_393 (id number,"year" number,"film" text,"director" text,"cast" text,"details" text) | SELECT "director" FROM table_203_393 GROUP BY "director" ORDER BY COUNT("film") DESC LIMIT 1 |
What is the average position for tb2l teams promoted champion? | CREATE TABLE table_name_79 (pos INTEGER,league VARCHAR,postseason VARCHAR) | SELECT AVG(pos) FROM table_name_79 WHERE league = "tb2l" AND postseason = "promoted champion" |
when had patient 002-3736 first been prescribed for calcium chloride and acetaminophen 1,000 mg/100 ml (10 mg/ml) iv soln at the same time in 02/2103? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,s... | SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'calcium chloride' AND patient.uniquepid = '002-3736' AND STRFTIME('%y-%m', medication.drugstarttime) = '2103-02') AS t1 J... |
What is the sum of the swimsuit scores from Missouri that have evening gown scores less than 8.77 and average scores less than 8.823? | CREATE TABLE table_name_77 (swimsuit INTEGER,average VARCHAR,evening_gown VARCHAR,state VARCHAR) | SELECT SUM(swimsuit) FROM table_name_77 WHERE evening_gown < 8.77 AND state = "missouri" AND average < 8.823 |
What is the institution with the nickname engineers? | CREATE TABLE table_261927_1 (institution VARCHAR,nickname VARCHAR) | SELECT institution FROM table_261927_1 WHERE nickname = "Engineers" |
what is maximum age of patients whose gender is m and death status is 0? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)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 ... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.expire_flag = "0" |
How many years did the team that has a Singles win-Loss of 4-9 and first played before 1999? | CREATE TABLE table_name_28 (years_played INTEGER,singles_win_loss VARCHAR,first_year_played VARCHAR) | SELECT SUM(years_played) FROM table_name_28 WHERE singles_win_loss = "4-9" AND first_year_played < 1999 |
What is the result for the date of august 23? | CREATE TABLE table_name_83 (result VARCHAR,date VARCHAR) | SELECT result FROM table_name_83 WHERE date = "august 23" |
provide the number of patients whose diagnoses short title is hx-rectal & anal malign and lab test abnormal status is abnormal? | CREATE TABLE procedures (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 text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla... | 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 = "Hx-rectal & anal malign" AND lab.flag = "abnormal" |
how many total bridges are in copiah county ? | CREATE TABLE table_204_799 (id number,"name" text,"built" text,"listed" text,"location" text,"county" text,"type" text) | SELECT COUNT(DISTINCT "name") FROM table_204_799 WHERE "county" = 'copiah' |
How many u.s. viewers (millions) have 5 as the season #? | CREATE TABLE table_25124 ("Series #" real,"Season #" real,"Episode title" text,"Written by" text,"Directed by" text,"U.S. viewers (millions)" text,"Original air date" text) | SELECT "U.S. viewers (millions)" FROM table_25124 WHERE "Season #" = '5' |
Find the names of the artists who are from Bangladesh and have never received rating higher than 7. | 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 artist (artist_name text,country text,gender text,preferred_genre text)CREATE TABLE song (song_name text,artist_name text,country text,f_id number,genr... | SELECT DISTINCT artist_name FROM artist WHERE country = "Bangladesh" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7 |
What year was first elected william m. wheeler (d) unopposed? | CREATE TABLE table_1342218_11 (first_elected VARCHAR,candidates VARCHAR) | SELECT first_elected FROM table_1342218_11 WHERE candidates = "William M. Wheeler (D) Unopposed" |
Manager of marty berghammer / nick allen is what year? | CREATE TABLE table_name_91 (year VARCHAR,manager VARCHAR) | SELECT year FROM table_name_91 WHERE manager = "marty berghammer / nick allen" |
What episode number in the series originally aired on February 25, 2001? | CREATE TABLE table_1876825_3 (no_in_series VARCHAR,original_air_date VARCHAR) | SELECT no_in_series FROM table_1876825_3 WHERE original_air_date = "February 25, 2001" |
What is the country of player ian woosnam? | CREATE TABLE table_10078 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" real) | SELECT "Country" FROM table_10078 WHERE "Player" = 'ian woosnam' |
tell me the total number of patients in the tsicu careunits until 1 year ago? | CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title 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 icustays (row_id number,subject_id number,hadm_id number... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.careunit = 'tsicu' AND DATETIME(transfers.intime) <= DATETIME(CURRENT_TIME(), '-1 year')) |
For those employees whose first name is ending with the letter m, sum their salary for visualizing a bar chart, could you sort by the total number in ascending 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 job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN... | SELECT FIRST_NAME, SUM(SALARY) FROM employees WHERE FIRST_NAME LIKE '%m' GROUP BY FIRST_NAME ORDER BY SUM(SALARY) |
How many papers were accepted at sigmod 2016 ? | CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABLE field (fieldid int)CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE paperkeyphrase (paperid int,keyphraseid int)CREATE TABLE paper (paperid int,title varchar,venueid int,year int,numciting int,numcitedby int,journalid int)CREATE... | SELECT DISTINCT COUNT(paper.paperid) FROM paper, venue WHERE paper.year = 2016 AND venue.venueid = paper.venueid AND venue.venuename = 'sigmod' |
what is the total dosage of chlorhexidine gluconate 0.12% oral rinse that patient 57050 has been prescribed in this month? | CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE procedures_icd (row_id number,subject_id num... | SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 57050) AND prescriptions.drug = 'chlorhexidine gluconate 0.12% oral rinse' AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), '... |
How may college/junior/club team has a the nhl team listed as Colorado Avalanche? | CREATE TABLE table_30815 ("Pick" text,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text) | SELECT COUNT("College/junior/club team") FROM table_30815 WHERE "NHL team" = 'Colorado Avalanche' |
what's the average cost of a hospital with rbc, joint fluid in 2105? | 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 d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE patients (row_id number,subject_id number,gender text,dob ... | SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'rbc, joint fluid')) AND STRFTIME('%y', cost.chargetime) = '2105' GROUP BY cost.hadm_id) AS t1 |
What is the status of Aden Theobald from the hometown of London? | CREATE TABLE table_14756 ("Series" text,"Name" text,"Hometown" text,"Occupation" text,"Status" text) | SELECT "Status" FROM table_14756 WHERE "Hometown" = 'london' AND "Name" = 'aden theobald' |
What is the score of T7 place? | CREATE TABLE table_name_69 (score VARCHAR,place VARCHAR) | SELECT score FROM table_name_69 WHERE place = "t7" |
What is the frequency for the active rock format? | CREATE TABLE table_name_18 (frequency VARCHAR,format VARCHAR) | SELECT frequency FROM table_name_18 WHERE format = "active rock" |
What is the name of the algorithm with a directed/undirected of both and a subgraph-centric basis? | CREATE TABLE table_name_12 (name VARCHAR,directed___undirected VARCHAR,basis VARCHAR) | SELECT name FROM table_name_12 WHERE directed___undirected = "both" AND basis = "subgraph-centric" |
Name the least attendance for may 6 | CREATE TABLE table_name_1 (attendance INTEGER,date VARCHAR) | SELECT MIN(attendance) FROM table_name_1 WHERE date = "may 6" |
Return a histogram on what is the average number of stars that each reviewer awards for a movie?, and I want to display x-axis in desc order please. | CREATE TABLE Movie (mID int,title text,year int,director text)CREATE TABLE Reviewer (rID int,name text)CREATE TABLE Rating (rID int,mID int,stars int,ratingDate date) | SELECT name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name ORDER BY name DESC |
Who wrote 'yielding'? | CREATE TABLE table_31433 ("Series #" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Viewers (million)" text) | SELECT "Written by" FROM table_31433 WHERE "Title" = 'Yielding' |
What was the tournament that was on july 6, 1987? | CREATE TABLE table_59754 ("Outcome" text,"Date" text,"Tournament" text,"Surface" text,"Opponent" text,"Score" text) | SELECT "Tournament" FROM table_59754 WHERE "Date" = 'july 6, 1987' |
how many patients were diagnosed with obstructive sleep apnea within the same month after being diagnosed with hypertension nos since 3 years ago. | 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 microbiologyevents (row_id number,subject_id nu... | 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 = 'obstructive sleep ... |
What is the total number of bronze a team with more than 0 silver, a total of 7 medals, and less than 1 gold medal has? | CREATE TABLE table_name_97 (bronze VARCHAR,gold VARCHAR,silver VARCHAR,total VARCHAR) | SELECT COUNT(bronze) FROM table_name_97 WHERE silver > 0 AND total = 7 AND gold < 1 |
Which Country has a Result of nominated, an Award of 17th bangkok critics assembly awards, and a Category of best screenplay? | CREATE TABLE table_name_75 (country VARCHAR,category VARCHAR,result VARCHAR,award VARCHAR) | SELECT country FROM table_name_75 WHERE result = "nominated" AND award = "17th bangkok critics assembly awards" AND category = "best screenplay" |
What is the Award, when the Film/Show is East West 101, and when the year is before 2009, and when the Group is Logie Award? | CREATE TABLE table_68098 ("Year" real,"Group" text,"Award" text,"Film/Show" text,"Result" text) | SELECT "Award" FROM table_68098 WHERE "Film/Show" = 'east west 101' AND "Year" < '2009' AND "Group" = 'logie award' |
What Country's Player scored 71-69-70-71=281? | CREATE TABLE table_43877 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money (\u00a3)" real) | SELECT "Country" FROM table_43877 WHERE "Score" = '71-69-70-71=281' |
What did Denmark time at? | CREATE TABLE table_name_87 (time VARCHAR,country VARCHAR) | SELECT time FROM table_name_87 WHERE country = "denmark" |
Show the outcome code of mailshots along with the number of mailshots in each outcome code. | CREATE TABLE order_items (item_id number,order_item_status_code text,order_id number,product_id number,item_status_code text,item_delivered_datetime time,item_order_quantity text)CREATE TABLE customers (customer_id number,payment_method text,customer_name text,customer_phone text,customer_email text,customer_address te... | SELECT outcome_code, COUNT(*) FROM mailshot_customers GROUP BY outcome_code |
What's the season that had a lost of 9 with 72 games? | CREATE TABLE table_name_10 (season VARCHAR,games VARCHAR,lost VARCHAR) | SELECT season FROM table_name_10 WHERE games = "72" AND lost = "9" |
Show all allergy types and the number of allergies in each type. | CREATE TABLE Allergy_type (allergytype VARCHAR) | SELECT allergytype, COUNT(*) FROM Allergy_type GROUP BY allergytype |
what was the total amount of po oral intake that patient 029-27704 had on 05/27/2105? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number... | SELECT SUM(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 = '029-27704')) AND intakeoutput.celllabel = 'po or... |
Tell me the track that has the catalogue of apbo 0280 | CREATE TABLE table_name_34 (track VARCHAR,catalogue VARCHAR) | SELECT track FROM table_name_34 WHERE catalogue = "apbo 0280" |
since 2101 how many patients were diagnosed with amphetamin depend-contin in the same month after the previous diagnosis of visceral aneurysm nec? | CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE charteve... | 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 = 'amphetamin depend-... |
Who holds third place in the tournament with a score of 2 6, 7 6(3), [10 5]? | CREATE TABLE table_53414 ("Tournament" text,"Winner" text,"Runner-up" text,"Score" text,"Third Place" text) | SELECT "Third Place" FROM table_53414 WHERE "Score" = '2–6, 7–6(3), [10–5]' |
How many reasons for change were listed when Edward Hempstead was the successor? | CREATE TABLE table_225095_4 (reason_for_change VARCHAR,successor VARCHAR) | SELECT COUNT(reason_for_change) FROM table_225095_4 WHERE successor = "Edward Hempstead" |
Who directed series episode number 201? | CREATE TABLE table_29107 ("Series #" real,"Season #" real,"Title" text,"Director" text,"Writer" text,"Original Airdate" text) | SELECT "Director" FROM table_29107 WHERE "Series #" = '201' |
For the Player from Brampton, ON what is their NBA Draft status? | CREATE TABLE table_53975 ("Player" text,"Height" text,"School" text,"Hometown" text,"College" text,"NBA Draft" text) | SELECT "NBA Draft" FROM table_53975 WHERE "Hometown" = 'brampton, on' |
What is Driver Brendan Gaughan's Pos? | CREATE TABLE table_name_29 (pos VARCHAR,driver VARCHAR) | SELECT pos FROM table_name_29 WHERE driver = "brendan gaughan" |
What is Kirk Triplett's Place? | CREATE TABLE table_name_66 (place VARCHAR,player VARCHAR) | SELECT place FROM table_name_66 WHERE player = "kirk triplett" |
Bin the settlement date for each settlement case into the day of week interval and count them for visualizing a bar chart. | CREATE TABLE Claims (Claim_ID INTEGER,Policy_ID INTEGER,Date_Claim_Made DATE,Date_Claim_Settled DATE,Amount_Claimed INTEGER,Amount_Settled INTEGER)CREATE TABLE Payments (Payment_ID INTEGER,Settlement_ID INTEGER,Payment_Method_Code VARCHAR(255),Date_Payment_Made DATE,Amount_Payment INTEGER)CREATE TABLE Settlements (Sett... | SELECT Date_Claim_Settled, COUNT(Date_Claim_Settled) FROM Settlements |
What shows for simplified when the density is 52? | CREATE TABLE table_name_13 (simplified VARCHAR,density VARCHAR) | SELECT simplified FROM table_name_13 WHERE density = "52" |
Which player went to college at Tennessee? | CREATE TABLE table_2508633_3 (player VARCHAR,college VARCHAR) | SELECT player FROM table_2508633_3 WHERE college = "Tennessee" |
what is the cost of flight DL 106 from PHILADELPHIA to BOSTON | CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE flight_stop (flight_id int,stop_number int,stop_days... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE (((flight.airline_code = 'DL') AND flight.flight_number = 106) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' ... |
What are the lowest lost has 111 as the goals against? | CREATE TABLE table_name_9 (lost INTEGER,goals_against VARCHAR) | SELECT MIN(lost) FROM table_name_9 WHERE goals_against = 111 |
How many horses are mentioned competing in 1985? | CREATE TABLE table_21676617_1 (horse VARCHAR,year VARCHAR) | SELECT COUNT(horse) FROM table_21676617_1 WHERE year = 1985 |
Which Rank is the highest one that has Points smaller than 256.6? | CREATE TABLE table_34565 ("Rank" real,"Name" text,"Nationality" text,"1st (m)" real,"2nd (m)" real,"Points" real,"Overall FHT points" text,"Overall WC points (Rank)" text) | SELECT MAX("Rank") FROM table_34565 WHERE "Points" < '256.6' |
how many of the patients admitted to emergency were on government insurance? | CREATE TABLE diagnoses (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 tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.insurance = "Government" |
Top 50 users from Iasi (Romania). | CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE Comments (Id number,PostId number,Score number,Te... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, AboutMe, ProfileImageUrl FROM Users WHERE LOWER(Location) LIKE '%iasi%' ORDER BY Reputation DESC LIMIT 50 |
Show names of parties that does not have any members. | CREATE TABLE party (party_name VARCHAR,party_id VARCHAR)CREATE TABLE Member (party_name VARCHAR,party_id VARCHAR) | SELECT party_name FROM party WHERE NOT party_id IN (SELECT party_id FROM Member) |
how many patients whose lab test chart time is 2154-10-11 16:00:00? | CREATE TABLE diagnoses (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 procedures (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.charttime = "2154-10-11 16:00:00" |
how many patients are below 64 years of age and administered in tp drug route? | 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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "64" AND prescriptions.route = "TP" |
What is the population in (croatian: stari ednik)? | CREATE TABLE table_73822 ("Settlement" text,"Cyrillic Name Other Names" text,"Type" text,"Population (2011)" real,"Largest ethnic group (2002)" text,"Dominant religion (2002)" text) | SELECT "Population (2011)" FROM table_73822 WHERE "Cyrillic Name Other Names" = 'Стари Жедник (Croatian: Stari Žednik)' |
from what country did the last place compete for ? | CREATE TABLE table_204_160 (id number,"rank" number,"name" text,"nationality" text,"time" text,"notes" text) | SELECT "nationality" FROM table_204_160 ORDER BY "rank" DESC LIMIT 1 |
What is the abbreviation of the enzyme involved in carbamoyl phosphate synthetase i deficiency? | CREATE TABLE table_name_30 (abb VARCHAR,disorder VARCHAR) | SELECT abb FROM table_name_30 WHERE disorder = "carbamoyl phosphate synthetase i deficiency" |
What is the other is the city is Los Gatos? | CREATE TABLE table_27439 ("City" text,"Population" real,"Registered voters" text,"Democratic" text,"Republican" text,"D\u2013R spread" text,"Other" text,"No party preference" text) | SELECT "Other" FROM table_27439 WHERE "City" = 'Los Gatos' |
what were the four most common specimen tests performed? | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)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,hadm_id number,icustay_id number,itemid number,charttime time,va... | SELECT t1.spec_type_desc FROM (SELECT microbiologyevents.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microbiologyevents GROUP BY microbiologyevents.spec_type_desc) AS t1 WHERE t1.c1 <= 4 |
what is the last ward for patient 74159 since 2105? | CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE prescriptions (row_id number,subject_id num... | SELECT transfers.wardid FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 74159) AND NOT transfers.wardid IS NULL AND STRFTIME('%y', transfers.intime) >= '2105' ORDER BY transfers.intime DESC LIMIT 1 |
what is the position is 2012 when the last title is n/a and the first season is 2011? | CREATE TABLE table_55932 ("Club" text,"Position in 2012" text,"First season" text,"Number of seasons" real,"First season of current spell" real,"Titles" real,"Last title" text) | SELECT "Position in 2012" FROM table_55932 WHERE "Last title" = 'n/a' AND "First season" = '2011' |
What is the grid total for david coulthard? | CREATE TABLE table_54644 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real) | SELECT SUM("Grid") FROM table_54644 WHERE "Driver" = 'david coulthard' |
Bar chart of mean age from each city code, I want to list by the total number in ascending. | CREATE TABLE Dorm (dormid INTEGER,dorm_name VARCHAR(20),student_capacity INTEGER,gender VARCHAR(1))CREATE TABLE Lives_in (stuid INTEGER,dormid INTEGER,room_number INTEGER)CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTEGER,city_code VARCHAR(3)... | SELECT city_code, AVG(Age) FROM Student GROUP BY city_code ORDER BY AVG(Age) |
c _ peptide < 1 ng / ml; | CREATE TABLE table_dev_4 ("id" int,"hypothyroidism" bool,"serum_bicarbonate" int,"c_peptide_level" float,"autoimmune_disease" bool,"hemoglobin_a1c_hba1c" float,"positive_serum" bool,"inhaled_steroids" bool,"diabetic_ketoacidosis" bool,"creatinine_clearance_cl" float,"urinary_ketones" bool,"admission_blood_glucose" int,... | SELECT * FROM table_dev_4 WHERE c_peptide_level < 1 |
How many stadiums does each country have? | CREATE TABLE stadium (country VARCHAR) | SELECT country, COUNT(*) FROM stadium GROUP BY country |
When was the incumbent from the south carolina 1 district first elected? | CREATE TABLE table_36744 ("District" text,"Incumbent" text,"Party" text,"First elected" text,"Result" text) | SELECT "First elected" FROM table_36744 WHERE "District" = 'south carolina 1' |
How much Avg/G has a Long of 51, and a Loss of 333, and a Gain larger than 2013? | CREATE TABLE table_name_51 (avg_g VARCHAR,gain VARCHAR,long VARCHAR,loss VARCHAR) | SELECT COUNT(avg_g) FROM table_name_51 WHERE long = 51 AND loss = 333 AND gain > 2013 |
Who is every vacator if date of successors formal installation is August 8, 1960? | CREATE TABLE table_24494 ("State (class)" text,"Vacator" text,"Reason for change" text,"Successor" text,"Date of successors formal installation" text) | SELECT "Vacator" FROM table_24494 WHERE "Date of successors formal installation" = 'August 8, 1960' |
What game site has w 10-3 as the result? | CREATE TABLE table_43158 ("Week" real,"Date" text,"Time (PT)" text,"Opponent" text,"Result" text,"Record" text,"Game site" text) | SELECT "Game site" FROM table_43158 WHERE "Result" = 'w 10-3' |
Who is the player with the PBA team of Barangay Ginebra Kings? | CREATE TABLE table_name_11 (player VARCHAR,pba_team VARCHAR) | SELECT player FROM table_name_11 WHERE pba_team = "barangay ginebra kings" |
What is the lowest number of silver owned by a nation that is not ranked number 1? | CREATE TABLE table_name_41 (silver INTEGER,rank INTEGER) | SELECT MIN(silver) FROM table_name_41 WHERE rank < 1 |
On what date was the player from Melrose, Massachusetts born? | CREATE TABLE table_name_54 (birthdate VARCHAR,birthplace VARCHAR) | SELECT birthdate FROM table_name_54 WHERE birthplace = "melrose, massachusetts" |
What is Moving To, when Name is 'Leon Andreasen'? | CREATE TABLE table_49815 ("Date From" text,"Date To" text,"Pos." text,"Name" text,"Moving To" text) | SELECT "Moving To" FROM table_49815 WHERE "Name" = 'leon andreasen' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.