answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT HIRE_DATE, SALARY FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE DESC | For those employees who did not have any job in the past, visualize a line chart about the change of salary over hire_date , order by the x-axis from high to low please. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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 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 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),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
) |
SELECT date FROM table_22879323_10 WHERE record = "11-67" | What date was the record 11-67? | CREATE TABLE table_22879323_10 (date VARCHAR, record VARCHAR) |
SELECT written_by FROM table_20538157_2 WHERE no_in_season = 20 | Who were the writers of episode 20? | CREATE TABLE table_20538157_2 (written_by VARCHAR, no_in_season VARCHAR) |
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'sodium chloride 0.9%') | what is the number of patients that sodium chloride 0.9% is prescribed to? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
) |
SELECT COUNT(high_rebounds) FROM table_22879323_10 WHERE date = "April 7" | How many high rebounds were there on April 7? | CREATE TABLE table_22879323_10 (high_rebounds VARCHAR, date VARCHAR) |
SELECT county FROM table_20573232_1 WHERE others_number = 5 | What county has others at 5? | CREATE TABLE table_20573232_1 (county VARCHAR, others_number VARCHAR) |
SELECT MIN(interview) FROM table_name_86 WHERE state = "texas" AND average > 9.531 | What is the lowest interview of Texas, with an average larger than 9.531? | CREATE TABLE table_name_86 (
interview INTEGER,
state VARCHAR,
average VARCHAR
) |
SELECT high_points FROM table_22879323_10 WHERE high_rebounds = "Terrence Williams (8)" | What was the high points when rebounds were Terrence Williams (8)? | CREATE TABLE table_22879323_10 (high_points VARCHAR, high_rebounds VARCHAR) |
SELECT others_percentage FROM table_20573232_1 WHERE mccain_percentage = "57.7%" | What is the percentage of others when McCain is at 57.7% | CREATE TABLE table_20573232_1 (others_percentage VARCHAR, mccain_percentage VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "0" AND demographic.dob_year < "2126" | give me the number of patients born before 2126 who are still alive. | 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 text,
admittime text,
dischtime text,
admityear 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 text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) |
SELECT high_assists FROM table_22879323_6 WHERE record = "2-29" | When the record was 2-29 who had the most assists? | CREATE TABLE table_22879323_6 (high_assists VARCHAR, record VARCHAR) |
SELECT nader_percentage FROM table_20573232_1 WHERE obama_percentage = "44.6%" | What is Nader's percentage when Obama is 44.6%? | CREATE TABLE table_20573232_1 (nader_percentage VARCHAR, obama_percentage VARCHAR) |
SELECT median_household_income FROM table_name_56 WHERE median_family_income = "$46,616" | What is the Median household income associated with a median family income of $46,616? | CREATE TABLE table_name_56 (
median_household_income VARCHAR,
median_family_income VARCHAR
) |
SELECT high_points FROM table_22879323_6 WHERE team = "Houston" | When we played Houston who had the most points? | CREATE TABLE table_22879323_6 (high_points VARCHAR, team VARCHAR) |
SELECT location_s_ FROM table_2064747_1 WHERE accreditation = "COE" | What schools are accredited by COE? | CREATE TABLE table_2064747_1 (location_s_ VARCHAR, accreditation VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2166" AND procedures.long_title = "Exteriorization of small intestine" | how many patients are admitted before the year 2166 and followed the procedure exteriorization of small intestine? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title 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 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 text,
admittime text,
dischtime text,
admityear text
) |
SELECT COUNT(high_points) FROM table_22879323_9 WHERE location_attendance = "Ford Center" | Name the number of high points for ford center | CREATE TABLE table_22879323_9 (high_points VARCHAR, location_attendance VARCHAR) |
SELECT location_s_ FROM table_2064747_1 WHERE founded = 1927 | Where was there a school founded in 1927? | CREATE TABLE table_2064747_1 (location_s_ VARCHAR, founded VARCHAR) |
SELECT "name" FROM table_71533 WHERE "USGS Map" = 'clear lake' | Which name has a USGS Map of clear lake? | CREATE TABLE table_71533 (
"name" text,
"type" text,
"elevation" text,
"USGS Map" text,
"GNIS ID" real
) |
SELECT high_rebounds FROM table_22879323_9 WHERE location_attendance = "American Airlines Center" | Name the high rebounds for american airlines center | CREATE TABLE table_22879323_9 (high_rebounds VARCHAR, location_attendance VARCHAR) |
SELECT MIN(length__in_m_) FROM table_206361_2 WHERE average_climb___percentage_ = 59 | What is the minimum length of the locations where the average climb percentage is exactly 59%? | CREATE TABLE table_206361_2 (length__in_m_ INTEGER, average_climb___percentage_ VARCHAR) |
SELECT "Total viewers on FX+" FROM table_28753 WHERE "Total viewers" = '583,000' | Name the total viewers on fx+ for 583,000 total viewers | CREATE TABLE table_28753 (
"Episode number (Production number)" text,
"Title" text,
"Original air date" text,
"Total viewers on FX" text,
"Total viewers on FX+" text,
"Total viewers" text,
"Rank on channel" text
) |
SELECT record FROM table_22879323_9 WHERE score = "L 90–100 (OT)" | Name the record for l 90–100 (ot) | CREATE TABLE table_22879323_9 (record VARCHAR, score VARCHAR) |
SELECT MAX(kilometer) FROM table_206361_2 | What is the maximum number of km listed? | CREATE TABLE table_206361_2 (kilometer INTEGER) |
SELECT DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS "month", COUNT(q.Id) AS NumQuests FROM Posts AS q INNER JOIN PostTags AS pt ON q.Id = pt.PostId INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE q.PostTypeId = 1 AND q.CreationDate >= '2016-01-01 00:00:00' AND t.TagName IN (@Tag1) GROUP BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0), t.TagName | Question Count or Score growth over time by tag comparison. Plots total questions over time or total score over time, comparing up to 4 tags.
Reference: http://meta.stackoverflow.com/q/260570/331508 | CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
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 PostTags (
PostId number,
TagId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
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,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
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 CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
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,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
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 FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
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 ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE VoteTypes (
Id number,
Name text
) |
SELECT location_attendance FROM table_22879323_9 WHERE score = "L 83–106 (OT)" | Name the location attendance for l 83–106 (ot) | CREATE TABLE table_22879323_9 (location_attendance VARCHAR, score VARCHAR) |
SELECT COUNT(δs_) AS ‡__cal_mol_−1_k_−1 FROM table_2068719_1 WHERE _butadiene = "1,2-dimethylene-cyclohexane" | Name the number of δs ‡ /cal mol −1 k −1 for butadiene being 1,2-dimethylene-cyclohexane | CREATE TABLE table_2068719_1 (δs_ VARCHAR, _butadiene VARCHAR) |
SELECT COUNT("Year") FROM table_73716 WHERE "High School Principal" = 'Lynn Muscarella' AND "Superintendent" = 'Charlie Wiltse' | How many years was lynn muscarella the high school principal and charlie wiltse the superintendent? | CREATE TABLE table_73716 (
"Year" text,
"Superintendent" text,
"Middlesex Principal" text,
"Gorham Principal" text,
"Middle School Principal" text,
"High School Principal" text
) |
SELECT score FROM table_22883210_10 WHERE record = "49-31" | Name the score for 49-31 | CREATE TABLE table_22883210_10 (score VARCHAR, record VARCHAR) |
SELECT for___percentage_ FROM table_20683381_3 WHERE against___percentage_ = "17,874 (33.2)" | When 17,874 (33.2) is the percentage against what is the percentage for? | CREATE TABLE table_20683381_3 (for___percentage_ VARCHAR, against___percentage_ VARCHAR) |
SELECT (SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8016)) AND DATETIME(inputevents_cv.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') AND STRFTIME('%d', inputevents_cv.charttime) = '23') - (SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8016)) AND DATETIME(outputevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') AND STRFTIME('%d', outputevents.charttime) = '23') | calculate the difference between patient 8016's total output and the total input on last month/23. | CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
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 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 labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE 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 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,
outtime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
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 cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
) |
SELECT location_attendance FROM table_22883210_10 WHERE team = "Minnesota" | Name the location attendance for minnesota | CREATE TABLE table_22883210_10 (location_attendance VARCHAR, team VARCHAR) |
SELECT COUNT(electorate) FROM table_20683381_3 WHERE for___percentage_ = "27,822 (72.3)" | When 27,822 (72.3) is the percentage for how many electorate measurements are there? | CREATE TABLE table_20683381_3 (electorate VARCHAR, for___percentage_ VARCHAR) |
SELECT date, COUNT(date) FROM weather WHERE max_temperature_f >= 80 GROUP BY date | Please show the trend about the number of days with max temperature reaches 80 change over dates. | CREATE TABLE station (
id INTEGER,
name TEXT,
lat NUMERIC,
long NUMERIC,
dock_count INTEGER,
city TEXT,
installation_date TEXT
)
CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
mean_dew_point_f INTEGER,
min_dew_point_f INTEGER,
max_humidity INTEGER,
mean_humidity INTEGER,
min_humidity INTEGER,
max_sea_level_pressure_inches NUMERIC,
mean_sea_level_pressure_inches NUMERIC,
min_sea_level_pressure_inches NUMERIC,
max_visibility_miles INTEGER,
mean_visibility_miles INTEGER,
min_visibility_miles INTEGER,
max_wind_Speed_mph INTEGER,
mean_wind_speed_mph INTEGER,
max_gust_speed_mph INTEGER,
precipitation_inches INTEGER,
cloud_cover INTEGER,
events TEXT,
wind_dir_degrees INTEGER,
zip_code INTEGER
)
CREATE TABLE trip (
id INTEGER,
duration INTEGER,
start_date TEXT,
start_station_name TEXT,
start_station_id INTEGER,
end_date TEXT,
end_station_name TEXT,
end_station_id INTEGER,
bike_id INTEGER,
subscription_type TEXT,
zip_code INTEGER
) |
SELECT location_attendance FROM table_22883210_7 WHERE record = "20-12" | What location had a record of 20-12, and how many people attended? | CREATE TABLE table_22883210_7 (location_attendance VARCHAR, record VARCHAR) |
SELECT total_poll___percentage_ FROM table_20683381_3 WHERE against___percentage_ = "13,895 (27.3)" | When 13,895 (27.3) is the percentage against what is the toll poll percentage? | CREATE TABLE table_20683381_3 (total_poll___percentage_ VARCHAR, against___percentage_ VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Routine circumcision" AND prescriptions.route = "NG" | provide the number of patients whose diagnoses short title is routine circumcision and drug route is ng? | 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,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id 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
) |
SELECT COUNT(score) FROM table_22883210_7 WHERE date = "January 18" | What was the total score for january 18? | CREATE TABLE table_22883210_7 (score VARCHAR, date VARCHAR) |
SELECT against___percentage_ FROM table_20683381_3 WHERE ±_yes_side_2008___percentage_ = "+18.1" | When +18.1 is the ± yes side 2008 percentage what is the percentage of against? | CREATE TABLE table_20683381_3 (against___percentage_ VARCHAR, ±_yes_side_2008___percentage_ VARCHAR) |
SELECT dept_name, COUNT(*) FROM student GROUP BY dept_name ORDER BY COUNT(*) DESC | Find the total number of students in each department Show bar chart, and I want to show in descending by the total number. | CREATE TABLE student (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
tot_cred numeric(3,0)
)
CREATE TABLE time_slot (
time_slot_id varchar(4),
day varchar(1),
start_hr numeric(2),
start_min numeric(2),
end_hr numeric(2),
end_min numeric(2)
)
CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABLE instructor (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2)
)
CREATE TABLE takes (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
grade varchar(2)
)
CREATE TABLE department (
dept_name varchar(20),
building varchar(15),
budget numeric(12,2)
)
CREATE TABLE teaches (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0)
)
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
room_number varchar(7),
time_slot_id varchar(4)
)
CREATE TABLE course (
course_id varchar(8),
title varchar(50),
dept_name varchar(20),
credits numeric(2,0)
)
CREATE TABLE classroom (
building varchar(15),
room_number varchar(7),
capacity numeric(4,0)
)
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
) |
SELECT location_attendance FROM table_22883210_7 WHERE game = 41 | Where was game 41 held, and how many people attended? | CREATE TABLE table_22883210_7 (location_attendance VARCHAR, game VARCHAR) |
SELECT for___percentage_ FROM table_20683381_3 WHERE total_poll___percentage_ = "60,254 (58.0)" | When 60,254 (58.0) is the toll poll percentage what is the for percentage? | CREATE TABLE table_20683381_3 (for___percentage_ VARCHAR, total_poll___percentage_ VARCHAR) |
SELECT "Total viewers (in millions)" FROM table_26323 WHERE "Rating" = '9.1' | If the rating is 9.1, what was the total viewers? | CREATE TABLE table_26323 (
"Episode number Production number" text,
"Title" text,
"Original airing" text,
"Rating" text,
"Share" real,
"Rating/share (18\u201349)" text,
"Total viewers (in millions)" text
) |
SELECT date FROM table_22883210_7 WHERE record = "23-13" | What was the date for the record 23-13? | CREATE TABLE table_22883210_7 (date VARCHAR, record VARCHAR) |
SELECT for___percentage_ FROM table_20683381_3 WHERE ±_yes_side_2008___percentage_ = "+20.3" | When +20.3 is the ± yes side 2008 (%) what is the for percentage? | CREATE TABLE table_20683381_3 (for___percentage_ VARCHAR, ±_yes_side_2008___percentage_ VARCHAR) |
SELECT "Status" FROM table_75802 WHERE "Notes" = 'n coelurosauria' | What is the Status of the dinosaur, whose notes are, 'n coelurosauria'? | CREATE TABLE table_75802 (
"Name" text,
"Novelty" text,
"Status" text,
"Authors" text,
"Location" text,
"Notes" text
) |
SELECT high_points FROM table_22883210_7 WHERE date = "January 20" | What was the high point for January 20? | CREATE TABLE table_22883210_7 (high_points VARCHAR, date VARCHAR) |
SELECT original_air_date FROM table_20704243_6 WHERE season__number = 11 | What was the original air date for season 11? | CREATE TABLE table_20704243_6 (original_air_date VARCHAR, season__number VARCHAR) |
SELECT SUM("Fall 09") FROM table_5188 WHERE "Maryland Counties" = 'allegany' AND "Fall 07" < '751' | What is the sum of all values in Fall 09 in Allegany county with Fall 07 less than 751? | CREATE TABLE table_5188 (
"Maryland Counties" text,
"Fall 05" real,
"Fall 06" real,
"Fall 07" real,
"Fall 08" real,
"Fall 09" real
) |
SELECT location_attendance FROM table_22883210_9 WHERE team = "Golden State" | What was the location and how many attended when Golden State played? | CREATE TABLE table_22883210_9 (location_attendance VARCHAR, team VARCHAR) |
SELECT title FROM table_20704243_6 WHERE directed_by = "John Rogers" | What episode did John Rogers direct? | CREATE TABLE table_20704243_6 (title VARCHAR, directed_by VARCHAR) |
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 = 'tromethamine') AS t1 JOIN (SELECT admissions.subject_id, prescriptions.drug, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id) AS t2 ON t1.subject_id = t2.subject_id WHERE DATETIME(t1.startdate) = DATETIME(t2.startdate) GROUP BY t2.drug) AS t3 WHERE t3.c1 <= 5 | among patients who were prescribed with tromethamine, what is the five most frequently prescribed drug at the same time,? | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
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 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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_procedures (
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,
valuenum number,
valueuom text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE 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,
outtime time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
) |
SELECT MAX(game) FROM table_22883210_9 WHERE team = "Cleveland" | What is the highest game number where the team was Cleveland? | CREATE TABLE table_22883210_9 (game INTEGER, team VARCHAR) |
SELECT directed_by FROM table_20704243_6 WHERE original_air_date = "July15,2012" | Who directed the episode that aired on july15,2012? | CREATE TABLE table_20704243_6 (directed_by VARCHAR, original_air_date VARCHAR) |
SELECT (SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19175)) AND STRFTIME('%y-%m-%d', inputevents_cv.charttime) = '2105-11-04') - (SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19175)) AND STRFTIME('%y-%m-%d', outputevents.charttime) = '2105-11-04') | what is the difference between the total output and the input sum of patient 19175 on 11/04/2105? | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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 cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost 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,
outtime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE 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_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE 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 prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
) |
SELECT MAX(nightly_rank) FROM table_22892217_4 | What is the highest numbered nightly rank for any episode? | CREATE TABLE table_22892217_4 (nightly_rank INTEGER) |
SELECT title FROM table_20704243_6 WHERE original_air_date = "August19,2012" | Which episode aired on august19,2012? | CREATE TABLE table_20704243_6 (title VARCHAR, original_air_date VARCHAR) |
SELECT "Attendance" FROM table_76804 WHERE "Opponent" = 'cincinnati bengals' | What was the attendance when the Cincinnati Bengals were the opponents? | CREATE TABLE table_76804 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) |
SELECT COUNT(location_attendance) FROM table_22893781_5 WHERE date = "December 2" | How many attended on december 2? | CREATE TABLE table_22893781_5 (location_attendance VARCHAR, date VARCHAR) |
SELECT weight__kg_m_ FROM table_2071644_2 WHERE cross_section_area__cm_2__ = "25.3" | What is the weight with a cross section area of 25.3? | CREATE TABLE table_2071644_2 (weight__kg_m_ VARCHAR, cross_section_area__cm_2__ VARCHAR) |
SELECT "Gold" FROM table_51492 WHERE "Bronze" = '17' AND "Total" = '31' | How many golds were there in a game that has 17 bronze and a total of 31? | CREATE TABLE table_51492 (
"Games" text,
"Gold" text,
"Silver" text,
"Bronze" text,
"Total" text,
"Rank" text
) |
SELECT team FROM table_22893781_5 WHERE date = "December 11" | Who was he opponent on december 11? | CREATE TABLE table_22893781_5 (team VARCHAR, date VARCHAR) |
SELECT COUNT(weight__kg_m_) FROM table_2071644_2 WHERE flange_width__mm_ = 304 | How many weights are there when the flange with is 304? | CREATE TABLE table_2071644_2 (weight__kg_m_ VARCHAR, flange_width__mm_ VARCHAR) |
SELECT demographic.admittime, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560" | Get the admission time and procedure icd9 code for the patient with patient id 2560. | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title 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 text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
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
) |
SELECT score FROM table_22893781_5 WHERE team = "Houston" | What was the score against houston? | CREATE TABLE table_22893781_5 (score VARCHAR, team VARCHAR) |
SELECT web_thickness__mm_ FROM table_2071644_2 WHERE flange_width__mm_ = 100 | What is the web thickness if the flange width is 100? | CREATE TABLE table_2071644_2 (web_thickness__mm_ VARCHAR, flange_width__mm_ VARCHAR) |
SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'unilat ing hern rep nos') AND STRFTIME('%y', procedures_icd.charttime) <= '2104') AS t1 JOIN (SELECT admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime FROM microbiologyevents JOIN admissions ON microbiologyevents.hadm_id = admissions.hadm_id WHERE STRFTIME('%y', microbiologyevents.charttime) <= '2104') AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND DATETIME(t2.charttime) BETWEEN DATETIME(t1.charttime) AND DATETIME(t1.charttime, '+2 month') GROUP BY t2.spec_type_desc) AS t3 WHERE t3.c1 <= 5 | what are the five most commonly given microbiology tests for patients who have previously had their unilat ing hern rep nos done within 2 months until 2104? | 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 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 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,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
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 d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_icd_diagnoses (
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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
) |
SELECT date FROM table_22893781_7 WHERE team = "@ Indiana" | when did the @ indiana game take place? | CREATE TABLE table_22893781_7 (date VARCHAR, team VARCHAR) |
SELECT weight__kg_m_ FROM table_2071644_2 WHERE cross_section_area__cm_2__ = "21.2" | If the cross-section area is 21.2, what is the weight? | CREATE TABLE table_2071644_2 (weight__kg_m_ VARCHAR, cross_section_area__cm_2__ VARCHAR) |
SELECT "Top 10" FROM table_3456 WHERE "Team(s)" = '#10 Phil Parsons Racing' AND "Avg. Finish" = '22.9' | What is every value of Top 10 when team is #10 Phil Parsons Racing and average finish is 22.9? | CREATE TABLE table_3456 (
"Year" real,
"Starts" real,
"Wins" real,
"Top 5" real,
"Top 10" real,
"Poles" real,
"Avg. Start" text,
"Avg. Finish" text,
"Winnings" text,
"Position" text,
"Team(s)" text
) |
SELECT score FROM table_22893781_6 WHERE location_attendance = "Madison Square Garden 18,828" | Name the score for madison square garden 18,828 | CREATE TABLE table_22893781_6 (score VARCHAR, location_attendance VARCHAR) |
SELECT flange_thickness__mm_ FROM table_2071644_2 WHERE weight__kg_m_ = "19.9" | What is the flange thickness when the weight is 19.9? | CREATE TABLE table_2071644_2 (flange_thickness__mm_ VARCHAR, weight__kg_m_ VARCHAR) |
SELECT score FROM table_name_65 WHERE date = "august 19" | What was the score on August 19? | CREATE TABLE table_name_65 (
score VARCHAR,
date VARCHAR
) |
SELECT COUNT(date) FROM table_22893781_6 WHERE team = "Dallas" | Name the number of date for dallas | CREATE TABLE table_22893781_6 (date VARCHAR, team VARCHAR) |
SELECT directedby FROM table_20726262_5 WHERE production_code = "4WAB05" | Who directed the episode with a production code of 4WAB05? | CREATE TABLE table_20726262_5 (directedby VARCHAR, production_code VARCHAR) |
SELECT transfers.wardid FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 81783 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND NOT transfers.wardid IS NULL ORDER BY transfers.intime DESC LIMIT 1 | whats the last ward id of patient 81783 during the first hospital encounter? | 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 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 diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label 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,
intime time,
outtime 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 chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
) |
SELECT high_assists FROM table_22893781_6 WHERE date = "January 15" | Name the high assists for january 15 | CREATE TABLE table_22893781_6 (high_assists VARCHAR, date VARCHAR) |
SELECT directedby FROM table_20726262_5 WHERE production_code = "4WAB04" | Who directed the episode with a production code of 4WAB04? | CREATE TABLE table_20726262_5 (directedby VARCHAR, production_code VARCHAR) |
SELECT engine FROM table_name_16 WHERE tire = "goodyear" AND sponsor = "herdez" | What is the engine of the goodyear tire and Herdez as a sponsor? | CREATE TABLE table_name_16 (
engine VARCHAR,
tire VARCHAR,
sponsor VARCHAR
) |
SELECT title FROM table_228973_5 WHERE original_air_date = "November 10, 1998" | What is the name of the episode that aired originally on November 10, 1998? | CREATE TABLE table_228973_5 (title VARCHAR, original_air_date VARCHAR) |
SELECT MIN(no_in_season) FROM table_20726262_6 WHERE directedby = "Karen Gaviola" | What episode was directed by Karen Gaviola? | CREATE TABLE table_20726262_6 (no_in_season INTEGER, directedby VARCHAR) |
SELECT "Time" FROM table_78578 WHERE "Grid" < '8' AND "Rider" = 'troy bayliss' | What is the time of Troy Bayliss with less than 8 grids? | CREATE TABLE table_78578 (
"Rider" text,
"Bike" text,
"Laps" real,
"Time" text,
"Grid" real
) |
SELECT MAX(no_in_series) FROM table_228973_5 WHERE original_air_date = "April 27, 1999" | What episode number in the series originally aired on April 27, 1999? | CREATE TABLE table_228973_5 (no_in_series INTEGER, original_air_date VARCHAR) |
SELECT score FROM table_20745706_1 WHERE date = "February 8, 1992" | What was the score on February 8, 1992? | CREATE TABLE table_20745706_1 (score VARCHAR, date VARCHAR) |
SELECT MAX(vitalperiodic.sao2) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-13127')) AND NOT vitalperiodic.sao2 IS NULL AND DATETIME(vitalperiodic.observationtime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') | tell me the maximum sao2 for patient 004-13127's body today? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
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 vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
) |
SELECT COUNT(written_by) FROM table_228973_5 WHERE no_in_series = 68 | How many people wrote episode 68 in the series? | CREATE TABLE table_228973_5 (written_by VARCHAR, no_in_series VARCHAR) |
SELECT opponent FROM table_20745706_1 WHERE _number = "5" | Who is the opponent in game 5? | CREATE TABLE table_20745706_1 (opponent VARCHAR, _number VARCHAR) |
SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%Other%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 WHERE PROGRAM_COURSEalias1.category LIKE '%Other%') | What is the easiest class available that meets the Other requirement ? | CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
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 varchar,
has_final_exam varchar,
textbook varchar,
class_address varchar,
allow_audit varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
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 area (
course_id int,
area varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_projects varchar,
has_exams varchar,
num_reviews int,
clarity_score int,
easiness_score int,
helpfulness_score int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varchar
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
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 int,
respected int,
participation int,
heavy_reading int,
tough_grader int,
hilarious int,
would_take_again int,
good_lecture int,
no_skip int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
) |
SELECT directed_by FROM table_228973_5 WHERE original_air_date = "February 16, 1999" | Who directed the episode that originally aired on February 16, 1999? | CREATE TABLE table_228973_5 (directed_by VARCHAR, original_air_date VARCHAR) |
SELECT date FROM table_20745706_1 WHERE _number = "5" | What is the date of game 5? | CREATE TABLE table_20745706_1 (date VARCHAR, _number VARCHAR) |
SELECT date FROM table_name_71 WHERE event = "ept copenhagen" | What is the Date for the Event ept copenhagen? | CREATE TABLE table_name_71 (
date VARCHAR,
event VARCHAR
) |
SELECT no_in_season FROM table_228973_11 WHERE original_air_date = "February 11, 2005" | The episode which originally aired on February 11, 2005 had which episode # of the season? | CREATE TABLE table_228973_11 (no_in_season VARCHAR, original_air_date VARCHAR) |
SELECT MIN(attendance) FROM table_20745746_1 WHERE date = "March 11, 1995" | What was attendance on March 11, 1995? | CREATE TABLE table_20745746_1 (attendance INTEGER, date VARCHAR) |
SELECT "Date" FROM table_7587 WHERE "Week" < '10' AND "Opponent" = 'denver broncos' | When did the Chargers play the Denver Broncos before Week 10? | CREATE TABLE table_7587 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) |
SELECT written_by FROM table_228973_11 WHERE original_air_date = "December 17, 2004" | The episode which originally aired on December 17, 2004 was written by whom? | CREATE TABLE table_228973_11 (written_by VARCHAR, original_air_date VARCHAR) |
SELECT score FROM table_20745746_1 WHERE attendance = 7260 | What was the score when 7260 people attended the game? | CREATE TABLE table_20745746_1 (score VARCHAR, attendance VARCHAR) |
SELECT result FROM table_name_95 WHERE game_site = "jeppesen stadium" | What was the result of the game played at Jeppesen Stadium? | CREATE TABLE table_name_95 (
result VARCHAR,
game_site VARCHAR
) |
SELECT no_in_series FROM table_228973_11 WHERE directed_by = "David James Elliott" | David James Elliott directed which episode number within the series? | CREATE TABLE table_228973_11 (no_in_series VARCHAR, directed_by VARCHAR) |
SELECT _number FROM table_20745746_1 WHERE record = "Loss" | How many games resulted in a loss? | CREATE TABLE table_20745746_1 (_number VARCHAR, record VARCHAR) |
SELECT product_id, product_name FROM products WHERE product_price < 600 OR product_price > 900 | What are id and name of the products whose price is lower than 600 or higher than 900? | CREATE TABLE staff (
staff_id number,
staff_gender text,
staff_name text
)
CREATE TABLE order_items (
order_item_id number,
order_id number,
product_id number
)
CREATE TABLE customer_addresses (
customer_id number,
address_id number,
date_from time,
date_to time
)
CREATE TABLE department_store_chain (
dept_store_chain_id number,
dept_store_chain_name text
)
CREATE TABLE customers (
customer_id number,
payment_method_code text,
customer_code text,
customer_name text,
customer_address text,
customer_phone text,
customer_email text
)
CREATE TABLE product_suppliers (
product_id number,
supplier_id number,
date_supplied_from time,
date_supplied_to time,
total_amount_purchased text,
total_value_purchased number
)
CREATE TABLE supplier_addresses (
supplier_id number,
address_id number,
date_from time,
date_to time
)
CREATE TABLE staff_department_assignments (
staff_id number,
department_id number,
date_assigned_from time,
job_title_code text,
date_assigned_to time
)
CREATE TABLE suppliers (
supplier_id number,
supplier_name text,
supplier_phone text
)
CREATE TABLE department_stores (
dept_store_id number,
dept_store_chain_id number,
store_name text,
store_address text,
store_phone text,
store_email text
)
CREATE TABLE customer_orders (
order_id number,
customer_id number,
order_status_code text,
order_date time
)
CREATE TABLE products (
product_id number,
product_type_code text,
product_name text,
product_price number
)
CREATE TABLE departments (
department_id number,
dept_store_id number,
department_name text
)
CREATE TABLE addresses (
address_id number,
address_details text
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.