instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
List the names of climbers in descending order of points.
CREATE TABLE climber (Name VARCHAR,Points VARCHAR)
SELECT Name FROM climber ORDER BY Points DESC
find out the number of patients who had aortography procedure and are less than 89 years of age.
CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag text,admission_location text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "89" AND procedures.long_title = "Aortography"
I want to know the crowd with a home team of carlton
CREATE TABLE table_name_46 (crowd INTEGER,home_team VARCHAR)
SELECT SUM(crowd) FROM table_name_46 WHERE home_team = "carlton"
the sum of 2009 with rank of 5 and 2010 less than 76.5 is what?
CREATE TABLE table_5615 ("Rank" real,"Airline" text,"2012" real,"2011" real,"2010" real,"2009" real)
SELECT SUM("2009") FROM table_5615 WHERE "Rank" = '5' AND "2010" < '76.5'
How many ends won were smaller than 46.0?
CREATE TABLE table_3074 ("Country" text,"Skip" text,"W" real,"L" real,"PF" real,"PA" real,"Ends Won" real,"Ends Lost" real,"Blank Ends" real,"Stolen Ends" real,"Shot %" text)
SELECT MAX("W") FROM table_3074 WHERE "Ends Won" < '46.0'
Are there any courses that 'll be beneficial in taking before taking GTBOOKS 993 ?
CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_credit varchar,repeat_term varchar,test_id varchar)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE program_course (program_id int,course_id int,workload int,categ...
SELECT DISTINCT advisory_requirement FROM course WHERE department = 'GTBOOKS' AND number = 993
when was the first measurement of patient 6215's arterial bp mean on the first icu visit?
CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)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...
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 = 6215) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.itemid IN (S...
What was the record where the opponent was @ Orioles and the loss was to Leal (5-4)?
CREATE TABLE table_name_5 (record VARCHAR,opponent VARCHAR,loss VARCHAR)
SELECT record FROM table_name_5 WHERE opponent = "@ orioles" AND loss = "leal (5-4)"
Show me about the distribution of ACC_Road and Team_ID , and group by attribute ACC_Home in a bar chart, and show by the x-axis in asc please.
CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,Enrollment real,Nickname text,Primary_conference text)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_Perce...
SELECT ACC_Road, Team_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY ACC_Road
What week shows for december 31, 1993?
CREATE TABLE table_39709 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" text)
SELECT COUNT("Week") FROM table_39709 WHERE "Date" = 'december 31, 1993'
Who was the opponent in the math that was played in Nice on a clay court?
CREATE TABLE table_45440 ("Outcome" text,"Date" text,"Tournament" text,"Surface" text,"Opponent" text,"Score" text)
SELECT "Opponent" FROM table_45440 WHERE "Surface" = 'clay' AND "Tournament" = 'nice'
What is the nickname of the baby with the birth weight of 730g (23.5 oz.)?
CREATE TABLE table_78042 ("Full Name" text,"Nickname" text,"Gender" text,"Weight at birth" text,"Meaning" text)
SELECT "Nickname" FROM table_78042 WHERE "Weight at birth" = '730g (23.5 oz.)'
in 2102, how many times patient 84286 visited hospital?
CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id n...
SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 84286 AND STRFTIME('%y', admissions.admittime) = '2102'
What was the attendance for the game that went 2:42?
CREATE TABLE table_68451 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Time" text,"Record" text)
SELECT MAX("Attendance") FROM table_68451 WHERE "Time" = '2:42'
Next semester , what upper-level electives are offered that do n't meet on Monday or Friday ?
CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE area (course_id int,area varchar)CREATE TABLE program (program_id int,name varchar,college varchar,introduction ...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course_offering.friday = 'N' AND course_offering.monday = 'N' AND course.course_id = course_offering.course_id AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course...
What is the weekly rank of the episode with a 14 share whose original airdate was April 20, 2010?
CREATE TABLE table_3271 ("Episode Number" text,"Episode" text,"Original Airdate" text,"Rating" text,"Share" text,"Rating/Share (18\u201349)" text,"Viewers (millions)" text,"Weekly Rank" real)
SELECT "Weekly Rank" FROM table_3271 WHERE "Share" = '14' AND "Original Airdate" = 'April 20, 2010'
Please show me how many employees working on different countries using a bar chart.
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 decimal(2,2),MANAGER_ID decimal(6,0),DEPARTMENT_ID decimal(4,0))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0)...
SELECT COUNTRY_NAME, COUNT(COUNTRY_NAME) FROM countries GROUP BY COUNTRY_NAME
What result has texas longhorns as the opponent?
CREATE TABLE table_39764 ("Season" real,"Bowl game" text,"Result" text,"Opponent" text,"Stadium" text,"Location" text,"Attendance" text)
SELECT "Result" FROM table_39764 WHERE "Opponent" = 'texas longhorns'
provide the number of patients categorized under hematology lab test who are diagnosed with chronic combined systolic and diastolic heart failure.
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 lab (subject_id text,hadm_id text,itemid text,charttime tex...
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 = "Chr syst/diastl hrt fail" AND lab."CATEGORY" = "Hematology"
181 is how big ?
CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_cre...
SELECT DISTINCT num_enrolled FROM course WHERE department = 'EECS' AND number = 181
What's the greek designation of the new york chapter with a charter date of april 23, 2005?
CREATE TABLE table_name_74 (greek_designation VARCHAR,us_state_district VARCHAR,charter_date VARCHAR)
SELECT greek_designation FROM table_name_74 WHERE us_state_district = "new york" AND charter_date = "april 23, 2005"
What's the heat in the lane less than 3 with a time of 14:48.39?
CREATE TABLE table_65132 ("Heat" real,"Lane" real,"Name" text,"Nationality" text,"Time" text)
SELECT AVG("Heat") FROM table_65132 WHERE "Lane" < '3' AND "Time" = '14:48.39'
Old questions with no answers.
CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayName text,LastEditDate time,LastActivityDate time,Title text,Ta...
SELECT Q.Id AS "post_link", Q.ViewCount AS Views, Q.Score, Q.CreationDate AS "creation_date", Q.AnswerCount AS Answers FROM Posts AS Q WHERE Q.PostTypeId = 1 AND Q.ClosedDate IS NULL AND Q.CommunityOwnedDate IS NULL AND Q.CreationDate < @maxAskTime AND Q.CreationDate > @minAskTime AND Q.AnswerCount = 0 AND Q.Score >= '...
Who directed 'People who use people'?
CREATE TABLE table_22124 ("No. in series" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Prod. code" real,"Viewers (millions)" text)
SELECT "Directed by" FROM table_22124 WHERE "Title" = 'People Who Use People'
Which Grand Prix did Nello Pagani win?
CREATE TABLE table_32337 ("Name" text,"Circuit" text,"Date" text,"Winning driver" text,"Winning constructor" text,"Report" text)
SELECT "Name" FROM table_32337 WHERE "Winning driver" = 'nello pagani'
WHAT IS THE OVERALL AVERAGE WITH A 22 PICK, FROM RICE COLLEGE, AND ROUND BIGGER THAN 10?
CREATE TABLE table_47320 ("Round" real,"Pick" real,"Overall" real,"Name" text,"Position" text,"College" text)
SELECT AVG("Overall") FROM table_47320 WHERE "Pick" = '22' AND "College" = 'rice' AND "Round" > '10'
How many channels are there in the Greater Tokyo area?
CREATE TABLE table_2638104_1 (channel VARCHAR,broadcast_area VARCHAR)
SELECT COUNT(channel) FROM table_2638104_1 WHERE broadcast_area = "Greater Tokyo"
has patient 027-136480 had in 2105 been diagnosed with diaphragmatic injury?
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 microlab (microlabid number,patientunitstayid number,culturesite text,orga...
SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-136480')) AND diagnosis.diagnosisname = 'diaphragmatic injury' AND STRFT...
Which ground is match 4 held on?
CREATE TABLE table_58573 ("Match" real,"Date" text,"Competition or tour" text,"Ground" text,"Opponent" text,"Score1" text)
SELECT "Ground" FROM table_58573 WHERE "Match" = '4'
what were the four most commonly prescribed drugs at the same time , among the patients that were prescribed with bupropion hcl?
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 chartevents (row_id number,subject_id number,hadm_id number,ic...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'bupropion hcl') AS t1 JOIN (SELECT admissions.subject_id, prescri...
Stacked bar of date in locaton to and the number of date in locaton to colored by Location_Code, rank in desc by the y axis.
CREATE TABLE All_Documents (Document_ID INTEGER,Date_Stored DATETIME,Document_Type_Code CHAR(15),Document_Name CHAR(255),Document_Description CHAR(255),Other_Details VARCHAR(255))CREATE TABLE Roles (Role_Code CHAR(15),Role_Name VARCHAR(255),Role_Description VARCHAR(255))CREATE TABLE Documents_to_be_Destroyed (Document_...
SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations GROUP BY Location_Code ORDER BY COUNT(Date_in_Locaton_To) DESC
before week 12 what was the attendance on 1983-11-21?
CREATE TABLE table_35472 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Game site" text,"Attendance" real)
SELECT SUM("Attendance") FROM table_35472 WHERE "Date" = '1983-11-21' AND "Week" < '12'
was patient 007-15837 on any volume (ml)-lactated ringers infusion in this hospital encounter?
CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,ob...
SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-15837' AND patient.hospitaldischargetime IS NULL)) AND intakeoutpu...
Surface of clay, and a Partnering of j lio silva had what score?
CREATE TABLE table_35382 ("Date" text,"Tournament" text,"Surface" text,"Partnering" text,"Opponents" text,"Score" text)
SELECT "Score" FROM table_35382 WHERE "Surface" = 'clay' AND "Partnering" = 'júlio silva'
find the number of patients less than 68 years of age whose drug code is adva250ih.
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 demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,la...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "68" AND prescriptions.formulary_drug_cd = "ADVA250IH"
give me the number of patients whose diagnoses long title is acute diastolic heart failure 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 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.long_title = "Acute diastolic heart failure" AND lab.fluid = "Ascites"
give me the number of patients whose primary disease is acute subdural hematoma and year of birth is less than 2053?
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 WHERE demographic.diagnosis = "ACUTE SUBDURAL HEMATOMA" AND demographic.dob_year < "2053"
Find the dates of the tests taken with result 'Pass', and count them by a line chart
CREATE TABLE Course_Authors_and_Tutors (author_id INTEGER,author_tutor_ATB VARCHAR(3),login_name VARCHAR(40),password VARCHAR(40),personal_name VARCHAR(80),middle_name VARCHAR(80),family_name VARCHAR(80),gender_mf VARCHAR(1),address_line_1 VARCHAR(80))CREATE TABLE Student_Tests_Taken (registration_id INTEGER,date_test_...
SELECT date_test_taken, COUNT(date_test_taken) FROM Student_Tests_Taken WHERE test_result = "Pass"
List each test result and its count in descending order of count by a bar chart.
CREATE TABLE Subjects (subject_id INTEGER,subject_name VARCHAR(120))CREATE TABLE Students (student_id INTEGER,date_of_registration DATETIME,date_of_latest_logon DATETIME,login_name VARCHAR(40),password VARCHAR(10),personal_name VARCHAR(40),middle_name VARCHAR(40),family_name VARCHAR(40))CREATE TABLE Courses (course_id ...
SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC
What is the author of the submission with the highest score?
CREATE TABLE submission (Author VARCHAR,Scores VARCHAR)
SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1
What is the highest Pick, when College is 'Syracuse', and when Overall is less than 18?
CREATE TABLE table_46696 ("Round" real,"Pick" real,"Overall" real,"Name" text,"Position" text,"College" text)
SELECT MAX("Pick") FROM table_46696 WHERE "College" = 'syracuse' AND "Overall" < '18'
Name the # tubes with Det/Pre-amp of x and audio amp of x x (push-pull)
CREATE TABLE table_66729 ("# Tubes" text,"Converter" text,"Det/Pre-amp" text,"Audio Amp" text,"Rectifier" text)
SELECT "# Tubes" FROM table_66729 WHERE "Det/Pre-amp" = 'x' AND "Audio Amp" = 'x x (push-pull)'
What position does the Colorado Rapids pick after 15 play?
CREATE TABLE table_name_35 (position VARCHAR,mls_team VARCHAR,pick__number VARCHAR)
SELECT position FROM table_name_35 WHERE mls_team = "colorado rapids" AND pick__number > 15
had patient 006-254182 in 01/last year been given a esr lab test?
CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult nu...
SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-254182')) AND lab.labname = 'esr' AND DATETIME(lab.labresulttime, 'start of year') =...
when did patient 23070 visit the hospital last in 2105?
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 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,inti...
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 23070 AND STRFTIME('%y', admissions.admittime) = '2105' ORDER BY admissions.admittime DESC LIMIT 1
What is the 1999 for an A 1991, and a 1r 1997?
CREATE TABLE table_name_45 (Id VARCHAR)
SELECT 1999 FROM table_name_45 WHERE 1991 = "a" AND 1997 = "1r"
What is the theme for the original artist Alicia Keys?
CREATE TABLE table_28483 ("Week #" text,"Theme" text,"Song choice" text,"Original artist" text,"Order #" text,"Result" text)
SELECT "Theme" FROM table_28483 WHERE "Original artist" = 'Alicia Keys'
Show the relationship between account name and the number of transactions for each account in a scatter chart.
CREATE TABLE Order_Items (order_item_id INTEGER,order_id INTEGER,product_id INTEGER,product_quantity VARCHAR(50),other_order_item_details VARCHAR(255))CREATE TABLE Product_Categories (production_type_code VARCHAR(15),product_type_description VARCHAR(80),vat_rating DECIMAL(19,4))CREATE TABLE Products (product_id INTEGER...
SELECT account_name, COUNT(*) FROM Financial_Transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id
Which Plautdietsch has Dutch of maken?
CREATE TABLE table_59085 ("German" text,"Low German" text,"Plautdietsch" text,"Dutch" text,"English" text)
SELECT "Plautdietsch" FROM table_59085 WHERE "Dutch" = 'maken'
What aggregate has a 0-0 1st leg, and is from Instituto?
CREATE TABLE table_36088 ("Home (1st leg)" text,"Home (2nd leg)" text,"1st Leg" text,"2nd leg" text,"Aggregate" text)
SELECT "Aggregate" FROM table_36088 WHERE "1st Leg" = '0-0' AND "Home (2nd leg)" = 'instituto'
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, draw a bar chart about the distribution of job_id and the average of employee_id , and group by attribute job_id, could you order from low to high by the total number?
CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))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,J...
SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY AVG(EMPLOYEE_ID)
How many different contents are offered by the Qualsiasi Tranne Sky HD package?
CREATE TABLE table_15887683_3 (content VARCHAR,package_option VARCHAR)
SELECT COUNT(content) FROM table_15887683_3 WHERE package_option = "qualsiasi tranne Sky HD"
What is the Series, when the Season is after 2008, when the value for Podiums is 3, and when the Position is 8th?
CREATE TABLE table_67067 ("Season" real,"Series" text,"Wins" text,"Podiums" text,"Position" text)
SELECT "Series" FROM table_67067 WHERE "Season" > '2008' AND "Podiums" = '3' AND "Position" = '8th'
how many for floysvik and christer tornell is 7?
CREATE TABLE table_30667 ("Couple" text,"Style" text,"Music" text,"Trine Dehli Cleve" real,"Tor Fl\u00f8ysvik" real,"Karianne Gulliksen" real,"Christer Tornell" real,"Total" real)
SELECT COUNT("Tor Fl\u00f8ysvik") FROM table_30667 WHERE "Christer Tornell" = '7'
Of all the courses , has John Nanos ever taught CHE 485 ?
CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE course_tags_count (course_id int,clear_grading int,pop_quiz int,group_projects int,inspirational int,long_lectures int,extra_credit int,few_tests int,good_feedback int,tough_tests int,heavy_papers int,cares_for_students int,heavy_assignments ...
SELECT COUNT(*) > 0 FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'CHE' AND course.number = 485 AND instructor.name LIKE '%John Nanos%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offe...
Tell me the average original week for soldier field
CREATE TABLE table_32086 ("Original week" real,"Date" text,"Opponent" text,"Result" text,"Venue" text)
SELECT AVG("Original week") FROM table_32086 WHERE "Venue" = 'soldier field'
history of hiv
CREATE TABLE table_train_211 ("id" int,"systolic_blood_pressure_sbp" int,"hiv_infection" bool,"hemoglobin_a1c_hba1c" float,"diastolic_blood_pressure_dbp" int,"body_mass_index_bmi" float,"age" float,"NOUSE" float)
SELECT * FROM table_train_211 WHERE hiv_infection = 1
What is the average capacity for the vehicle having a navigator of Macneall?
CREATE TABLE table_65050 ("Driver" text,"Navigator" text,"Vehicle" text,"Class" text,"Capacity" real,"Total Time" text,"Margin" text)
SELECT AVG("Capacity") FROM table_65050 WHERE "Navigator" = 'macneall'
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about employee_id over the job_id .
CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE employees (EMPLOYEE_ID decimal(6,...
SELECT JOB_ID, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
How many times does November 3rd occur when January 15, 1991 does?
CREATE TABLE table_25235489_2 (november_3 VARCHAR,january_15_16 VARCHAR)
SELECT COUNT(november_3) FROM table_25235489_2 WHERE january_15_16 = "January 15, 1991"
What was the revising convention of the field 'trimmers and stokers'?
CREATE TABLE table_2209 ("ILO code" text,"Field" text,"conclusion date" text,"entry into force" text,"closure for signature" text,"Parties (April 2011)" real,"Denunciations (September 2011)" real,"revising convention(s)" text,"text and ratifications" text)
SELECT "revising convention(s)" FROM table_2209 WHERE "Field" = 'trimmers and stokers'
Name the date of vacancy for manuel pellegrini
CREATE TABLE table_2667 ("Team" text,"Outgoing manager" text,"Manner of departure" text,"Date of vacancy" text,"Replaced by" text,"Date of appointment" text,"Position in table" text)
SELECT "Date of vacancy" FROM table_2667 WHERE "Outgoing manager" = 'Manuel Pellegrini'
what were the top three prescription drugs among patients of age of 30s during this year?
CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,ob...
SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 30 AND 39) AND DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TIME(...
What 1941 has N/A as 1945, N/A for 1948, and 9 for 1953?
CREATE TABLE table_40819 ("1935" text,"1936" text,"1937" text,"1938" text,"1939" text,"1940" text,"1941" text,"1943" text,"1945" text,"1946" text,"1947" text,"1948" text,"1949" text,"1950" text,"1951" text,"1952" text,"1953" text)
SELECT "1941" FROM table_40819 WHERE "1945" = 'n/a' AND "1948" = 'n/a' AND "1953" = '9'
Tell me the total number of grid for laps of 52
CREATE TABLE table_55495 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real)
SELECT COUNT("Grid") FROM table_55495 WHERE "Laps" = '52'
For the sale details with amount smaller than 3000, visualize a bar chart that x-axis is the sales details and count them as y, and rank by the y axis from low to high please.
CREATE TABLE Lots (lot_id INTEGER,investor_id INTEGER,lot_details VARCHAR(255))CREATE TABLE Transactions (transaction_id INTEGER,investor_id INTEGER,transaction_type_code VARCHAR(10),date_of_transaction DATETIME,amount_of_transaction DECIMAL(19,4),share_count VARCHAR(40),other_details VARCHAR(255))CREATE TABLE Sales (s...
SELECT sales_details, COUNT(sales_details) FROM Sales AS T1 JOIN Transactions AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000 GROUP BY sales_details ORDER BY COUNT(sales_details)
How many opponents were there when the opponent was Arizona State?
CREATE TABLE table_25322 ("Game" real,"Date" text,"Opponent" text,"Result" text,"Cowboys points" real,"Opponents" real,"Record" text)
SELECT MIN("Opponents") FROM table_25322 WHERE "Opponent" = 'Arizona State'
What is the title of ahaziah?
CREATE TABLE table_name_16 (title VARCHAR,name VARCHAR)
SELECT title FROM table_name_16 WHERE name = "ahaziah"
Which Opponent has an Event of jungle fight 5?
CREATE TABLE table_48093 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text)
SELECT "Opponent" FROM table_48093 WHERE "Event" = 'jungle fight 5'
Show the number of accounts for all accounts by the customer with first name 'Meaghan' opened in each day Bin the account open day by year interval in a bar chart, and list in desc by the date_account_opened.
CREATE TABLE Invoice_Line_Items (order_item_id INTEGER,invoice_number INTEGER,product_id INTEGER,product_title VARCHAR(80),product_quantity VARCHAR(50),product_price DECIMAL(19,4),derived_product_cost DECIMAL(19,4),derived_vat_payable DECIMAL(19,4),derived_total_cost DECIMAL(19,4))CREATE TABLE Products (product_id INTE...
SELECT date_account_opened, COUNT(date_account_opened) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan' ORDER BY date_account_opened DESC
What is every previous class when the previous number is 61323?
CREATE TABLE table_1976 ("Number" text,"Previous Number(s)" real,"Previous Class" text,"Converted" real,"Use" text,"Withdrawn" real,"Disposal" text)
SELECT "Previous Class" FROM table_1976 WHERE "Previous Number(s)" = '61323'
how many black/haitian patients were give the drug meropenem?
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND prescriptions.drug = "Meropenem"
What's the Pick average that has a School/Club Team of Alabama, with a Round that's smaller than 9?
CREATE TABLE table_name_22 (pick INTEGER,school_club_team VARCHAR,round VARCHAR)
SELECT AVG(pick) FROM table_name_22 WHERE school_club_team = "alabama" AND round < 9
taking medication for lyperlipidemia ldl > 160
CREATE TABLE table_train_98 ("id" int,"mini_mental_state_examination_mmse" int,"stroke" bool,"lyperlipidemia_ldl" int,"allergy_to_milk" bool,"allergy_to_soy" bool,"body_mass_index_bmi" float,"NOUSE" float)
SELECT * FROM table_train_98 WHERE lyperlipidemia_ldl > 160
what is the minimum hospital cost in which are involved influenza vaccination until 2104?
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 MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'influenza vaccination')) AND STRFTIME('%y', cost.chargeti...
how many reverse with series being iii series
CREATE TABLE table_17597 ("Year" real,"Denomination" text,"Alloy" text,"Reverse" text,"Diameter" text,"Weight" text,"Obverse" text,"Mintage" real,"Series" text)
SELECT COUNT("Reverse") FROM table_17597 WHERE "Series" = 'III series'
Who was the winning driver of the Argentine Grand Prix?
CREATE TABLE table_53249 ("Race" text,"Circuit" text,"Date" text,"Pole position" text,"Winning driver" text,"Constructor" text,"Tyre" text,"Report" text)
SELECT "Winning driver" FROM table_53249 WHERE "Race" = 'argentine grand prix'
What were the dates administered when the lead margin was larger than 14 and the poll source was Research 2000?
CREATE TABLE table_name_72 (dates_administered VARCHAR,lead_margin VARCHAR,poll_source VARCHAR)
SELECT dates_administered FROM table_name_72 WHERE lead_margin > 14 AND poll_source = "research 2000"
Negative scored questions percentage per year.
CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE Users...
SELECT SUM(CASE WHEN Score < 0 THEN 1 ELSE 0 END) * 100 / COUNT(*) AS percentage, COUNT(*) AS total, SUM(CASE WHEN Score < 0 THEN 1 ELSE 0 END) AS negatice_count FROM Posts WHERE YEAR(CreationDate) = @year AND PostTypeId = 1
What's the summit when the rank is less than 2 and has a col (m) of 0?
CREATE TABLE table_65792 ("Rank" real,"Summit" text,"Country" text,"Island" text,"Col (m)" real)
SELECT "Summit" FROM table_65792 WHERE "Col (m)" = '0' AND "Rank" < '2'
how many films are listed in this filmography ?
CREATE TABLE table_203_239 (id number,"year" number,"title" text,"chinese title" text,"role" text,"notes" text)
SELECT COUNT("title") FROM table_203_239
report the number of dead patients who had levofloxacin prescription.
CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime te...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "1" AND prescriptions.drug = "Levofloxacin"
what is age and discharge location of subject id 2560?
CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag text,admission_location text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ...
SELECT demographic.age, demographic.discharge_location FROM demographic WHERE demographic.subject_id = "2560"
WHAT IS THE TOURNAMENT WITH 2008 AND 2011 WITH A?
CREATE TABLE table_61648 ("Tournament" text,"2005" text,"2006" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text)
SELECT "Tournament" FROM table_61648 WHERE "2008" = 'a' AND "2011" = 'a'
what is the cheapest round trip flight from ATLANTA to PITTSBURGH
CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE compartment_class (compartment varchar,class_type varchar)CREATE TABLE state (state_code text,state_name text,country_name text)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,conn...
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, fare, flight, flight_fare 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...
For cities with a census of 296000 in 1940, what was their census in 1920?
CREATE TABLE table_23346 ("Rank" real,"City" text,"1890 census" text,"1910 census" real,"1920 census" real,"1930 census" real,"1940 census" real)
SELECT "1920 census" FROM table_23346 WHERE "1940 census" = '296000'
how many patients with atrial fibrillation\thoracoscopic maze procedure bilateral/sda were admitted before the year 2190?
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 WHERE demographic.diagnosis = "ATRIAL FIBRILLATION\THORACOSCOPIC MAZE PROCEDURE BILATERAL/SDA" AND demographic.admityear < "2190"
Name the college/junior/club team for left wing
CREATE TABLE table_72578 ("Pick #" real,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text)
SELECT "College/junior/club team" FROM table_72578 WHERE "Position" = 'Left Wing'
number of posts per month by tagname.
CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount number,LastAutoRename time,Score number,ApprovedByUserId number,ApprovalDate time)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate...
SELECT COUNT(Posts.Id), MONTH(Posts.CreationDate), YEAR(Posts.CreationDate), Tags.TagName FROM Posts JOIN PostTags ON Posts.Id = PostTags.PostId JOIN Tags ON Tags.Id = PostTags.TagId WHERE Tags.TagName = 'office-js' GROUP BY YEAR(Posts.CreationDate), MONTH(Posts.CreationDate), Tags.TagName
who was the first opponent he lost too ?
CREATE TABLE table_203_844 (id number,"res." text,"record" text,"opponent" text,"method" text,"event" text,"date" text,"round" number,"time" text,"location" text,"notes" text)
SELECT "opponent" FROM table_203_844 WHERE "res." = 'loss' ORDER BY "date" LIMIT 1
Who had the smallest points in 3rd place but had a position greater than 8?
CREATE TABLE table_name_9 (points INTEGER,place VARCHAR,position VARCHAR)
SELECT MIN(points) FROM table_name_9 WHERE place = "3rd" AND position > 8
How many touchdowns were made where field goals were less than 0?
CREATE TABLE table_5010 ("Player" text,"Touchdowns" real,"Extra points" real,"Field goals" real,"Points" real)
SELECT SUM("Touchdowns") FROM table_5010 WHERE "Field goals" < '0'
What was the date of the game with a save of ||3,073?
CREATE TABLE table_37969 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Save" text)
SELECT "Date" FROM table_37969 WHERE "Save" = '||3,073'
does patient 50065 have the result of his or her microbiology test since 2101?
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 d_icd_diagnoses (row_id number,icd9_code text,short_title text...
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 50065) AND STRFTIME('%y', microbiologyevents.charttime) >= '2101'
What date did the episode air that had n/a for it's bbc three weekly ranking?
CREATE TABLE table_24399615_4 (airdate VARCHAR,bbc_three_weekly_ranking VARCHAR)
SELECT airdate FROM table_24399615_4 WHERE bbc_three_weekly_ranking = "N/A"
A scatter chart shows the correlation between ACC_Percent and All_Games_Percent , and group by attribute All_Home.
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_Percent, All_Games_Percent FROM basketball_match GROUP BY All_Home
What are the minimum and maximum crime rate of counties?
CREATE TABLE city (city_id number,county_id number,name text,white number,black number,amerindian number,asian number,multiracial number,hispanic number)CREATE TABLE county_public_safety (county_id number,name text,population number,police_officers number,residents_per_officer number,case_burden number,crime_rate numbe...
SELECT MIN(crime_rate), MAX(crime_rate) FROM county_public_safety
What is Gold, when Rank is 7?
CREATE TABLE table_46939 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real)
SELECT "Gold" FROM table_46939 WHERE "Rank" = '7'
What is the year of the ceremony with the original title ni iji sin?
CREATE TABLE table_42599 ("Year (Ceremony)" text,"Film title used in nomination" text,"Original title" text,"Director(s)" text,"Result" text)
SELECT "Year (Ceremony)" FROM table_42599 WHERE "Original title" = 'ničiji sin'
when did patient 022-142620 receive an intake for the first time on 04/30/last year?
CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE treatment (treatmentid number,patientunitstayi...
SELECT 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 = '022-142620')) AND intakeoutput.cellpath LIKE '%intake...