answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT gender FROM table_name_19 WHERE university_students_and_adults__18yrs + _ = "25mm" | Which gender is associated with University students and adults of 25mm? | CREATE TABLE table_name_19 (gender VARCHAR, university_students_and_adults__18yrs VARCHAR, _ VARCHAR) |
SELECT T1.Project_Details, T1.Project_ID FROM Projects AS T1 JOIN Documents AS T2 ON T1.Project_ID = T2.Project_ID ORDER BY T1.Project_ID DESC | What is the project id and detail for the project with at least two documents Plot them as bar chart, and order by the y axis from high to low. | CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
) |
SELECT production_code FROM table_26259391_1 WHERE original_air_date = "February20,2011" | Which production code had original air dated february20,2011 | CREATE TABLE table_26259391_1 (production_code VARCHAR, original_air_date VARCHAR) |
SELECT junior_high_school__12_15_yrs_ FROM table_name_15 WHERE university_students_and_adults__18yrs + _ = "26mm" | Which junior high school has university students and adults of 26mm? | CREATE TABLE table_name_15 (junior_high_school__12_15_yrs_ VARCHAR, university_students_and_adults__18yrs VARCHAR, _ VARCHAR) |
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 = 25312)) AND STRFTIME('%y-%m-%d', inputevents_cv.charttime) = '2104-12-27' | calculate the total of patient 25312's input on 12/27/2104. | 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 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 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 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 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
)
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 chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_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 microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name 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 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
) |
SELECT institution FROM table_262560_2 WHERE joined = "1996-97" AND left = "2011-12" | What school joined the conference in 1996-97 and left it in 2011-12? | CREATE TABLE table_262560_2 (institution VARCHAR, joined VARCHAR, left VARCHAR) |
SELECT university_students_and_adults__18yrs + _ FROM table_name_57 WHERE gender = "male" AND specification = "minimum weight" | What value for university students and adult goes with male gender for minimum weight? | CREATE TABLE table_name_57 (university_students_and_adults__18yrs VARCHAR, _ VARCHAR, gender VARCHAR, specification VARCHAR) |
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-166510')) AND STRFTIME('%y-%m', lab.labresulttime) = '2101-12' ORDER BY lab.labresulttime LIMIT 1 | when did patient 022-166510 receive a test in the lab for the first time in 12/2101? | 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 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 cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
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 vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
) |
SELECT location FROM table_262560_2 WHERE enrollment = 850 | What location has a school with enrollment of 850? | CREATE TABLE table_262560_2 (location VARCHAR, enrollment VARCHAR) |
SELECT metro_vincity FROM table_name_84 WHERE opened = "1999" | What metro vincity has the venue that opened in 1999? | CREATE TABLE table_name_84 (metro_vincity VARCHAR, opened VARCHAR) |
SELECT "2008 Status" FROM table_63476 WHERE "Democratic" = 'rosa delauro' | What's the 2008 Status of Rosa Delauro? | CREATE TABLE table_63476 (
"District" real,
"Incumbent" text,
"2008 Status" text,
"Democratic" text,
"Republican" text,
"Green" text
) |
SELECT COUNT(location) FROM table_262560_2 WHERE left = "2002-03" | How many schools left in 2002-03? | CREATE TABLE table_262560_2 (location VARCHAR, left VARCHAR) |
SELECT COUNT(capacity) FROM table_name_15 WHERE opened = "1999" | What is the total capacity of venues that opened in 1999? | CREATE TABLE table_name_15 (capacity VARCHAR, opened VARCHAR) |
SELECT "Replaced by" FROM table_48702 WHERE "Date of appointment" = '13 may 2009' | What is the name of the person that was appointed on 13 May 2009? | CREATE TABLE table_48702 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text
) |
SELECT location FROM table_262560_2 WHERE nickname = "Pioneers" | Which city has a school where the nickname is Pioneers? | CREATE TABLE table_262560_2 (location VARCHAR, nickname VARCHAR) |
SELECT date FROM table_name_25 WHERE result = "aus by 382 runs" | What date has aus by 382 runs as the result? | CREATE TABLE table_name_25 (date VARCHAR, result VARCHAR) |
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL | how many patients have been discharged from hospital. | 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 lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE 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 allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
) |
SELECT type FROM table_262560_2 WHERE nickname = "Oilers" | What type of school has the nickname the Oilers? | CREATE TABLE table_262560_2 (type VARCHAR, nickname VARCHAR) |
SELECT venue FROM table_name_2 WHERE result = "eng by 10 runs" | What venue has eng by 10 runs as the result? | CREATE TABLE table_name_2 (venue VARCHAR, result VARCHAR) |
SELECT "Yard Name" FROM table_56231 WHERE "Ship Types Delivered" = 'n3 type, v4 type' AND "Total Vessels Built for USMC" = '13 ships for usmc' | what is the yard name when the ship types delivered is n3 type, v4 type and the total vessels built for usmc is 13 ships for usmc? | CREATE TABLE table_56231 (
"Yard Name" text,
"Location (City, State)" text,
"1st Ship Delivery Date" text,
"Ship Types Delivered" text,
"Total Number of Ways" text,
"Total Vessels Built for USMC" text
) |
SELECT COUNT(location) FROM table_262560_2 WHERE nickname = "Panthers" | How many locations have a school that is nicknamed the Panthers? | CREATE TABLE table_262560_2 (location VARCHAR, nickname VARCHAR) |
SELECT date FROM table_name_87 WHERE home_captain = "george giffen" AND venue = "sydney cricket ground" | What date has george giffen as the home captain, and sydney cricket ground as the venue? | CREATE TABLE table_name_87 (date VARCHAR, home_captain VARCHAR, venue VARCHAR) |
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'glucagon' AND STRFTIME('%y', medication.drugstarttime) = '2102') AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE STRFTIME('%y', medication.drugstarttime) = '2102') AS t2 ON t1.uniquepid = t2.uniquepid WHERE DATETIME(t1.drugstarttime) = DATETIME(t2.drugstarttime) GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 3 | what is the three most frequently prescribed drugs for patients that have been prescribed with glucagon at the same time in 2102? | 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 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 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,
observationtime 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 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 allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
) |
SELECT COUNT(sprints_classification) FROM table_26257223_13 WHERE winner = "Joaquin Rodriguez" | How many sprints classifications were associated with an overall winner of Joaquin Rodriguez? | CREATE TABLE table_26257223_13 (sprints_classification VARCHAR, winner VARCHAR) |
SELECT SUM(silver) FROM table_name_69 WHERE gold = 0 AND bronze < 0 | Gold of 0, and a Bronze smaller than 0 and what is the sum of the silver? | CREATE TABLE table_name_69 (silver INTEGER, gold VARCHAR, bronze VARCHAR) |
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'blood product administration' AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t1 JOIN (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 's/p exploratory laparotomy' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t2 WHERE t1.treatmenttime < t2.diagnosistime AND DATETIME(t2.diagnosistime) BETWEEN DATETIME(t1.treatmenttime) AND DATETIME(t1.treatmenttime, '+2 month') | what is the number of patients who have been diagnosed with s/p exploratory laparotomy within 2 months after having received a blood product administration the last year? | 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
)
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 intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
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 treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
) |
SELECT team_classification FROM table_26257223_13 WHERE winner = "Chris Horner" | Who led team classification during the stage whose winner was Chris Horner? | CREATE TABLE table_26257223_13 (team_classification VARCHAR, winner VARCHAR) |
SELECT MAX(bronze) FROM table_name_70 WHERE gold = 0 AND total > 0 AND silver > 1 | Gold of 0, and a Total larger than 0, and a Silver larger than 1 and what is the highest bronze? | CREATE TABLE table_name_70 (bronze INTEGER, silver VARCHAR, gold VARCHAR, total VARCHAR) |
SELECT date FROM table_name_27 WHERE pos < 4 AND venue = "piraeus" | On which date was the position less than 4 at Piraeus? | CREATE TABLE table_name_27 (
date VARCHAR,
pos VARCHAR,
venue VARCHAR
) |
SELECT sprints_classification FROM table_26257223_13 WHERE general_classification = "Chris Horner" | Who led sprints classification when Chris Horner led general classification? | CREATE TABLE table_26257223_13 (sprints_classification VARCHAR, general_classification VARCHAR) |
SELECT COUNT(silver) FROM table_name_31 WHERE gold > 0 AND bronze > 1 | Gold larger than 0, and a Bronze larger than 1 includes what total number of silver? | CREATE TABLE table_name_31 (silver VARCHAR, gold VARCHAR, bronze VARCHAR) |
SELECT STU_FNAME, SUM(STU_GPA) FROM STUDENT WHERE STU_GPA < (SELECT AVG(STU_GPA) FROM STUDENT) GROUP BY STU_FNAME ORDER BY SUM(STU_GPA) DESC | Draw a bar chart for what is the first name and GPA of every student that has a GPA lower than average?, could you rank by the y-axis from high to low? | CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_JOBCODE varchar(5),
EMP_HIREDATE datetime,
EMP_DOB datetime
)
CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
STU_HRS int,
STU_CLASS varchar(2),
STU_GPA float(8),
STU_TRANSFER numeric,
DEPT_CODE varchar(18),
STU_PHONE varchar(4),
PROF_NUM int
)
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIGH_DEGREE varchar(5)
)
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
) |
SELECT report FROM table_26258348_4 WHERE grand_prix = "Belgian grand_prix" | What are all the report for the Belgian Grand Prix? | CREATE TABLE table_26258348_4 (report VARCHAR, grand_prix VARCHAR) |
SELECT MIN(gold) FROM table_name_35 WHERE bronze = 0 AND total = 1 AND silver < 1 | Bronze of 0, and a Total of 1, and a Silver smaller than 1 what is the lowest gold? | CREATE TABLE table_name_35 (gold INTEGER, silver VARCHAR, bronze VARCHAR, total VARCHAR) |
SELECT "camp" FROM table_204_217 WHERE "camp" IN ('gamini maha vidyalayam', 'nelukkulam kalaimahal maha vidyalayam') ORDER BY "9 feb" DESC LIMIT 1 | which farm grew the larger amount on 9 feb , gamini maha vidyalayam or nelukkulam kalaimahal maha vidyalayam ? | CREATE TABLE table_204_217 (
id number,
"camp" text,
"div sec\ndivision" text,
"admin\ndistrict" text,
"9 feb" number,
"11 feb" number,
"16 feb" number,
"25 feb" number,
"27 feb" number,
"2 mar" number,
"4 mar" number,
"6 mar" number,
"11 mar" number,
"13 mar" number,
"24 mar" number,
"30 mar" number,
"31 mar" number
) |
SELECT COUNT(winning_constructor) FROM table_26258348_4 WHERE fastest_lap = "Mark Webber" | How many winning constructor catagories are there when Mark Webber had the fastest lap? | CREATE TABLE table_26258348_4 (winning_constructor VARCHAR, fastest_lap VARCHAR) |
SELECT third FROM table_name_78 WHERE lead = "zanda bikše" | Which Third has a Lead of zanda bikše? | CREATE TABLE table_name_78 (third VARCHAR, lead VARCHAR) |
SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'glucose - d50' AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t1 JOIN (SELECT patient.uniquepid, lab.labname, lab.labresulttime FROM lab JOIN patient ON lab.patientunitstayid = patient.patientunitstayid WHERE DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.treatmenttime < t2.labresulttime AND DATETIME(t2.labresulttime) BETWEEN DATETIME(t1.treatmenttime) AND DATETIME(t1.treatmenttime, '+2 month') GROUP BY t2.labname) AS t3 WHERE t3.c1 <= 4 | during the last year, what was the top four most frequent laboratory tests given to patients within 2 months after receiving a glucose - d50? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime 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 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 vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
) |
SELECT pole_position FROM table_26258348_4 WHERE grand_prix = "Canadian grand_prix" | Who had the pole position in the Canadian Grand Prix? | CREATE TABLE table_26258348_4 (pole_position VARCHAR, grand_prix VARCHAR) |
SELECT third FROM table_name_6 WHERE nation = "hungary" | Which Third has a Nation of hungary? | CREATE TABLE table_name_6 (third VARCHAR, nation VARCHAR) |
SELECT detroit__dtw_ FROM table_1637981_7 WHERE lansing__lan_ = "$433.59" | When Lansing's fare is $433.59, what is the Detroit fare? | CREATE TABLE table_1637981_7 (
detroit__dtw_ VARCHAR,
lansing__lan_ VARCHAR
) |
SELECT MIN(founded) FROM table_262534_2 WHERE institution = "St. Catharine College" | What year was the institution of St. Catharine College founded? | CREATE TABLE table_262534_2 (founded INTEGER, institution VARCHAR) |
SELECT second FROM table_name_16 WHERE nation = "latvia" | Which Second has a Nation of latvia? | CREATE TABLE table_name_16 (second VARCHAR, nation VARCHAR) |
SELECT "Home team score" FROM table_53391 WHERE "Home team" = 'collingwood' | What is the score for Collingwood as the home team? | CREATE TABLE table_53391 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT enrollment FROM table_262534_2 WHERE location__population_ = "Lebanon, Tennessee (20,235)" | What is the enrollment for the institution that is located in Lebanon, Tennessee (20,235)? | CREATE TABLE table_262534_2 (enrollment VARCHAR, location__population_ VARCHAR) |
SELECT lead FROM table_name_99 WHERE nation = "croatia" | Which Lead has a Nation of croatia? | CREATE TABLE table_name_99 (lead VARCHAR, nation VARCHAR) |
SELECT "Year" FROM table_77018 WHERE "Competition" = 'universiade' | In which year did he compete in the Universiade? | CREATE TABLE table_77018 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
) |
SELECT location__population_ FROM table_262534_2 WHERE institution = "Bluefield College" | What is the location and population of the institution called Bluefield College? | CREATE TABLE table_262534_2 (location__population_ VARCHAR, institution VARCHAR) |
SELECT nation FROM table_name_73 WHERE lead = "alexandra bruckmiller" | Which Nation has a Lead of alexandra bruckmiller? | CREATE TABLE table_name_73 (nation VARCHAR, lead VARCHAR) |
SELECT COUNT(*) > 0 FROM semester WHERE NOT semester IN (SELECT DISTINCT SEMESTERalias1.semester FROM course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias1 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND COURSEalias0.department = 'SM' AND COURSEalias0.number = 217 AND SEMESTERalias1.semester_id = COURSE_OFFERINGalias0.semester) | Will SM 217 be offered every semester ? | CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text 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 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 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 course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_project varchar,
has_final_exam varchar,
textbook varchar,
class_address varchar,
allow_audit varchar
)
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 (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year 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_course (
program_id int,
course_id int,
workload int,
category varchar
) |
SELECT COUNT(hometown) FROM table_26263322_1 WHERE result = "Hired by Serepisos" | How many times was the result is hired by serepisos? | CREATE TABLE table_26263322_1 (hometown VARCHAR, result VARCHAR) |
SELECT skip FROM table_name_37 WHERE third = "constanze hummelt" | Which Skip has a Third of constanze hummelt? | CREATE TABLE table_name_37 (skip VARCHAR, third VARCHAR) |
SELECT date FROM table_name_45 WHERE competition = "1999 fifa confederations cup" | What is the Date of the 1999 fifa confederations cup? | CREATE TABLE table_name_45 (
date VARCHAR,
competition VARCHAR
) |
SELECT MIN(age) FROM table_26263322_1 WHERE result = "Fired in week 8" | What is the age when the result is fired in week 8 | CREATE TABLE table_26263322_1 (age INTEGER, result VARCHAR) |
SELECT spanish FROM table_name_83 WHERE english = "garden" | what is the spanish word for garden | CREATE TABLE table_name_83 (spanish VARCHAR, english VARCHAR) |
SELECT MAX("Year") FROM table_2532 | What is Fred Stolle's final year of competing in a championship? | CREATE TABLE table_2532 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
) |
SELECT background FROM table_26263322_1 WHERE candidate = "Daniel Phillips" | What is the background of the candidate daniel phillips? | CREATE TABLE table_26263322_1 (background VARCHAR, candidate VARCHAR) |
SELECT italian FROM table_name_37 WHERE french = "mer" | what is the italian word for the french word 'mer' | CREATE TABLE table_name_37 (italian VARCHAR, french VARCHAR) |
SELECT FIRST_NAME, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY FIRST_NAME DESC | For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of first_name and employee_id , and sort bars from high to low order please. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,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)
) |
SELECT COUNT(candidate) FROM table_26263322_1 WHERE background = "Self-employed - media agency" | How many times was the background self-employed - media agency? | CREATE TABLE table_26263322_1 (candidate VARCHAR, background VARCHAR) |
SELECT english FROM table_name_61 WHERE italian = "cavallo" | what is the english word for cavallo | CREATE TABLE table_name_61 (english VARCHAR, italian VARCHAR) |
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute respiratory failure' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE patient.age BETWEEN 30 AND 39 AND DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.diagnosistime < t2.drugstarttime AND DATETIME(t1.diagnosistime, 'start of month') = DATETIME(t2.drugstarttime, 'start of month') GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 3 | what were the three most frequent drugs prescribed during the same month to the patients 30s after they had been diagnosed with acute respiratory failure in the previous year? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
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 intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime 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(result) FROM table_26263322_1 WHERE background = "University Student" | How many times was the background university student? | CREATE TABLE table_26263322_1 (result VARCHAR, background VARCHAR) |
SELECT player FROM table_name_61 WHERE touchdowns > 1 AND extra_points = 0 AND points < 50 | What Player has more than 1 Touchdowns with 0 Extra Points and less than 50 Points? | CREATE TABLE table_name_61 (player VARCHAR, points VARCHAR, touchdowns VARCHAR, extra_points VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.short_title = "Non-invasive mech vent" | provide the number of patients whose insurance is government and procedure short title is non-invasive mech vent? | 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
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) |
SELECT candidate FROM table_26263322_1 WHERE age = 27 | What is the candidate whose age is 27? | CREATE TABLE table_26263322_1 (candidate VARCHAR, age VARCHAR) |
SELECT player FROM table_name_77 WHERE touchdowns < 10 AND extra_points = 0 AND points > 5 | What Player has less than 10 Touchdowns and 0 Extra points and more than 5 Points? | CREATE TABLE table_name_77 (player VARCHAR, points VARCHAR, touchdowns VARCHAR, extra_points VARCHAR) |
SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-35481')) AND STRFTIME('%y', treatment.treatmenttime) >= '2104' ORDER BY treatment.treatmenttime DESC LIMIT 1 | when since 2104 patient 016-35481 received for the last time a procedure? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
) |
SELECT winning_team FROM table_26267607_2 WHERE round = "6" | In Round 6, who is the winning team? | CREATE TABLE table_26267607_2 (winning_team VARCHAR, round VARCHAR) |
SELECT MIN(extra_points) FROM table_name_6 WHERE points = 5 AND touchdowns < 1 | How many Extra Points were scored by the Player who had 5 Points and less than 1 Touchdowns? | CREATE TABLE table_name_6 (extra_points INTEGER, points VARCHAR, touchdowns VARCHAR) |
SELECT u.Id AS "user_link", u.Reputation, b.Date FROM Badges AS b INNER JOIN Users AS u ON u.Id = b.UserId WHERE b.Name = 'Generalist' ORDER BY u.Reputation | Users with Generalist badge ordered by their reputation. Users with Generalist badge ordered by their reputation | CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
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 Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
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 FlagTypes (
Id number,
Name text,
Description text
)
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 PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount 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 PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostTypes (
Id number,
Name 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 CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
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 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 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 PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
) |
SELECT date FROM table_26267607_2 WHERE winning_team = "Abt Sportsline" AND pole_position = "Mattias Ekström" AND circuit = "circuit Ricardo Tormo , Valencia" | On what date is the winning team Abt Sportsline and pole position Mattias Ekström in the Circuit Ricardo Tormo , Valencia? | CREATE TABLE table_26267607_2 (date VARCHAR, circuit VARCHAR, winning_team VARCHAR, pole_position VARCHAR) |
SELECT MIN(year) FROM table_name_86 WHERE tournament = "european indoor championships" AND result = "3rd" | Name the least year for european indoor championships result of 3rd | CREATE TABLE table_name_86 (year INTEGER, tournament VARCHAR, result VARCHAR) |
SELECT COUNT(golden_tickets) FROM table_28793672_1 WHERE callback_venue = "RCTI Studio, Jakarta" | How many times is there a golden tickets entry when the callback venue is rcti studio, jakarta? | CREATE TABLE table_28793672_1 (
golden_tickets VARCHAR,
callback_venue VARCHAR
) |
SELECT circuit FROM table_26267607_2 WHERE round = "1" | Round 1 is in what circuit? | CREATE TABLE table_26267607_2 (circuit VARCHAR, round VARCHAR) |
SELECT played FROM table_name_8 WHERE points = "51" | What is the played value with 51 points? | CREATE TABLE table_name_8 (played VARCHAR, points VARCHAR) |
SELECT region FROM table_name_97 WHERE altitude__metres_ = 6854 | Say the region for 6854 altitudes | CREATE TABLE table_name_97 (
region VARCHAR,
altitude__metres_ VARCHAR
) |
SELECT pole_position FROM table_26267607_2 WHERE winning_driver = "Bruno Spengler" AND circuit = "Showevent Olympiastadion München" | In the circuit Showevent Olympiastadion München, where the winning driver is Bruno Spengler, what is the pole position? | CREATE TABLE table_26267607_2 (pole_position VARCHAR, winning_driver VARCHAR, circuit VARCHAR) |
SELECT tries_for FROM table_name_99 WHERE club = "nelson rfc" | How many tries for Nelson RFC? | CREATE TABLE table_name_99 (tries_for VARCHAR, club VARCHAR) |
SELECT player FROM table_name_67 WHERE to_par = "–7" AND country = "spain" | which Player has a To par of 7, and a Country of spain? | CREATE TABLE table_name_67 (
player VARCHAR,
to_par VARCHAR,
country VARCHAR
) |
SELECT winning_driver FROM table_26267607_2 WHERE fastest_lap = "Mike Rockenfeller" | Where the fastest lap is Mike Rockenfeller, who is the winning driver? | CREATE TABLE table_26267607_2 (winning_driver VARCHAR, fastest_lap VARCHAR) |
SELECT losing_bonus FROM table_name_22 WHERE drawn = "1" AND lost = "13" | What is the losing bonus with 1 draw and 13 losses? | CREATE TABLE table_name_22 (losing_bonus VARCHAR, drawn VARCHAR, lost VARCHAR) |
SELECT "2nd Member" FROM table_60551 WHERE "1st Party" = 'conservative' AND "1st Member" = 'william edward dowdeswell' | What 2nd Member has a 1st Party of conservative, and a 1st Member of william edward dowdeswell? | CREATE TABLE table_60551 (
"Election" text,
"1st Member" text,
"1st Party" text,
"2nd Member" text,
"2nd Party" text
) |
SELECT COUNT(date) FROM table_26267607_2 WHERE round = "3" | How many dates are there in round 3? | CREATE TABLE table_26267607_2 (date VARCHAR, round VARCHAR) |
SELECT tries_against FROM table_name_22 WHERE played = "22" AND drawn = "1" AND try_bonus = "13" | How many tries when 22 are played with 1 draw and a try bonus of 13? | CREATE TABLE table_name_22 (tries_against VARCHAR, try_bonus VARCHAR, played VARCHAR, drawn VARCHAR) |
SELECT AVG(number_of_electorates__2009_) FROM table_name_6 WHERE name = "modi nagar" | What is the electorates in 2009 for Modi Nagar? | CREATE TABLE table_name_6 (
number_of_electorates__2009_ INTEGER,
name VARCHAR
) |
SELECT MIN(series__number) FROM table_26261072_1 WHERE written_by = "Brenda Hampton" AND directed_by = "Burt Brinckerhoff" | Name the least series number written by brenda hampton and directed by burt brinckerhoff | CREATE TABLE table_26261072_1 (series__number INTEGER, written_by VARCHAR, directed_by VARCHAR) |
SELECT points_against FROM table_name_67 WHERE losing_bonus = "1" AND club = "blaenavon rfc" | How many points were scored against with a losing bonus of 1 for Blaenavon RFC? | CREATE TABLE table_name_67 (points_against VARCHAR, losing_bonus VARCHAR, club VARCHAR) |
SELECT MIN("Points") FROM table_68671 WHERE "Chassis" = 'kurtis kraft 3000' AND "Year" < '1951' | Name the least points with chassis of kurtis kraft 3000 and year before 1951 | CREATE TABLE table_68671 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) |
SELECT original_air_date FROM table_26261072_1 WHERE series__number = 15 | Name the original air date for series number 15 | CREATE TABLE table_26261072_1 (original_air_date VARCHAR, series__number VARCHAR) |
SELECT opponent FROM table_name_41 WHERE method = "submission (triangle choke)" | Who is the opponent of the submission (triangle choke) method of submission? | CREATE TABLE table_name_41 (opponent VARCHAR, method VARCHAR) |
SELECT title FROM table_22904707_1 WHERE us_viewers__million_ = "14.52" | What was the name of the episode that had 14.52 viewers? | CREATE TABLE table_22904707_1 (
title VARCHAR,
us_viewers__million_ VARCHAR
) |
SELECT team_s_ FROM table_2626564_2 WHERE winnings = "$5,200" | What team was Pearson on when his winnings were $5,200? | CREATE TABLE table_2626564_2 (team_s_ VARCHAR, winnings VARCHAR) |
SELECT competition FROM table_name_53 WHERE date = "october 31, 1979" | What Competition had a game on October 31, 1979? | CREATE TABLE table_name_53 (competition VARCHAR, date VARCHAR) |
SELECT AVG(CAST(Score AS FLOAT)) AS VOTE FROM Posts WHERE Posts.OwnerUserId = @UserId AND Posts.PostTypeId = 2 | Average Answer Score By User. | CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PostHistoryTypes (
Id number,
Name 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 SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description 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 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 ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId 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 PostTags (
PostId number,
TagId 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 ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
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 Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
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 TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
) |
SELECT starts FROM table_2626564_2 WHERE winnings = "$101,438" | How many starts did Pearson have when his winnings were $101,438? | CREATE TABLE table_2626564_2 (starts VARCHAR, winnings VARCHAR) |
SELECT date FROM table_name_97 WHERE brazil_scorers = "palhinha" | On what Date was Palhinha Brazil Scorers? | CREATE TABLE table_name_97 (date VARCHAR, brazil_scorers VARCHAR) |
SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-19622' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1)) AND microlab.culturesite = 'bronchial lavage' ORDER BY microlab.culturetakentime LIMIT 1 | tell me the name of the organism found in the first bronchial lavage microbiology test on patient 031-19622 during their last hospital encounter? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime 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
)
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 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 diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
) |
SELECT MIN(top_10) FROM table_2626564_2 WHERE position = "8th" | How many top 10's did Pearson have the year he was in 8th position? | CREATE TABLE table_2626564_2 (top_10 INTEGER, position VARCHAR) |
SELECT brazil_scorers FROM table_name_93 WHERE score = "1-1" | What Brazil scorers have a 1-1 Score? | CREATE TABLE table_name_93 (brazil_scorers VARCHAR, score VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.