instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What is the most common participant type? | CREATE TABLE participants (participant_type_code VARCHAR) | SELECT participant_type_code FROM participants GROUP BY participant_type_code ORDER BY COUNT(*) DESC LIMIT 1 |
had patient 013-23267 received a procedure of calcium channel blocker - diltiazem in 2105? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid numbe... | SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-23267')) AND treatment.treatmentname = 'calcium channel blocker - diltia... |
Which winning team beat the New York Yankees? | CREATE TABLE table_54 ("Year" real,"Game or event" text,"Date contested" text,"League or governing body" text,"Sport" text,"Winning team" text,"Losing team" text,"Final score" text) | SELECT "Winning team" FROM table_54 WHERE "Losing team" = 'New York Yankees' |
What is the number of recepits per arrival in 2010 (col 2)/(col 1) USD with colombia (1) as the selected carribean and latin american country? | CREATE TABLE table_name_71 (receipts_per_arrival_2010__col_2___col_1____usd__ VARCHAR,selected_caribbean_and_n_latin_america_countries VARCHAR) | SELECT receipts_per_arrival_2010__col_2___col_1____usd__ FROM table_name_71 WHERE selected_caribbean_and_n_latin_america_countries = "colombia (1)" |
Visualize the title and their average smallest ratings of the movie using a bar chart. | CREATE TABLE Movie (mID int,title text,year int,director text)CREATE TABLE Rating (rID int,mID int,stars int,ratingDate date)CREATE TABLE Reviewer (rID int,name text) | SELECT T2.title, AVG(MIN(T1.stars)) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.title |
What are some software courses that are easier than DHYGRACK 685 ? | CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE stude... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE area.area LIKE '%software%' AND program_course.workload < (SELECT MIN(PROGRAM_COURSEalias... |
How many millions of viewers did watch Episode 5? | CREATE TABLE table_12919003_3 (viewers_millions_ VARCHAR,episode VARCHAR) | SELECT viewers_millions_ FROM table_12919003_3 WHERE episode = "episode 5" |
How many carries have an average under 8.7 and touchdowns of 72? | CREATE TABLE table_80417 ("Year" text,"Carries" real,"Rushing Yards" real,"Average" real,"Touchdowns" real,"Points" real) | SELECT COUNT("Carries") FROM table_80417 WHERE "Average" < '8.7' AND "Touchdowns" = '72' |
Which Medal has a Name of alex obeyesekera? | CREATE TABLE table_64169 ("Medal" text,"Name" text,"Games" text,"Sport" text,"Event" text) | SELECT "Medal" FROM table_64169 WHERE "Name" = 'alex obeyesekera' |
What is the lowest disposable USD 2011? | CREATE TABLE table_24486462_1 (disposable_usd_2011 INTEGER) | SELECT MIN(disposable_usd_2011) FROM table_24486462_1 |
What type of engine does the BF Racing Marron Excavations have that also has Monaco as chassis and Lee Filliponi as the driver? | CREATE TABLE table_74867 ("Team" text,"Class" text,"Chassis" text,"Engine" text,"Driver" text) | SELECT "Engine" FROM table_74867 WHERE "Team" = 'bf racing marron excavations' AND "Chassis" = 'monaco' AND "Driver" = 'lee filliponi' |
Name the number of episodes for s hacksaw | CREATE TABLE table_1197 ("Series Ep." text,"Episode" real,"Netflix" text,"Segment A" text,"Segment B" text,"Segment C" text,"Segment D" text) | SELECT COUNT("Episode") FROM table_1197 WHERE "Segment B" = 's Hacksaw' |
Percentage of the dupe questions by month. It counts also the deleted questions. | CREATE TABLE Posts (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,Tags text,Ans... | SELECT * FROM PostLinks WHERE PostId = 1066589 |
what is drug type and drug route of drug name influenza virus vaccine? | 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 prescriptions.drug_type, prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Influenza Virus Vaccine" |
Which tournament included an opponent of Marinko Matosevic? | CREATE TABLE table_name_74 (tournament VARCHAR,opponent VARCHAR) | SELECT tournament FROM table_name_74 WHERE opponent = "marinko matosevic" |
okay on tuesday june first i'd like to go from PHOENIX to DETROIT in the late afternoon | CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_description varchar)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE month (month_number int,month_name te... | 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 = 'DETROIT' AND date_day.day_number = 22 AND date_day.month_number = 3 AND ... |
what is the year that the position was 1st in paris? | CREATE TABLE table_name_26 (year VARCHAR,position VARCHAR,venue VARCHAR) | SELECT year FROM table_name_26 WHERE position = "1st" AND venue = "paris" |
what is the THRIFT flight fare from WASHINGTON to SAN FRANCISCO | CREATE TABLE month (month_number int,month_name text)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)CREATE TABLE aircraft (aircraft_code varchar,aircraft_description varchar,manufacturer varchar,basic_type varchar,engines int,propulsion varch... | 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, fare_basis, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code ... |
what are the weight changes in patient 15447's second measured on the current hospital visit compared to the first value measured on the current hospital visit? | CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title te... | SELECT (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 = 15447 AND admissions.dischtime IS NULL)) AND chartevents.itemid IN (SELECT d_items.itemid FROM... |
was the rocuronium prescribed to patient 69895 during their first hospital visit? | CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title 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 number,hadm_id number,startdate time,end... | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 69895 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND prescriptions.drug = 'rocuronium' |
What is the start value for rank 11? | CREATE TABLE table_name_31 (start VARCHAR,rank VARCHAR) | SELECT start FROM table_name_31 WHERE rank = "11" |
What date did episode one air on? | CREATE TABLE table_64664 ("Episode" text,"Date" text,"Time" text,"Network" text,"Length" text) | SELECT "Date" FROM table_64664 WHERE "Episode" = 'one' |
What is the cardinalatial order of the elector elevated circa 1116? | CREATE TABLE table_66279 ("Elector" text,"Nationality" text,"Cardinalatial order and title" text,"Elevated" text,"Elevator" text) | SELECT "Cardinalatial order and title" FROM table_66279 WHERE "Elevated" = 'circa 1116' |
When did the Browns play the Pittsburgh Steelers? | CREATE TABLE table_name_80 (date VARCHAR,opponent VARCHAR) | SELECT date FROM table_name_80 WHERE opponent = "pittsburgh steelers" |
what was the last locomotive ? | CREATE TABLE table_203_213 (id number,"name" text,"builder" text,"type" text,"date" text,"works number" number,"notes" text) | SELECT "name" FROM table_203_213 ORDER BY "date" DESC LIMIT 1 |
Which Location has a Year larger than 2006, and a Score of 6 3, 6 3? | CREATE TABLE table_60326 ("Location" text,"Year" real,"Champion" text,"Runner-up" text,"Score" text) | SELECT "Location" FROM table_60326 WHERE "Year" > '2006' AND "Score" = '6–3, 6–3' |
Which Prominence (m) has a Col (m) of 350? | CREATE TABLE table_62846 ("Peak" text,"Country" text,"Elevation (m)" real,"Prominence (m)" real,"Col (m)" real) | SELECT AVG("Prominence (m)") FROM table_62846 WHERE "Col (m)" = '350' |
In which event did he place 6th in 1971? | CREATE TABLE table_51542 ("Year" real,"Tournament" text,"Venue" text,"Result" text,"Event" text) | SELECT "Event" FROM table_51542 WHERE "Year" = '1971' AND "Result" = '6th' |
show me the number of patients who had elective hospital admission and were born before 2052. | 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 text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.dob_year < "2052" |
provide the number of patients whose ethnicity is hispanic or latino and year of birth is less than 2109? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND demographic.dob_year < "2109" |
What is the lowest Lane, when Mark is 7.66? | CREATE TABLE table_name_21 (lane INTEGER,mark VARCHAR) | SELECT MIN(lane) FROM table_name_21 WHERE mark = "7.66" |
Name the lost for % won of 55.37 | CREATE TABLE table_name_64 (lost VARCHAR,_percentage_won VARCHAR) | SELECT lost FROM table_name_64 WHERE _percentage_won = "55.37" |
For those employees who was hired before 2002-06-21, a bar chart shows the distribution of job_id and the sum of employee_id , and group by attribute job_id, list Y from high to low 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 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)... | SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID) DESC |
Name all of the february | CREATE TABLE table_1539201_1 (february VARCHAR) | SELECT february FROM table_1539201_1 |
how many population estimate 2005 are for majene? | CREATE TABLE table_11222 ("Name" text,"Area (km 2)" real,"Population Estimate 2005" real,"Population Census 2010" real,"Capital" text) | SELECT COUNT("Population Estimate 2005") FROM table_11222 WHERE "Capital" = 'majene' |
What is Year is Walt Disney Pictures Imagemovers Digital? | CREATE TABLE table_name_59 (year INTEGER,studio_s_ VARCHAR) | SELECT SUM(year) FROM table_name_59 WHERE studio_s_ = "walt disney pictures imagemovers digital" |
What is the grid total for ralf schumacher racing over 53 laps? | CREATE TABLE table_77800 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real) | SELECT SUM("Grid") FROM table_77800 WHERE "Driver" = 'ralf schumacher' AND "Laps" > '53' |
give me the number of patients whose language is russ and discharge location is long term care hospital? | 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,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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "RUSS" AND demographic.discharge_location = "LONG TERM CARE HOSPITAL" |
What is on offer in the way of hardware courses for Spring and Summer of 2019 ? | CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE area (course_id int,area var... | SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE area.area LIKE '%hardw... |
i'm sorry i want to book a flight from ATLANTA to DENVER colorado | CREATE TABLE month (month_number int,month_name text)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE days (days_code varchar,day_name varchar)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distan... | 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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER... |
What is the position of pick # 63? | CREATE TABLE table_25518547_4 (position VARCHAR,pick__number VARCHAR) | SELECT position FROM table_25518547_4 WHERE pick__number = 63 |
What's the smallest number of players? | CREATE TABLE table_86 ("Country" text,"Players" real,"Standard" real,"Minor" real,"First title" real,"Last title" real) | SELECT MIN("Players") FROM table_86 |
What Results has a Seed #12 and a Year that's smaller than 1996 | CREATE TABLE table_35728 ("Year" real,"Record" text,"Seed" text,"Region" text,"Results" text) | SELECT "Results" FROM table_35728 WHERE "Seed" = '#12' AND "Year" < '1996' |
What number of years did the red bull sauber petronas have greater than 6 points? | CREATE TABLE table_name_90 (year VARCHAR,entrant VARCHAR,points VARCHAR) | SELECT COUNT(year) FROM table_name_90 WHERE entrant = "red bull sauber petronas" AND points > 6 |
What is the total Tonnage GRT with a Type of cargo ship, and a Nationality of norway? | CREATE TABLE table_55010 ("Date" text,"Ship" text,"Type" text,"Nationality" text,"Tonnage GRT" real) | SELECT SUM("Tonnage GRT") FROM table_55010 WHERE "Type" = 'cargo ship' AND "Nationality" = 'norway' |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of founder and the average of code , and group by attribute founder, could you rank from high to low by the Founder? | CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER) | SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder ORDER BY T2.Founder DESC |
what is the number of films where the language was hindi ? | CREATE TABLE table_203_157 (id number,"year" number,"film" text,"role" text,"language" text,"notes" text) | SELECT COUNT("film") FROM table_203_157 WHERE "language" = 'hindi' |
how many patients whose age is less than 45 and drug route is ih? | 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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "45" AND prescriptions.route = "IH" |
Posts that link to reddit.com. | CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Comment text,Text text,Title text,Tags text,RevisionGUID other)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score ... | SELECT CreationDate, Id AS "post_link" FROM Posts WHERE LOWER(Body) LIKE '%reddit.com%' OR LOWER(Body) LIKE '%redd.it%' ORDER BY CreationDate DESC LIMIT 1000 |
What is the difference associated with more than 2 points, fewer than 3 losses, and fewer than 1 draw? | CREATE TABLE table_name_97 (points_difference VARCHAR,drawn VARCHAR,points VARCHAR,lost VARCHAR) | SELECT points_difference FROM table_name_97 WHERE points > 2 AND lost < 3 AND drawn < 1 |
What are the names of reviewers who had rated 3 star and 4 star? | CREATE TABLE reviewer (rid number,name text)CREATE TABLE movie (mid number,title text,year number,director text)CREATE TABLE rating (rid number,mid number,stars number,ratingdate time) | SELECT T2.name FROM rating AS T1 JOIN reviewer AS T2 ON T1.rid = T2.rid WHERE T1.stars = 3 INTERSECT SELECT T2.name FROM rating AS T1 JOIN reviewer AS T2 ON T1.rid = T2.rid WHERE T1.stars = 4 |
How many districts for ren l. derouen? | CREATE TABLE table_1342315_17 (district VARCHAR,incumbent VARCHAR) | SELECT COUNT(district) FROM table_1342315_17 WHERE incumbent = "René L. DeRouen" |
What is the production code for the episode that had 18.07 million viewers? | CREATE TABLE table_26198709_1 (production_code VARCHAR,us_viewers__million_ VARCHAR) | SELECT production_code FROM table_26198709_1 WHERE us_viewers__million_ = "18.07" |
Who is the manufacturer when 150.088 is the average speed (mph)? | CREATE TABLE table_24852 ("Year" text,"Date" text,"Driver" text,"Team" text,"Manufacturer" text,"Laps" text,"Miles (km)" text,"Race Time" text,"Average Speed (mph)" text,"Report" text) | SELECT "Manufacturer" FROM table_24852 WHERE "Average Speed (mph)" = '150.088' |
What is the highest Goals Against, when Points is greater than 25, when Club is 'SD Indautxu', and when Position is greater than 3? | CREATE TABLE table_name_21 (goals_against INTEGER,position VARCHAR,points VARCHAR,club VARCHAR) | SELECT MAX(goals_against) FROM table_name_21 WHERE points > 25 AND club = "sd indautxu" AND position > 3 |
who is the vacator whre the district is new jersey 2nd? | CREATE TABLE table_1651764_3 (vacator VARCHAR,district VARCHAR) | SELECT vacator FROM table_1651764_3 WHERE district = "New Jersey 2nd" |
Who had a disputed marriage? | CREATE TABLE table_name_57 (name VARCHAR,marriage VARCHAR) | SELECT name FROM table_name_57 WHERE marriage = "disputed" |
what are the new drugs prescribed to patient 31854 today compared to that yesterday? | CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE lab... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31854) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE... |
How much Total has a Rank of 5, and a Bronze larger than 3? | CREATE TABLE table_63090 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT SUM("Total") FROM table_63090 WHERE "Rank" = '5' AND "Bronze" > '3' |
until 2102, what was the three most frequently ordered procedure for patients 30s? | CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wardid number,last_wardid number,intime time,outti... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age B... |
What year shows 248 (sf: 217) points? | CREATE TABLE table_59854 ("Year" real,"Song" text,"Artist" text,"Place" text,"Points" text,"Composer" text) | SELECT COUNT("Year") FROM table_59854 WHERE "Points" = '248 (sf: 217)' |
what is the first year they scored 6th position in tier 3 division 3 ? | CREATE TABLE table_204_738 (id number,"season" number,"level" text,"division" text,"section" text,"position" text,"movements" text) | SELECT MIN("season") FROM table_204_738 WHERE "position" = 6 AND "level" = 3 AND "division" = 3 |
calculate the one year survival rate among the patients who were prescribed albumin 5% (12.5 g) after they were diagnosed with nb obsrv suspct infect. | 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 admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,... | SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd... |
What was the score when the team was @ New Jersey? | CREATE TABLE table_22871239_5 (score VARCHAR,team VARCHAR) | SELECT score FROM table_22871239_5 WHERE team = "@ New Jersey" |
Which Date has an Attendance of 9,535? | CREATE TABLE table_58251 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" text,"Record" text) | SELECT "Date" FROM table_58251 WHERE "Attendance" = '9,535' |
Where is the location of the friendly match larger than 1 where the Super Reds were the opponent? | CREATE TABLE table_51020 ("Match" real,"Date" text,"Tournament" text,"Location" text,"Opponent team" text,"Score" text) | SELECT "Location" FROM table_51020 WHERE "Match" > '1' AND "Tournament" = 'friendly' AND "Opponent team" = 'super reds' |
What is Home, when Ground is Humber College North, and when Time is 15:00? | CREATE TABLE table_name_58 (home VARCHAR,ground VARCHAR,time VARCHAR) | SELECT home FROM table_name_58 WHERE ground = "humber college north" AND time = "15:00" |
Draw a bar chart about the distribution of name and meter_100 , and list in asc by the total number. | CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 text,meter_400 text,meter_500 text,meter_600 text,meter_700 text,Time text)CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE event (ID int,Name text,Stadium_ID int,Year text)CREATE TABLE stadiu... | SELECT name, meter_100 FROM swimmer ORDER BY meter_100 |
what was the medication patient 013-33898 had been prescribed two or more times during this month? | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE allergy (allergyid number,patientunits... | SELECT t1.drugname FROM (SELECT medication.drugname, COUNT(medication.drugstarttime) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013... |
Where the wins are 46, what is the win%? | CREATE TABLE table_40316 ("Season" text,"Conference" text,"Division" text,"Finish" text,"Wins" text,"Losses" text,"Win%" text,"Awards" text) | SELECT "Win%" FROM table_40316 WHERE "Wins" = '46' |
What was the reported cost of the asset acquired from Standard & Poor's? | CREATE TABLE table_18945 ("Asset Acquired" text,"Acquired From" text,"Date Announced" text,"Date Completed" text,"Reported Cost" text) | SELECT "Reported Cost" FROM table_18945 WHERE "Acquired From" = 'Standard & Poor''s' |
WHAT IS THE STUDIO WITH A GROSS $81,198,894? | CREATE TABLE table_name_49 (studio VARCHAR,gross VARCHAR) | SELECT studio FROM table_name_49 WHERE gross = "$81,198,894" |
With a parallel bars score of 14.625 what is the average total? | CREATE TABLE table_name_8 (total INTEGER,parallel_bars VARCHAR) | SELECT AVG(total) FROM table_name_8 WHERE parallel_bars = "14.625" |
What is the result of judge 6? | CREATE TABLE table_19744915_16 (result VARCHAR,judges VARCHAR) | SELECT result FROM table_19744915_16 WHERE judges = 6 |
How many weeks total did the New York Jets face the Pittsburgh Steelers? | CREATE TABLE table_name_72 (week VARCHAR,opponent VARCHAR) | SELECT COUNT(week) FROM table_name_72 WHERE opponent = "pittsburgh steelers" |
Name the seans team being 13 november 2008 | CREATE TABLE table_23292220_7 (seans_team VARCHAR,first_broadcast VARCHAR) | SELECT seans_team FROM table_23292220_7 WHERE first_broadcast = "13 November 2008" |
Answer Rate for Lex Question. | CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate tim... | WITH diffs AS (SELECT CAST(a.CreationDate - Question.CreationDate AS FLOAT) AS d FROM Posts AS Question JOIN Posts AS a ON a.Id = Question.AcceptedAnswerId WHERE (Question.Tags LIKE '%<amazon-lex%' OR Question.Tags LIKE '%<aws-lex%') AND Question.CreationDate >= '2019-01-01') SELECT AVG(d), STDEV(d) FROM diffs |
What is the location for Yemen in 1994? | CREATE TABLE table_name_1 (location VARCHAR,year VARCHAR,country VARCHAR) | SELECT location FROM table_name_1 WHERE year = "1994" AND country = "yemen" |
What is the multiplier for the processor with a frequency of 733MHz? | CREATE TABLE table_8610 ("Model Number" text,"Frequency" text,"L2-Cache" text,"Front Side Bus" text,"Multiplier" text,"Voltage" text,"Socket" text) | SELECT "Multiplier" FROM table_8610 WHERE "Frequency" = '733mhz' |
Who was the Centerfold Model on 9-03? | CREATE TABLE table_name_79 (centerfold_model VARCHAR,date VARCHAR) | SELECT centerfold_model FROM table_name_79 WHERE date = "9-03" |
what airlines go from ATLANTA to BALTIMORE | CREATE TABLE compartment_class (compartment varchar,class_type varchar)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_dist... | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_n... |
Which Laps have a Manufacturer of suzuki, and a Grid smaller than 16? | CREATE TABLE table_name_93 (laps INTEGER,manufacturer VARCHAR,grid VARCHAR) | SELECT MAX(laps) FROM table_name_93 WHERE manufacturer = "suzuki" AND grid < 16 |
Where the length is 91', what is the year built? | CREATE TABLE table_name_38 (year_built VARCHAR,length VARCHAR) | SELECT year_built FROM table_name_38 WHERE length = "91'" |
Which Margin of victory has a Runner(s)-up of buddy gardner? | CREATE TABLE table_38516 ("Date" text,"Tournament" text,"Winning score" text,"Margin of victory" text,"Runner(s)-up" text) | SELECT "Margin of victory" FROM table_38516 WHERE "Runner(s)-up" = 'buddy gardner' |
Tell me the model for total production of 1347 | CREATE TABLE table_4379 ("Model" text,"Build year" text,"Top speed (In operation) \uff08km/h\uff09" real,"Power output \uff08kW\uff09" text,"Builder" text,"Total production" real) | SELECT "Model" FROM table_4379 WHERE "Total production" = '1347' |
What was the attendance on October 27, 1968? | CREATE TABLE table_name_9 (week INTEGER,date VARCHAR) | SELECT MAX(week) FROM table_name_9 WHERE date = "october 27, 1968" |
Amount of users who's last activity was during that month. | 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 SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Com... | SELECT Month = DATEADD(MONTH, DATEDIFF(MONTH, 0, Last_activity), 0), 'Lost members' = COUNT(activity.UserId) FROM (SELECT UserId, Last_activity = MAX(Date) FROM Badges INNER JOIN Users ON Badges.UserId = Users.Id GROUP BY UserId) AS activity GROUP BY DATEADD(MONTH, DATEDIFF(MONTH, 0, Last_activity), 0) ORDER BY Month |
did patient 012-14774 ever undergo pulmonary artery catheter placement? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labres... | SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-14774')) AND treatment.treatmentname = 'pulmonary artery catheter placem... |
For the Year 2013 what building(s) had less than 20 Floors? | CREATE TABLE table_name_13 (building VARCHAR,year VARCHAR,floors VARCHAR) | SELECT building FROM table_name_13 WHERE year = "2013" AND floors < 20 |
What are all of the townlands that have exactly 131 acres. | CREATE TABLE table_30120761_1 (townland VARCHAR,area__acres__ VARCHAR) | SELECT townland FROM table_30120761_1 WHERE area__acres__ = 131 |
i need your help with information on ground transportation from the airport in PHILADELPHIA to downtown | CREATE TABLE aircraft (aircraft_code varchar,aircraft_description varchar,manufacturer varchar,basic_type varchar,engines int,propulsion varchar,wide_body varchar,wing_span int,length int,weight int,capacity int,pay_load int,cruising_speed int,range_miles int,pressurized varchar)CREATE TABLE date_day (month_number int,... | SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city, ground_service WHERE airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'PHILADELPHIA' AND ground_service.airport_code = airport.airport_code |
What is the High rebounds with a Series with 4 2? | CREATE TABLE table_77503 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Series" text) | SELECT "High rebounds" FROM table_77503 WHERE "Series" = '4–2' |
when is the last time that patient 19147 has had a heart rate measured on 04/05/2105? | 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,age number)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,i... | SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19147)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart ra... |
What was the Attendance on Week 8? | CREATE TABLE table_37511 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT AVG("Attendance") FROM table_37511 WHERE "Week" = '8' |
Which team has the location attendance of American Airlines Center 19954? | CREATE TABLE table_23285805_8 (team VARCHAR,location_attendance VARCHAR) | SELECT team FROM table_23285805_8 WHERE location_attendance = "American Airlines Center 19954" |
When did the Grand Prix de Monaco race? | CREATE TABLE table_name_13 (date VARCHAR,race_title VARCHAR) | SELECT date FROM table_name_13 WHERE race_title = "grand prix de monaco" |
Show the number of document type for different document type description in a bar chart, and I want to order x axis in desc order. | CREATE TABLE Statements (Statement_ID INTEGER,Statement_Details VARCHAR(255))CREATE TABLE Documents (Document_ID INTEGER,Document_Type_Code CHAR(15),Project_ID INTEGER,Document_Date DATETIME,Document_Name VARCHAR(255),Document_Description VARCHAR(255),Other_Details VARCHAR(255))CREATE TABLE Ref_Budget_Codes (Budget_Typ... | SELECT Document_Type_Description, COUNT(Document_Type_Description) FROM Ref_Document_Types GROUP BY Document_Type_Description ORDER BY Document_Type_Description DESC |
what is the number of patients whose drug code is clin150 and lab test fluid is other body fluid? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "CLIN150" AND lab.fluid = "Other Body Fluid" |
How many draft picks are there at the linebacker position? | CREATE TABLE table_1511 ("Pick #" real,"NFL Team" text,"Player" text,"Position" text,"College" text) | SELECT COUNT("Pick #") FROM table_1511 WHERE "Position" = 'Linebacker' |
Who is the opposing team when the game was played on the Shea Stadium? | CREATE TABLE table_17386066_2 (opponent VARCHAR,stadium VARCHAR) | SELECT opponent FROM table_17386066_2 WHERE stadium = "Shea stadium" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.