provide the number of private health insurance patients who have had single internal mammary-coronary artery bypass.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."INSURANCE" = "Private" AND PROCEDURES."LONG_TITLE" = "Single internal mammary-coronary artery bypass"

provide the number of private health insurance patients who have had single internal mammary - coronary artery bypass .

Answer: 1616


what is the number of government health insurance patients who had laryngoscopy and other tracheoscopy procedure?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."INSURANCE" = "Government" AND PROCEDURES."LONG_TITLE" = "Laryngoscopy and other tracheoscopy"

what is the number of government health insurance patients who had laryngoscopy and other tracheoscopy procedure ?

Answer: 19


provide the number of government health insurance patients who have other percutaneous procedures on biliary tract.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."INSURANCE" = "Government" AND PROCEDURES."LONG_TITLE" = "Other percutaneous procedures on biliary tract"

provide the number of government health insurance patients who have other percutaneous procedures on biliary tract .

Answer: 3


What is the number of medicaid patients who have an automatic implantable cardioverter/defibrillator (aicd) check procedure?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."INSURANCE" = "Medicaid" AND PROCEDURES."LONG_TITLE" = "Automatic implantable cardioverter/defibrillator (AICD) check"

What is the number of medicaid patients who have an automatic implantable cardioverter/defibrillator ( aicd ) check procedure ?

Answer: 4


how many patients posses government insurance and are tested for thyroid stimulating hormone in lab?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."INSURANCE" = "Government" AND LAB."LABEL" = "Thyroid Stimulating Hormone"

how many patients posses government insurance and are tested for thyroid stimulating hormone in lab ?

Answer: 325


Get me the number of self pay insurance patients who had an rbc csf lab test.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."INSURANCE" = "Self Pay" AND LAB."LABEL" = "RBC, CSF"

Get me the number of self pay insurance patients who had an rbc csf lab test .

Answer: 33


count the number of government health insurance patients who had wbc, joint fluid lab test.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."INSURANCE" = "Government" AND LAB."LABEL" = "WBC, Joint Fluid"

count the number of government health insurance patients who had wbc , joint fluid lab test .

Answer: 8


What is the number of government health insurance patients who had a hemoglobin lab test?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."INSURANCE" = "Government" AND LAB."LABEL" = "Hemoglobin"

What is the number of government health insurance patients who had a hemoglobin lab test ?

Answer: 1558


how many self pay insurance patients had granular casts lab test?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."INSURANCE" = "Self Pay" AND LAB."LABEL" = "Granular Casts"

how many self pay insurance patients had granular casts lab test ?

Answer: 47


what number of patients had the lab test named fibrin degradation products and self paid the costs?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."INSURANCE" = "Self Pay" AND LAB."LABEL" = "Fibrin Degradation Products"

what number of patients had the lab test named fibrin degradation products and self paid the costs ?

Answer: 29


let me know the number of government health insurance patients who have ntprobnp lab test.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."INSURANCE" = "Government" AND LAB."LABEL" = "NTproBNP"

let me know the number of government health insurance patients who have ntprobnp lab test .

Answer: 61


give the number of patients who have private insurance policy and who have had lab test ferritin done.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."INSURANCE" = "Private" AND LAB."LABEL" = "Ferritin"

give the number of patients who have private insurance policy and who have had lab test ferritin done .

Answer: 2134


Find me the number of medicare patients for whome amylase a body fluid lab test was ordered.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."INSURANCE" = "Medicare" AND LAB."LABEL" = "Amylase, Body Fluid"

Find me the number of medicare patients for whome amylase a body fluid lab test was ordered .

Answer: 233


how many patients having government insurance have had ammonia lab test?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."INSURANCE" = "Government" AND LAB."LABEL" = "Ammonia"

how many patients having government insurance have had ammonia lab test ?

Answer: 61


How many patients of black/cape verdean ethnicity were primarily diagnosed with the disease colangitis

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ETHNICITY" = "BLACK/CAPE VERDEAN" AND DEMOGRAPHIC."DIAGNOSIS" = "COLANGITIS"

Answer: 0


how many patients of black/cape verdean ethnicity are primary diagnosed with femoral artery thrombosis?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ETHNICITY" = "BLACK/CAPE VERDEAN" AND DEMOGRAPHIC."DIAGNOSIS" = "FEMORAL ARTERY THROMBOSIS"

how many patients of black/cape verdean ethnicity are primary diagnosed with femoral artery thrombosis ?

Answer: 0


how many white patients had overdose as the primary disease?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ETHNICITY" = "WHITE" AND DEMOGRAPHIC."DIAGNOSIS" = "OVERDOSE"

how many white patients had overdose as the primary disease ?

Answer: 139


count the number of patients whose ethnicity is american indian/alaska native and primary disease is femoral artery thrombosis.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ETHNICITY" = "AMERICAN INDIAN/ALASKA NATIVE" AND DEMOGRAPHIC."DIAGNOSIS" = "FEMORAL ARTERY THROMBOSIS"

count the number of patients whose ethnicity is american indian / alaska native and primary disease is femoral artery thrombosis .

Answer: 0


how many patients with infected right thigh graft were of american indian/alaska native ethnicty?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ETHNICITY" = "AMERICAN INDIAN/ALASKA NATIVE" AND DEMOGRAPHIC."DIAGNOSIS" = "INFECTED RIGHT THIGH GRAFT"

how many patients with infected right thigh graft were of american indian / alaska native ethnicty ?

Answer: 0


How many asian patients have pneumonia as their primary disease?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ETHNICITY" = "ASIAN" AND DEMOGRAPHIC."DIAGNOSIS" = "PNEUMONIA"

How many asian patients have pneumonia as their primary disease ?

Answer: 38


how many asian patients had liver transplant as their primary disease?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ETHNICITY" = "ASIAN" AND DEMOGRAPHIC."DIAGNOSIS" = "LIVER TRANSPLANT"

how many asian patients had liver transplant as their primary disease ?

Answer: 1


how many patients are diagnosed with icd9 code 9600 have an additive drug type?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ETHNICITY" = "ASIAN" AND DEMOGRAPHIC."AGE" < "50"

how many patients are diagnosed with icd9 code 9600 have an additive drug type ?

Answer: 877


Get me the number of white russian patients born before year 2103.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ETHNICITY" = "WHITE - RUSSIAN" AND DEMOGRAPHIC."DOB_YEAR" < "2103"

Get me the number of white russian patients born before year 2103 .

Answer: 94


How many patients with an american indian/alaska native ethnic background were born before 2129?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ETHNICITY" = "AMERICAN INDIAN/ALASKA NATIVE" AND DEMOGRAPHIC."DOB_YEAR" < "2129"

How many patients with an american indian/alaska native ethnic background were born before 2129 ?

Answer: 25


how many american indian/alaska native ethnic background patients were born before 2148?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ETHNICITY" = "AMERICAN INDIAN/ALASKA NATIVE" AND DEMOGRAPHIC."ADMITYEAR" < "2148"

how many american indian / alaska native ethnic background patients were born before 2148 ?

Answer: 28


how many black/haitian patients were admitted in hospital before 2123?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ETHNICITY" = "BLACK/HAITIAN" AND DEMOGRAPHIC."ADMITYEAR" < "2123"

how many black / haitian patients were admitted in hospital before 2123 ?

Answer: 18


provide me the number of black/haitian patients who were admitted before the year 2124.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ETHNICITY" = "BLACK/HAITIAN" AND DEMOGRAPHIC."ADMITYEAR" < "2124"

provide me the number of black / haitian patients who were admitted before the year 2124 .

Answer: 18


how many patients of asian ethnicity are admitted before the year 2110?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ETHNICITY" = "ASIAN" AND DEMOGRAPHIC."ADMITYEAR" < "2110"

how many patients of asian ethnicity are admitted before the year 2110 ?

Answer: 125


Show me the number of black /haitian patients who were diagnosed under the diagnoses cicd9 code 2948.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."ETHNICITY" = "BLACK/HAITIAN" AND DIAGNOSES."ICD9_CODE" = "2948"

Show me the number of black / haitian patients who were diagnosed under the diagnoses cicd9 code 2948 .

Answer: 2


how many of the asian patients had unspecified neutropenia?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."ETHNICITY" = "ASIAN" AND DIAGNOSES."LONG_TITLE" = "Neutropenia, unspecified"

how many of the asian patients had unspecified neutropenia ?

Answer: 2


how many patients belonging to black/haitian ethnic background hav ethe procedure icd9 code 8854?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."ETHNICITY" = "BLACK/HAITIAN" AND PROCEDURES."ICD9_CODE" = "8854"

how many patients belonging to black / haitian ethnic background hav ethe procedure icd9 code 8854 ?

Answer: 1


how many asian patients underwent open and other replacement of aortic valve with tissue graft procedure?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."ETHNICITY" = "ASIAN" AND PROCEDURES."LONG_TITLE" = "Open and other replacement of aortic valve with tissue graft"

how many asian patients underwent open and other replacement of aortic valve with tissue graft procedure ?

Answer: 2


how many asian patients had a base drug type?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."ETHNICITY" = "ASIAN" AND PRESCRIPTIONS."DRUG_TYPE" = "BASE"

how many asian patients had a base drug type ?

Answer: 814


how many black/haitian patients have phenylephrine medication prescription?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."ETHNICITY" = "BLACK/HAITIAN" AND PRESCRIPTIONS."DRUG" = "Phenylephrine"

how many black / haitian patients have phenylephrine medication prescription ?

Answer: 7


provide the number of asian patients who are taking glyburide medication.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."ETHNICITY" = "ASIAN" AND PRESCRIPTIONS."DRUG" = "GlyBURIDE"

provide the number of asian patients who are taking glyburide medication .

Answer: 6


Get the list of white-russian patients with a neb route of drug administration.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."ETHNICITY" = "WHITE - RUSSIAN" AND PRESCRIPTIONS."ROUTE" = "NEB"

Get the list of white-russian patients with a neb route of drug administration .

Answer: 0


How many white ethnic background patients had a protein/creatinine ratio lab test?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."ETHNICITY" = "WHITE" AND LAB."LABEL" = "Protein/Creatinine Ratio"

How many white ethnic background patients had a protein/creatinine ratio lab test ?

Answer: 1432


count the number of patients whose death status is 1 and primary disease is t5 fracture.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "1" AND DEMOGRAPHIC."DIAGNOSIS" = "T5 FRACTURE"

count the number of patients whose death status is 1 and primary disease is t5 fracture .

Answer: 0


Provide the number of patients that died and had a primary disease of ST elevated myocardial infarction/cardiac cath.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "1" AND DEMOGRAPHIC."DIAGNOSIS" = "ST ELEVATED MYOCARDIAL INFARCTION\CARDIAC CATH"

Provide the number of patients that died and had a primary disease of ST elevated myocardial infarction/cardiac cath .

Answer: 1


What is the number of dead patients who had brain mass intracranial hemorrhage?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "1" AND DEMOGRAPHIC."DIAGNOSIS" = "BRAIN MASS;INTRACRANIAL HEMORRHAGE"

What is the number of dead patients who had brain mass intracranial hemorrhage ?

Answer: 1


how many dead patients had left femur fracture primary disease?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "1" AND DEMOGRAPHIC."DIAGNOSIS" = "LEFT FEMUR FRACTURE"

how many dead patients had left femur fracture primary disease ?

Answer: 7


count the number of patients who died of pituatary bleed.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "1" AND DEMOGRAPHIC."DIAGNOSIS" = "PITUITARY BLEED"

count the number of patients who died of pituatary bleed .

Answer: 1


how many patients are died and stayed in hospital above 2 days?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "1" AND DEMOGRAPHIC."DAYS_STAY" > "2"

how many patients are died and stayed in hospital above 2 days ?

Answer: 13411


find the number of patients born before the year 1837 who are no longer alive.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "1" AND DEMOGRAPHIC."DOB_YEAR" < "1837"

find the number of patients born before the year 1837 who are no longer alive .

Answer: 519


Give the number of patients that survived and have a diagnosis icd9 code of 5712.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "0" AND DIAGNOSES."ICD9_CODE" = "5712"

Give the number of patients that survived and have a diagnosis icd9 code of 5712 .

Answer: 350


calculate the number of patients diagnosed with icd9 code 29570 whose death status is unspecified

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "0" AND DIAGNOSES."ICD9_CODE" = "29570"

Answer: 101


how many patients survived and were diagnosed with icd9 code 5680?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "1" AND DIAGNOSES."ICD9_CODE" = "5680"

how many patients survived and were diagnosed with icd9 code 5680 ?

Answer: 147


find the number of dead patients who had 5733 diagnoses icd9 code.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "1" AND DIAGNOSES."ICD9_CODE" = "5733"

find the number of dead patients who had 5733 diagnoses icd9 code .

Answer: 55


calculate the number of patients diagnosed with fall nos who have died

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "1" AND DIAGNOSES."SHORT_TITLE" = "Fall NOS"

Answer: 558


what is the number of living patients diagnosed with suicide and self-inflicted poisoning by analgesics, antipyretics, and antirheumatics?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "0" AND DIAGNOSES."LONG_TITLE" = "Suicide and self-inflicted poisoning by analgesics, antipyretics, and antirheumatics"

what is the number of living patients diagnosed with suicide and self - inflicted poisoning by analgesics , antipyretics , and antirheumatics ?

Answer: 158


how many patients are with death status 0 and with diagnosis chronic diastolic heart failure?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "0" AND DIAGNOSES."LONG_TITLE" = "Chronic diastolic heart failure"

how many patients are with death status 0 and with diagnosis chronic diastolic heart failure ?

Answer: 532


provide me with the number of alive patients who have procedure icd9 code 4610.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "0" AND PROCEDURES."ICD9_CODE" = "4610"

provide me with the number of alive patients who have procedure icd9 code 4610 .

Answer: 41


Count the number of patients that survived and had a procedure icd9 code of 331.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "0" AND PROCEDURES."ICD9_CODE" = "331"

Count the number of patients that survived and had a procedure icd9 code of 331 .

Answer: 0


How many patients with 5012 as the procedure icd9 code survived?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "0" AND PROCEDURES."ICD9_CODE" = "5012"

How many patients with 5012 as the procedure icd9 code survived ?

Answer: 52


For how many patients with int insert lead in vent was the death status left unspecified?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "0" AND PROCEDURES."SHORT_TITLE" = "Int insert lead in vent"

For how many patients with int insert lead in vent was the death status left unspecified ?

Answer: 28


Specify the total number of patients who had suture bladder lacerat and a death status of unspecified

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "0" AND PROCEDURES."SHORT_TITLE" = "Suture bladder lacerat"

Answer: 14


get the number of alive patients who underwent open biopsy of soft tissue.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "0" AND PROCEDURES."LONG_TITLE" = "Open biopsy of soft tissue"

get the number of alive patients who underwent open biopsy of soft tissue .

Answer: 47


What is the number of dead patients who had a prescription for pantoprazole sodium medication?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."EXPIRE_FLAG" = "1" AND PRESCRIPTIONS."DRUG" = "Pantoprazole Sodium"

What is the number of dead patients who had a prescription for pantoprazole sodium medication ?

Answer: 5871


how many patients admission location is transfer from hosp/extram and were discharged to disc-tran cancer/chldrn h?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ADMISSION_LOCATION" = "TRANSFER FROM HOSP/EXTRAM" AND DEMOGRAPHIC."DISCHARGE_LOCATION" = "DISC-TRAN CANCER/CHLDRN H"

how many patients admission location is transfer from hosp/extram and were discharged to disc-tran cancer/chldrn h ?

Answer: 129


how many of the patients admitted or transfer from hosp/extram were dead or expired on discharge?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ADMISSION_LOCATION" = "TRANSFER FROM HOSP/EXTRAM" AND DEMOGRAPHIC."DISCHARGE_LOCATION" = "DEAD/EXPIRED"

how many of the patients admitted or transfer from hosp / extram were dead or expired on discharge ?

Answer: 1137


count the number of patients who were transferred within the facility and were discharged to home.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ADMISSION_LOCATION" = "TRSF WITHIN THIS FACILITY" AND DEMOGRAPHIC."DISCHARGE_LOCATION" = "HOME"

count the number of patients who were transferred within the facility and were discharged to home .

Answer: 0


what is the number of patients whose admission location is emergency room admit and with primary disease t5 fracture?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ADMISSION_LOCATION" = "EMERGENCY ROOM ADMIT" AND DEMOGRAPHIC."DIAGNOSIS" = "T5 FRACTURE"

what is the number of patients whose admission location is emergency room admit and with primary disease t5 fracture ?

Answer: 0


provide the number of emergency room admitted patients who were hospitalized for more than 4 days.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ADMISSION_LOCATION" = "EMERGENCY ROOM ADMIT" AND DEMOGRAPHIC."DAYS_STAY" > "4"

provide the number of emergency room admitted patients who were hospitalized for more than 4 days .

Answer: 11750


calculate the number of patients born before 1879 ere tranferred within the facility.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."ADMISSION_LOCATION" = "TRSF WITHIN THIS FACILITY" AND DEMOGRAPHIC."DOB_YEAR" < "1879"

calculate the number of patients born before 1879 ere tranferred within the facility .

Answer: 0


how many patients are admitted under emergency room and diagnosed with mixed acid-base bal dis?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."ADMISSION_LOCATION" = "EMERGENCY ROOM ADMIT" AND DIAGNOSES."SHORT_TITLE" = "Mixed acid-base bal dis"

how many patients are admitted under emergency room and diagnosed with mixed acid - base bal dis ?

Answer: 195


what number of patients admitted in emergency room had the procedure under procedure icd9 code 3799?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."ADMISSION_LOCATION" = "EMERGENCY ROOM ADMIT" AND PROCEDURES."ICD9_CODE" = "3799"

what number of patients admitted in emergency room had the procedure under procedure icd9 code 3799 ?

Answer: 5


what number of patients were admitted in emergency room for arthrocentesis?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."ADMISSION_LOCATION" = "EMERGENCY ROOM ADMIT" AND PROCEDURES."SHORT_TITLE" = "Arthrocentesis"

what number of patients were admitted in emergency room for arthrocentesis ?

Answer: 156


how many patients discharged to snf had hypoxia primary disease?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DISCHARGE_LOCATION" = "SNF" AND DEMOGRAPHIC."DIAGNOSIS" = "HYPOXIA"

how many patients discharged to snf had hypoxia primary disease ?

Answer: 25


What is the number of patients with abdominal pain as their primary disease who were discharged to snf?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DISCHARGE_LOCATION" = "SNF" AND DEMOGRAPHIC."DIAGNOSIS" = "ABDOMINAL PAIN"

What is the number of patients with abdominal pain as their primary disease who were discharged to snf ?

Answer: 98


give me the number of patients with copd exacerbation primary disease who have been discharged to skilled nursing facility.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DISCHARGE_LOCATION" = "SNF" AND DEMOGRAPHIC."DIAGNOSIS" = "COPD EXACERBATION"

give me the number of patients with copd exacerbation primary disease who have been discharged to skilled nursing facility .

Answer: 11


How many patients discharge location is disch-tran to psych hosp and primary diagnosis is ruq pain?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DISCHARGE_LOCATION" = "DISCH-TRAN TO PSYCH HOSP" AND DEMOGRAPHIC."DIAGNOSIS" = "RUQ PAIN"

How many patients discharge location is disch-tran to psych hosp and primary diagnosis is ruq pain ?

Answer: 0


how many patients aged below 27 year had a discharge locaiton home health?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DISCHARGE_LOCATION" = "HOME HEALTH CARE" AND DEMOGRAPHIC."AGE" < "27"

how many patients aged below 27 year had a discharge locaiton home health ?

Answer: 1599


how many patients are discharged due to short term hospital and are under the age 64?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DISCHARGE_LOCATION" = "SHORT TERM HOSPITAL" AND DEMOGRAPHIC."AGE" < "64"

how many patients are discharged due to short term hospital and are under the age 64 ?

Answer: 1274


what is the number of patients who were hospitalized for more than 20 days and were later discharged home?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DISCHARGE_LOCATION" = "HOME" AND DEMOGRAPHIC."DAYS_STAY" > "20"

what is the number of patients who were hospitalized for more than 20 days and were later discharged home ?

Answer: 548


how many patients discharged to long term care hospital were born before 2058?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DISCHARGE_LOCATION" = "LONG TERM CARE HOSPITAL" AND DEMOGRAPHIC."DOB_YEAR" < "2058"

how many patients discharged to long term care hospital were born before 2058 ?

Answer: 577


how many patients born before 2078 are discharged to short term hospital?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DISCHARGE_LOCATION" = "SHORT TERM HOSPITAL" AND DEMOGRAPHIC."DOB_YEAR" < "2078"

how many patients born before 2078 are discharged to short term hospital ?

Answer: 175


What is the number of patients who were transfered to a cancer/chlidren hospital who had icd9 code 8604?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."DISCHARGE_LOCATION" = "DISC-TRAN CANCER/CHLDRN H" AND PROCEDURES."ICD9_CODE" = "8604"

What is the number of patients who were transfered to a cancer/chlidren hospital who had icd9 code 8604 ?

Answer: 0


how many of the patients with icd9 code 9229 were discharged for long term care hospital?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."DISCHARGE_LOCATION" = "LONG TERM CARE HOSPITAL" AND PROCEDURES."ICD9_CODE" = "9229"

how many of the patients with icd9 code 9229 were discharged for long term care hospital ?

Answer: 16


How many patients are treated for contrast arteriogram-leg and have their discharge location as home?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."DISCHARGE_LOCATION" = "HOME" AND PROCEDURES."SHORT_TITLE" = "Contrast arteriogram-leg"

How many patients are treated for contrast arteriogram-leg and have their discharge location as home ?

Answer: 93


how many patients were discharged to home after skin closure nec?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."DISCHARGE_LOCATION" = "HOME" AND PROCEDURES."SHORT_TITLE" = "Skin closure NEC"

how many patients were discharged to home after skin closure nec ?

Answer: 234


give  the number of patients whose primary disease is coronary artery disease/coronary artery bypass graft/sda and who were aged below 89 years.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT /SDA" AND DEMOGRAPHIC."AGE" < "89"

give the number of patients whose primary disease is coronary artery disease / coronary artery bypass graft / sda and who were aged below 89 years .

Answer: 579


what is the number of patients less than 89 years who are suffering from femoral artery thrombosis primaray disease?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "FEMORAL ARTERY THROMBOSIS" AND DEMOGRAPHIC."AGE" < "89"

what is the number of patients less than 89 years who are suffering from femoral artery thrombosis primaray disease ?

Answer: 1


how many patients with primary disease overdose were less than 50 years of age?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "OVERDOSE" AND DEMOGRAPHIC."AGE" < "50"

how many patients with primary disease overdose were less than 50 years of age ?

Answer: 162


give me the number of patients less than 51 years who have upper gi bleed primary disease.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "UPPER GI BLEED" AND DEMOGRAPHIC."AGE" < "51"

give me the number of patients less than 51 years who have upper gi bleed primary disease .

Answer: 106


how many patients are diagnosed with primary disease acidosis and are below 79 years of age?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "ACIDOSIS" AND DEMOGRAPHIC."AGE" < "79"

how many patients are diagnosed with primary disease acidosis and are below 79 years of age ?

Answer: 7


provide the number of patients younger than 20 years who have stemi primary disease.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "STEMI" AND DEMOGRAPHIC."AGE" < "20"

provide the number of patients younger than 20 years who have stemi primary disease .

Answer: 0


how many patients who are aged below 27 years had celo-vessicle fistula as the primary disease?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "CELO-VESSICLE FISTULA" AND DEMOGRAPHIC."AGE" < "27"

how many patients who are aged below 27 years had celo - vessicle fistula as the primary disease ?

Answer: 0


tell me the number of patients who are less than 54 years and have squamous cell carcinoma of oral tongue/sda.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "SQUAMOUS CELL CARCINOMA ORAL TONGUE/SDA" AND DEMOGRAPHIC."AGE" < "54"

tell me the number of patients who are less than 54 years and have squamous cell carcinoma of oral tongue / sda .

Answer: 0


what is the number of patients less than 56 years who have hyperglycemia primary disease?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "HYPERGLYCEMIA" AND DEMOGRAPHIC."AGE" < "56"

what is the number of patients less than 56 years who have hyperglycemia primary disease ?

Answer: 30


how many patients aged below 45 years had celo-vessicle fistula?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "CELO-VESSICLE FISTULA" AND DEMOGRAPHIC."AGE" < "45"

how many patients aged below 45 years had celo - vessicle fistula ?

Answer: 0


What is the number of patients less than 85 years who have liver transplant as their primary disease?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "LIVER TRANSPLANT" AND DEMOGRAPHIC."AGE" < "85"

What is the number of patients less than 85 years who have liver transplant as their primary disease ?

Answer: 20


how many patients with congestive heart failure stayed in the hospital for more than 13 days?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "CONGESTIVE HEART FAILURE" AND DEMOGRAPHIC."DAYS_STAY" > "13"

how many patients with congestive heart failure stayed in the hospital for more than 13 days ?

Answer: 205


How many patients diagnosed as newborn stayed in the hospital for more than 29 days?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "NEWBORN" AND DEMOGRAPHIC."DAYS_STAY" > "29"

How many patients diagnosed as newborn stayed in the hospital for more than 29 days ?

Answer: 809


what number of patients diagnosed primarily for chest pain were born before the year 1837?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "CHEST PAIN" AND DEMOGRAPHIC."DOB_YEAR" < "1837"

what number of patients diagnosed primarily for chest pain were born before the year 1837 ?

Answer: 18


How many patients with cerebral aneurysm/sda as their primary disease were born before the year 2126?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "CEREBRAL ANEURYSM/SDA" AND DEMOGRAPHIC."DOB_YEAR" < "2126"

How many patients with cerebral aneurysm/sda as their primary disease were born before the year 2126 ?

Answer: 42


get me the number of patients with upper gi bleed who were born before 2076?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "UPPER GI BLEED" AND DEMOGRAPHIC."DOB_YEAR" < "2076"

get me the number of patients with upper gi bleed who were born before 2076 ?

Answer: 234


how many patients born before the year 2167 were primarily diagnosed for hyperglycemia?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "HYPERGLYCEMIA" AND DEMOGRAPHIC."DOB_YEAR" < "2167"

how many patients born before the year 2167 were primarily diagnosed for hyperglycemia ?

Answer: 59


Provide the number of patients born before 2123 who have s/p hanging as their primary disease.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "S/P HANGING" AND DEMOGRAPHIC."DOB_YEAR" < "2123"

Provide the number of patients born before 2123 who have s/p hanging as their primary disease .

Answer: 6


Find out the number of patients with copd exacerbation as their primary disease who died in or before 2158.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "COPD EXACERBATION" AND DEMOGRAPHIC."DOD_YEAR" <= "2158.0"

Find out the number of patients with copd exacerbation as their primary disease who died in or before 2158 .

Answer: 25


How many of the newborn patients died in or before the year 2122?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "NEWBORN" AND DEMOGRAPHIC."DOD_YEAR" <= "2122.0"

How many of the newborn patients died in or before the year 2122 ?

Answer: 13


Provide me the number of patients born in or before 2179 who have left internal jugular vein thrombosis; left arm edema primary disease.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "LEFT INTERNAL JUGULAR VEIN THROMBOSIS;LEFT ARM EDEMA" AND DEMOGRAPHIC."DOD_YEAR" <= "2179.0"

Provide me the number of patients born in or before 2179 who have left internal jugular vein thrombosis ; left arm edema primary disease .

Answer: 1


give the number of patients who passed away in or before the year 2154 had femoral artery thrombosis.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "FEMORAL ARTERY THROMBOSIS" AND DEMOGRAPHIC."DOD_YEAR" <= "2154.0"

give the number of patients who passed away in or before the year 2154 had femoral artery thrombosis .

Answer: 0


Look for the number of patients with the primary disease syncope telemetry who died in or before 2158.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "SYNCOPE;TELEMETRY" AND DEMOGRAPHIC."DOD_YEAR" <= "2158.0"

Look for the number of patients with the primary disease syncope telemetry who died in or before 2158 .

Answer: 20


how many patients whose primary disease was syncope;telemetry died in or before year 2179?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "SYNCOPE;TELEMETRY" AND DEMOGRAPHIC."DOD_YEAR" <= "2179.0"

how many patients whose primary disease was syncope;telemetry died in or before year 2179 ?

Answer: 41


Among patients who died in or before the year 2115, how many had congestive heart failure as primary disease?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "CONGESTIVE HEART FAILURE" AND DEMOGRAPHIC."DOD_YEAR" <= "2115.0"

Among patients who died in or before the year 2115 , how many had congestive heart failure as primary disease ?

Answer: 57


Give the number of patients whose primary disease is cerebral aneurysm/sda and were admitted before the year 2200.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "CEREBRAL ANEURYSM/SDA" AND DEMOGRAPHIC."ADMITYEAR" < "2200"

Give the number of patients whose primary disease is cerebral aneurysm/sda and were admitted before the year 2200 .

Answer: 55


Among patients with cerebral aneurysm/sda as their primary disease, calculate the total number of those born before the year 2173.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "CEREBRAL ANEURYSM/SDA" AND DEMOGRAPHIC."ADMITYEAR" < "2173"

Among patients with cerebral aneurysm/sda as their primary disease , calculate the total number of those born before the year 2173 .

Answer: 36


how many patients admitted after year 2146 had ruq pain?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "RUQ PAIN" AND DEMOGRAPHIC."ADMITYEAR" < "2146"

how many patients admitted after year 2146 had ruq pain ?

Answer: 3


how many patients are diagnosed with primary disease sepsis and admitted before the year 2187?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."DIAGNOSIS" = "SEPSIS" AND DEMOGRAPHIC."ADMITYEAR" < "2187"

how many patients are diagnosed with primary disease sepsis and admitted before the year 2187 ?

Answer: 954


how many of the patients with sepsis as primary disease had icd9 code 9960?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."DIAGNOSIS" = "SEPSIS" AND PROCEDURES."ICD9_CODE" = "9960"

how many of the patients with sepsis as primary disease had icd9 code 9960 ?

Answer: 19


how many of the patients with gangrene as primary disease received po/ng therapy?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."DIAGNOSIS" = "GANGRENE" AND PRESCRIPTIONS."ROUTE" = "PO/NG"

how many of the patients with gangrene as primary disease received po / ng therapy ?

Answer: 6


what is the number of patients with newborn primary disease who had pleural lab test?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DIAGNOSIS" = "NEWBORN" AND LAB."FLUID" = "Pleural"

what is the number of patients with newborn primary disease who had pleural lab test ?

Answer: 8


Count the number of newborn patients whose lab test fluid is blood

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DIAGNOSIS" = "NEWBORN" AND LAB."FLUID" = "Blood"

Answer: 7577


How many patients with s/p fall as their primary disease had ascitic fluid lab test?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DIAGNOSIS" = "S/P FALL" AND LAB."FLUID" = "Ascites"

How many patients with s/p fall as their primary disease had ascitic fluid lab test ?

Answer: 3


how many patients aged below 36 years have stayed in the hospital for more than 14 days?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."AGE" < "36" AND DEMOGRAPHIC."DAYS_STAY" > "14"

how many patients aged below 36 years have stayed in the hospital for more than 14 days ?

Answer: 2007


how many patients less than 24 years of age were hospitalized for more than 11 days?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."AGE" < "24" AND DEMOGRAPHIC."DAYS_STAY" > "11"

how many patients less than 24 years of age were hospitalized for more than 11 days ?

Answer: 1942


bring the number of patients younger than 48 years who were admitted before 2138.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."AGE" < "48" AND DEMOGRAPHIC."ADMITYEAR" < "2138"

bring the number of patients younger than 48 years who were admitted before 2138 .

Answer: 5643


how many patients are below 49 years of age and admitted under the year 2198?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."AGE" < "49" AND DEMOGRAPHIC."ADMITYEAR" < "2198"

how many patients are below 49 years of age and admitted under the year 2198 ?

Answer: 14882


provide the number of patients less than 58 years who were admitted to hospital before 2107.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."AGE" < "58" AND DEMOGRAPHIC."ADMITYEAR" < "2107"

provide the number of patients less than 58 years who were admitted to hospital before 2107 .

Answer: 1368


provide me the number of patients younger than 31 years with diagnosis icd9 code v140.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."AGE" < "31" AND DIAGNOSES."ICD9_CODE" = "V140"

provide me the number of patients younger than 31 years with diagnosis icd9 code v140 .

Answer: 2


count the number of patients who have diagnoses icd9 code 32723 and are less than 50 years of age.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."AGE" < "50" AND DIAGNOSES."ICD9_CODE" = "32723"

count the number of patients who have diagnoses icd9 code 32723 and are less than 50 years of age .

Answer: 285


What is the number of patients younger than 31 with a diagnoses icd9 code 70721?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."AGE" < "31" AND DIAGNOSES."ICD9_CODE" = "70721"

What is the number of patients younger than 31 with a diagnoses icd9 code 70721 ?

Answer: 2


How many patients aged below 43 years old are diagnosed with prob-head/neck/trunk nos?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."AGE" < "43" AND DIAGNOSES."SHORT_TITLE" = "Prob-head/neck/trunk NOS"

How many patients aged below 43 years old are diagnosed with prob-head/neck/trunk nos ?

Answer: 0


what is the number of patients with acute vascular insufficiency of intestine who are less than 50 years of age?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."AGE" < "50" AND DIAGNOSES."LONG_TITLE" = "Acute vascular insufficiency of intestine"

what is the number of patients with acute vascular insufficiency of intestine who are less than 50 years of age ?

Answer: 68


Find the patients aged less than 64 years old with procedure icd9 code 4311.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."AGE" < "64" AND PROCEDURES."ICD9_CODE" = "4311"

Find the patients aged less than 64 years old with procedure icd9 code 4311 .

Answer: 570


How many pateints aged below 77 had undergone the procedure with icd9 code 4632?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."AGE" < "77" AND PROCEDURES."ICD9_CODE" = "4632"

How many pateints aged below 77 had undergone the procedure with icd9 code 4632 ?

Answer: 84


how many patients are under 61 years of age have procedure icd9 code 8619?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."AGE" < "61" AND PROCEDURES."ICD9_CODE" = "8619"

how many patients are under 61 years of age have procedure icd9 code 8619 ?

Answer: 0


how many patients below 77 years of age have undergone the procedure with short title percu endosc gastrostomy?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."AGE" < "77" AND PROCEDURES."SHORT_TITLE" = "Percu endosc gastrostomy"

how many patients below 77 years of age have undergone the procedure with short title percu endosc gastrostomy ?

Answer: 989


Find the number of patients less than 70 years of age who had a percutaneous liver aspiration procedure.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."AGE" < "70" AND PROCEDURES."SHORT_TITLE" = "Percutan liver aspirat"

Find the number of patients less than 70 years of age who had a percutaneous liver aspiration procedure .

Answer: 34


Out of the total number of patients with percutaneous abdominal drainage, how many of them were aged below 61?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."AGE" < "61" AND PROCEDURES."LONG_TITLE" = "Percutaneous abdominal drainage"

Out of the total number of patients with percutaneous abdominal drainage , how many of them were aged below 61 ?

Answer: 715


out of total number of patients who had endoscopic insertion of stent (tube) into bile duct, calculate the number of those aged below 45

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."AGE" < "45" AND PROCEDURES."LONG_TITLE" = "Endoscopic insertion of stent (tube) into bile duct"

out of total number of patients who had endoscopic insertion of stent ( tube ) into bile duct , calculate the number of those aged below 45

Answer: 29


what number of patients under the age of 51 were given the drug metoprolol tartrate?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."AGE" < "51" AND PRESCRIPTIONS."DRUG" = "Metoprolol Tartrate"

what number of patients under the age of 51 were given the drug metoprolol tartrate ?

Answer: 1136


among the patients who were treated with pravastatin, how many of them were aged below 72?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."AGE" < "72" AND PRESCRIPTIONS."DRUG" = "Pravastatin"

among the patients who were treated with pravastatin , how many of them were aged below 72 ?

Answer: 555


give me the number of patients less than 81 years who were prescribed critic-aid clear af drug.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."AGE" < "81" AND PRESCRIPTIONS."DRUG" = "Critic-Aid Clear AF"

give me the number of patients less than 81 years who were prescribed critic - aid clear af drug .

Answer: 3


how many patients below the age of 56 were given voriconazole?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."AGE" < "56" AND PRESCRIPTIONS."DRUG" = "Voriconazole"

how many patients below the age of 56 were given voriconazole ?

Answer: 125


calculate the number of patients less than 59 years who have drug code tacrsusp.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."AGE" < "59" AND PRESCRIPTIONS."FORMULARY_DRUG_CD" = "TACRSUSP"

calculate the number of patients less than 59 years who have drug code tacrsusp .

Answer: 213


Show the number of patients who are less than 60 years of age and have the drug code morp2i.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."AGE" < "62" AND PRESCRIPTIONS."FORMULARY_DRUG_CD" = "MORP2I"

Show the number of patients who are less than 60 years of age and have the drug code morp2i .

Answer: 5465


find the number of patients who are less than 43 years of age and their drug code is hepbase.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."AGE" < "43" AND PRESCRIPTIONS."FORMULARY_DRUG_CD" = "HEPBASE"

find the number of patients who are less than 43 years of age and their drug code is hepbase .

Answer: 526


how many patients aged below 43 year had the drug route dialysis?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."AGE" < "43" AND PRESCRIPTIONS."ROUTE" = "DIALYS"

how many patients aged below 43 year had the drug route dialysis ?

Answer: 103


how many patients aged below 31 years had sc as the drug route?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."AGE" < "31" AND PRESCRIPTIONS."ROUTE" = "SC"

how many patients aged below 31 years had sc as the drug route ?

Answer: 1873


find the number of patients whose drug route is dialys and age under 83 years.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."AGE" < "83" AND PRESCRIPTIONS."ROUTE" = "DIALYS"

find the number of patients whose drug route is dialys and age under 83 years .

Answer: 938


count the number of patients less than 58 years on neb route of drug administration.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."AGE" < "58" AND PRESCRIPTIONS."ROUTE" = "NEB"

count the number of patients less than 58 years on neb route of drug administration .

Answer: 283


get me the number of patients less than 70 years who take drug via inhalation.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."AGE" < "70" AND PRESCRIPTIONS."ROUTE" = "INHALATION"

get me the number of patients less than 70 years who take drug via inhalation .

Answer: 72


how many patients younger than 70 years have got the cerebrospinal fluid (csf) lab test done?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."AGE" < "70" AND LAB."FLUID" = "Cerebrospinal Fluid (CSF)"

how many patients younger than 70 years have got the cerebrospinal fluid ( csf ) lab test done ?

Answer: 1988


how many patients are below 41 years of age and tested with joint fluid in lab?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."AGE" < "41" AND LAB."FLUID" = "Joint Fluid"

how many patients are below 41 years of age and tested with joint fluid in lab ?

Answer: 28


Bring the list of patients younger than 41 years of age who had a blood lab test done.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."AGE" < "41" AND LAB."FLUID" = "Blood"

Bring the list of patients younger than 41 years of age who had a blood lab test done .

Answer: 11962


among patients aged below 43, how many of them had a lab test for ascites?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."AGE" < "43" AND LAB."FLUID" = "Ascites"

among patients aged below 43 , how many of them had a lab test for ascites ?

Answer: 189


how many patients below 43 years of age tested in lab for pleural fluid?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."AGE" < "43" AND LAB."FLUID" = "Pleural"

how many patients below 43 years of age tested in lab for pleural fluid ?

Answer: 144


how many patients are less than 31 year old with a chemistry lab test category?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."AGE" < "31" AND LAB."CATEGORY" = "Chemistry"

how many patients are less than 31 year old with a chemistry lab test category ?

Answer: 8679


find the number of patients who are below the age of 41 and lab test category is blood gas.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."AGE" < "41" AND LAB."CATEGORY" = "Blood Gas"

find the number of patients who are below the age of 41 and lab test category is blood gas .

Answer: 5688


find the number of patients whose lab test category is hematology and age is under 61 years.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."AGE" < "61" AND LAB."CATEGORY" = "Hematology"

find the number of patients whose lab test category is hematology and age is under 61 years .

Answer: 22171


give me the nymber of patients with diagnosis icd9 code 99681 who stayed in hospital for more than 4 days.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "4" AND DIAGNOSES."ICD9_CODE" = "99681"

give me the nymber of patients with diagnosis icd9 code 99681 who stayed in hospital for more than 4 days .

Answer: 255


provide the number of patients with diagnoses icd9 code 317 who were admitted for more than 34 days.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "34" AND DIAGNOSES."ICD9_CODE" = "317"

provide the number of patients with diagnoses icd9 code 317 who were admitted for more than 34 days .

Answer: 2


how many patients stayed in hospital for more than 6 days and were diagnosed with orthostatic hypertension?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "6" AND DIAGNOSES."SHORT_TITLE" = "Orthostatic hypotension"

how many patients stayed in hospital for more than 6 days and were diagnosed with orthostatic hypertension ?

Answer: 134


how many patients diagnosed with chronic diastolic heart failure were hospitalized for more than 30 days?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "30" AND DIAGNOSES."SHORT_TITLE" = "Chr diastolic hrt fail"

how many patients diagnosed with chronic diastolic heart failure were hospitalized for more than 30 days ?

Answer: 33


calculate the number of patients with personality disorder nos who had a hospital stay for more than 5 days.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "5" AND DIAGNOSES."SHORT_TITLE" = "Personality disorder NOS"

calculate the number of patients with personality disorder nos who had a hospital stay for more than 5 days .

Answer: 11


how many patients who stayed in the hospital for more than 3 days had procedure icd9 code 5451?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "3" AND PROCEDURES."ICD9_CODE" = "5451"

how many patients who stayed in the hospital for more than 3 days had procedure icd9 code 5451 ?

Answer: 24


how many patients admitted under procedure icd9 code 5198 stayed in the hospital for more than 1 day?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "1" AND PROCEDURES."ICD9_CODE" = "5198"

how many patients admitted under procedure icd9 code 5198 stayed in the hospital for more than 1 day ?

Answer: 147


Calculate the patients who are prescribed additive drugs that have stayed in the hospital for more than 5 days.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "5" AND PRESCRIPTIONS."DRUG_TYPE" = "ADDITIVE"

Calculate the patients who are prescribed additive drugs that have stayed in the hospital for more than 5 days .

Answer: 3381


how many patients stayed in hospital for more than 9 days and used the drug ibuprofen suspension?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "9" AND PRESCRIPTIONS."DRUG" = "Ibuprofen Suspension"

how many patients stayed in hospital for more than 9 days and used the drug ibuprofen suspension ?

Answer: 278


tell me the number of patients on prescription of alteplase (catheter clearance) who had to stay for more than 43 days in hospital.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "43" AND PRESCRIPTIONS."DRUG" = "Alteplase (Catheter Clearance)"

tell me the number of patients on prescription of alteplase ( catheter clearance ) who had to stay for more than 43 days in hospital .

Answer: 358


what is the number of patients who stayed in the hospital for more than 34 days and have been prescribed the drug neo*po*mct oil?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "34" AND PRESCRIPTIONS."DRUG" = "NEO*PO*MCT Oil"

what is the number of patients who stayed in the hospital for more than 34 days and have been prescribed the drug neo*po*mct oil ?

Answer: 374


how many of the patients with item id 50976 remained admitted in hospital for more than 16 days?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "16" AND LAB."ITEMID" = "50976"

how many of the patients with item i d 50976 remained admitted in hospital for more than 16 days ?

Answer: 1243


what is the number of patients whose hospital stay is above 14 days and with lab test methemoglobin?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "14" AND LAB."LABEL" = "Methemoglobin"

what is the number of patients whose hospital stay is above 14 days and with lab test methemoglobin ?

Answer: 475


bring the number of patients who have had 24 hr creatinine lab test and stayed in hospital for more than 26 days.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "26" AND LAB."LABEL" = "24 hr Creatinine"

bring the number of patients who have had 24 hr creatinine lab test and stayed in hospital for more than 26 days .

Answer: 98


give the number of patients who have stayed in the hospital for more than one day whose lab test fluid is urine.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "1" AND LAB."FLUID" = "Urine"

give the number of patients who have stayed in the hospital for more than one day whose lab test fluid is urine .

Answer: 28742


how many patients admitted for more than 2 days had a lab test for urine

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "2" AND LAB."FLUID" = "Urine"

Answer: 27171


provide the number of patients who had other body fluid lab test and were hospitalized for more than 2 days.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "2" AND LAB."FLUID" = "Other Body Fluid"

provide the number of patients who had other body fluid lab test and were hospitalized for more than 2 days .

Answer: 2430


count the number of patients who were admitted for more than 5 days in hospital and had chemistry lab test category.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DAYS_STAY" > "5" AND LAB."CATEGORY" = "Chemistry"

count the number of patients who were admitted for more than 5 days in hospital and had chemistry lab test category .

Answer: 25971


provide the number of patients born before 2024 diagnosed with other chronic nonalcoholic liver disease.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."DOB_YEAR" < "2024" AND DIAGNOSES."SHORT_TITLE" = "Chronic liver dis NEC"

provide the number of patients born before 2024 diagnosed with other chronic nonalcoholic liver disease .

Answer: 1


what is the number of patients whose year of birth is  before 2065 and procedure icd9 code 46?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."DOB_YEAR" < "2065" AND PROCEDURES."ICD9_CODE" = "46"

what is the number of patients whose year of birth is before 2065 and procedure icd9 code 46 ?

Answer: 0


Give the number of patients who were born before the year 2065 and have a procedure icd9 code as 9604?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."DOB_YEAR" < "2065" AND PROCEDURES."ICD9_CODE" = "9604"

Give the number of patients who were born before the year 2065 and have a procedure icd9 code as 9604 ?

Answer: 2438


how many patients are born before 2121 and followed the procedure biopsy of tonsils and adenoids?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."DOB_YEAR" < "2121" AND PROCEDURES."LONG_TITLE" = "Biopsy of tonsils and adenoids"

how many patients are born before 2121 and followed the procedure biopsy of tonsils and adenoids ?

Answer: 2


count the number of patients born before 2065 who had prophylactic administration of vaccine against other diseases.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."DOB_YEAR" < "2065" AND PROCEDURES."LONG_TITLE" = "Prophylactic administration of vaccine against other diseases"

count the number of patients born before 2065 who had prophylactic administration of vaccine against other diseases .

Answer: 5


what is the number of patients who had coronary arteriography using two catheters and were born before 2109?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."DOB_YEAR" < "2109" AND PROCEDURES."LONG_TITLE" = "Coronary arteriography using two catheters"

what is the number of patients who had coronary arteriography using two catheters and were born before 2109 ?

Answer: 3715


count the number of patients on additive type drug prescription who were born before 2104.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."DOB_YEAR" < "2104" AND PRESCRIPTIONS."DRUG_TYPE" = "ADDITIVE"

count the number of patients on additive type drug prescription who were born before 2104 .

Answer: 1613


how many patients born before the year 2104 were given the drug vancomycin?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."DOB_YEAR" < "2104" AND PRESCRIPTIONS."DRUG" = "Vancomycin"

how many patients born before the year 2104 were given the drug vancomycin ?

Answer: 7388


count the number of patients on norepinephrine prescription who were born before the year 2109.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."DOB_YEAR" < "2109" AND PRESCRIPTIONS."DRUG" = "NORepinephrine"

count the number of patients on norepinephrine prescription who were born before the year 2109 .

Answer: 915


count the number of patients born before 2053 who are taking drug via ivpca route.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."DOB_YEAR" < "2053" AND PRESCRIPTIONS."ROUTE" = "IVPCA"

count the number of patients born before 2053 who are taking drug via ivpca route .

Answer: 560


how many patients were born before the year 2071 with an item id 50953?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DOB_YEAR" < "2071" AND LAB."ITEMID" = "50953"

how many patients were born before the year 2071 with an item i d 50953 ?

Answer: 2885


How many patients born before the year 2170 had a lab test named other cells?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DOB_YEAR" < "2170" AND LAB."LABEL" = "Other Cells"

How many patients born before the year 2170 had a lab test named other cells ?

Answer: 512


how many patients year of birth is before 1821 with lab test lactate dehydrogenase csf?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DOB_YEAR" < "1821" AND LAB."LABEL" = "Lactate Dehydrogenase, CSF"

how many patients year of birth is before 1821 with lab test lactate dehydrogenase csf ?

Answer: 3


Out of total number of patients who had a lab test for pleural fluid, how many of them were born before 2089?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DOB_YEAR" < "2089" AND LAB."FLUID" = "Pleural"

Out of total number of patients who had a lab test for pleural fluid , how many of them were born before 2089 ?

Answer: 879


What is the number of patients born before 2120 who had urine lab tests?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DOB_YEAR" < "2120" AND LAB."FLUID" = "Urine"

What is the number of patients born before 2120 who had urine lab tests ?

Answer: 24817


what is the number of patients who had other endoscopy of small intestine and died on or before 2115?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."DOD_YEAR" <= "2115.0" AND PROCEDURES."LONG_TITLE" = "Other endoscopy of small intestine"

what is the number of patients who had other endoscopy of small intestine and died on or before 2115 ?

Answer: 165


How many patients with drug code beth5 died in or before the year 2122?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."DOD_YEAR" <= "2122.0" AND PRESCRIPTIONS."FORMULARY_DRUG_CD" = "BETH5"

How many patients with drug code beth5 died in or before the year 2122 ?

Answer: 1


how many patients had white blood cells test and died in or before 2131?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."DOD_YEAR" <= "2131.0" AND LAB."LABEL" = "White Blood Cells"

how many patients had white blood cells test and died in or before 2131 ?

Answer: 4619


give me the number of patients who were admitted before the year 2157 with 78039 as their diagnosis icd9 code

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2157" AND DIAGNOSES."ICD9_CODE" = "78039"

Answer: 958


How many patients admitted before 2112 had icd9 code 56212?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2112" AND DIAGNOSES."ICD9_CODE" = "56212"

How many patients admitted before 2112 had icd9 code 56212 ?

Answer: 38


how many patients are admitted before the year 2200 and diagnosed with icd9 code e8791?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2200" AND DIAGNOSES."ICD9_CODE" = "E8791"

how many patients are admitted before the year 2200 and diagnosed with icd9 code e8791 ?

Answer: 147


How many of the patients admitted before the year 2173 were diagnosed with ac salpingo-oophoritis?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2173" AND DIAGNOSES."SHORT_TITLE" = "Ac salpingo-oophoritis"

How many of the patients admitted before the year 2173 were diagnosed with ac salpingo-oophoritis ?

Answer: 5


How many of the patients admitted before 2112 were diagnosed with chest pain nec?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2112" AND DIAGNOSES."SHORT_TITLE" = "Chest pain NEC"

How many of the patients admitted before 2112 were diagnosed with chest pain nec ?

Answer: 25


tell me the number of patients with a diagnoses of full incontinence of feces who were admitted before the year 2154.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2154" AND DIAGNOSES."SHORT_TITLE" = "Full incontinence-feces"

tell me the number of patients with a diagnoses of full incontinence of feces who were admitted before the year 2154 .

Answer: 10


how many patients are admitted before the year 2145 and diagnosed with syncope and collapse?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2145" AND DIAGNOSES."SHORT_TITLE" = "Syncope and collapse"

how many patients are admitted before the year 2145 and diagnosed with syncope and collapse ?

Answer: 181


Find the number of patients admitted before 2138 who had unspecified schizophrenia and unspecified diagnoses.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2138" AND DIAGNOSES."LONG_TITLE" = "Unspecified schizophrenia, unspecified"

Find the number of patients admitted before 2138 who had unspecified schizophrenia and unspecified diagnoses .

Answer: 72


How many patients admitted before 2112 are diagnosed with retained plastic fragments?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2112" AND DIAGNOSES."LONG_TITLE" = "Retained plastic fragments"

How many patients admitted before 2112 are diagnosed with retained plastic fragments ?

Answer: 0


what is the number of patients whose admission year is before 2137 with procedure icd9 code 3972?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2137" AND PROCEDURES."ICD9_CODE" = "3972"

what is the number of patients whose admission year is before 2137 with procedure icd9 code 3972 ?

Answer: 111


how many patients were admitted before the year 2103 and underwent procedure under icd9 code 93?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2103" AND PROCEDURES."ICD9_CODE" = "93"

how many patients were admitted before the year 2103 and underwent procedure under icd9 code 93 ?

Answer: 0


what is the number of patients admitted before 2166 with procedure icd9 code 5011?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2166" AND PROCEDURES."ICD9_CODE" = "5011"

what is the number of patients admitted before 2166 with procedure icd9 code 5011 ?

Answer: 177


How many patients were admitted to the hospital before year 2167 with procedure short title adm inhal nitric oxide?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2167" AND PROCEDURES."SHORT_TITLE" = "Adm inhal nitric oxide"

How many patients were admitted to the hospital before year 2167 with procedure short title adm inhal nitric oxide ?

Answer: 23


what is the number of patients who have dialys route of drug administration and were admitted before 2154?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2154" AND PRESCRIPTIONS."ROUTE" = "DIALYS"

what is the number of patients who have dialys route of drug administration and were admitted before 2154 ?

Answer: 541


what is the number of patients whose drug route is tp and admission year is before 2167?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2167" AND PRESCRIPTIONS."ROUTE" = "TP"

what is the number of patients whose drug route is tp and admission year is before 2167 ?

Answer: 8318


among patients admitted in the year less than 2156, how many had item id 51383?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2156" AND LAB."ITEMID" = "51383"

among patients admitted in the year less than 2156 , how many had item i d 51383 ?

Answer: 151


how many patients admitted before the year 2120 had the lab test item id 51044?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2120" AND LAB."ITEMID" = "51044"

how many patients admitted before the year 2120 had the lab test item i d 51044 ?

Answer: 7


Give me the number of patients admitted before the year 2129 and whose lab test name is rbc, pleural.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2129" AND LAB."LABEL" = "RBC, Pleural"

Give me the number of patients admitted before the year 2129 and whose lab test name is rbc , pleural .

Answer: 418


count the number of patients who were admitted before 2158 and had thyroxine (t4) lab test.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2158" AND LAB."LABEL" = "Thyroxine (T4)"

count the number of patients who were admitted before 2158 and had thyroxine ( t4 ) lab test .

Answer: 923


Calculate the total number of patients admitted before 2123, who had a lab test for clinical chemistry.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2123" AND LAB."CATEGORY" = "Chemistry"

Calculate the total number of patients admitted before 2123 , who had a lab test for clinical chemistry .

Answer: 10078


Count the number of patients admitted before 2124 categorized under chemistry lab tests.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."ADMITYEAR" < "2124" AND LAB."CATEGORY" = "Chemistry"

Count the number of patients admitted before 2124 categorized under chemistry lab tests .

Answer: 10521


how many of the patients diagnosed with icd9 code 4464 were treated with base drug?

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."ICD9_CODE" = "4464" AND PRESCRIPTIONS."DRUG_TYPE" = "BASE"

how many of the patients diagnosed with icd9 code 4464 were treated with base drug ?

Answer: 30


how many patients with diagnoses icd9 code 53190 have had delta abnormal lab test status?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DIAGNOSES."ICD9_CODE" = "53190" AND LAB."FLAG" = "delta"

how many patients with diagnoses icd9 code 53190 have had delta abnormal lab test status ?

Answer: 42


give me the number of patients who were diagnosed under icd9 code 76528 and also their lab test category is chemistry.

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DIAGNOSES."ICD9_CODE" = "76528" AND LAB."CATEGORY" = "Chemistry"

give me the number of patients who were diagnosed under icd9 code 76528 and also their lab test category is chemistry .

Answer: 810


how many patients with polycythemia were treated with main drug?

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" = "Polycythemia vera" AND PRESCRIPTIONS."DRUG_TYPE" = "MAIN"

how many patients with polycythemia were treated with main drug ?

Answer: 83


report the number of patients on pr route of drug administration who were diagnosed with antineoplastic and immunosuppressive drugs causing adverse effects in therapeutic use.

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" = "Adv eff antineoplastic" AND PRESCRIPTIONS."ROUTE" = "PR"

report the number of patients on pr route of drug administration who were diagnosed with antineoplastic and immunosuppressive drugs causing adverse effects in therapeutic use .

Answer: 211


how many patients are diagnosed with the history of tobacco use and tested under the lab category blood gas?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DIAGNOSES."SHORT_TITLE" = "History of tobacco use" AND LAB."CATEGORY" = "Blood Gas"

how many patients are diagnosed with the history of tobacco use and tested under the lab category blood gas ?

Answer: 2151


how many patients are diagnosed with unspecified coagulation defects and used the additive drug type?

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."LONG_TITLE" = "Other and unspecified coagulation defects" AND PRESCRIPTIONS."DRUG_TYPE" = "ADDITIVE"

how many patients are diagnosed with unspecified coagulation defects and used the additive drug type ?

Answer: 83


how many patients are diagnosed with opioid type dependence (unspecified) with td drug route?

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."LONG_TITLE" = "Opioid type dependence, unspecified" AND PRESCRIPTIONS."ROUTE" = "TD"

how many patients are diagnosed with opioid type dependence ( unspecified ) with td drug route ?

Answer: 33


provide the number of patients whose procedure icd9 code is 4576 and drug route is iv bolus

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE PROCEDURES."ICD9_CODE" = "4576" AND PRESCRIPTIONS."ROUTE" = "IV BOLUS"

Answer: 25


Which patients have an abnormal test with lab test item id 51255?

SELECT COUNT ( DISTINCT DEMOGRAPHIC."SUBJECT_ID" ) FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE LAB."ITEMID" = "51255" AND LAB."FLAG" = "abnormal"

Which patients have an abnormal test with lab test item id 51255 ?

Answer: 4073


SELECT DEMOGRAPHIC."RELIGION" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

Answer: NOT SPECIFIED


specify the admission type of patient with patient id 2560.

SELECT DEMOGRAPHIC."ADMISSION_TYPE" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

specify the admission type of patient with patient i d 2560 .

Answer: NEWBORN


specify ethnic origin of patient id 2560

SELECT DEMOGRAPHIC."ETHNICITY" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

specify ethnic origin of patient i d 2560

Answer: BLACK/AFRICAN AMERICAN


what is the admission location of subject id 2560?

SELECT DEMOGRAPHIC."ADMISSION_LOCATION" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

what is the admission location of subject i d 2560 ?

Answer: PHYS REFERRAL/NORMAL DELI


At what time was the patient with patient id 2560 admitted in the hospital?

SELECT DEMOGRAPHIC."ADMITTIME" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

At what time was the patient with patient id 2560 admitted in the hospital ?

Answer: 2182-04-24 21:20:00


tell me the icu stay id of the patient with patient id 2560.

SELECT PRESCRIPTIONS."ICUSTAY_ID" FROM PRESCRIPTIONS WHERE PRESCRIPTIONS."SUBJECT_ID" = "2560"

tell me the icu stay i d of the patient with patient i d 2560 .

Answer: 201579

Answer: 201579

Answer: 201579

Answer: 201579


bring me the lab test name of the patient with patient id 2560.

SELECT LAB."LABEL" FROM LAB WHERE LAB."SUBJECT_ID" = "2560"

bring me the lab test name of the patient with patient i d 2560 .

Answer: Bilirubin, Total

Answer: Basophils

Answer: Eosinophils

Answer: Hematocrit

Answer: Hemoglobin

Answer: Lymphocytes

Answer: MCH

Answer: MCHC

Answer: MCV

Answer: Monocytes

Answer: Neutrophils

Answer: Platelet Count

Answer: RDW

Answer: Red Blood Cells

Answer: White Blood Cells

Answer: Atypical Lymphocytes

Answer: Bands

Answer: Metamyelocytes

Answer: Myelocytes

Answer: Nucleated Red Cells

Answer: Bilirubin, Direct

Answer: Bilirubin, Indirect


let me know the age and name of patient with patient id 2560.

SELECT DEMOGRAPHIC."NAME",DEMOGRAPHIC."AGE" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

let me know the age and name of patient with patient i d 2560 .

Answer: Shawn Green


tell me the gender and name of patient with patient id 2560.

SELECT DEMOGRAPHIC."NAME",DEMOGRAPHIC."GENDER" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

tell me the gender and name of patient with patient i d 2560 .

Answer: Shawn Green


tell me the time of admission and name of the patient with patient id 2560.

SELECT DEMOGRAPHIC."NAME",DEMOGRAPHIC."ADMITTIME" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

tell me the time of admission and name of the patient with patient i d 2560 .

Answer: Shawn Green


what is the age and ethnicity of the patient id 2560?

SELECT DEMOGRAPHIC."AGE",DEMOGRAPHIC."ETHNICITY" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

what is the age and ethnicity of the patient i d 2560 ?

Answer: 0


tell me the age and location of admission for the patient with patient id 2560.

SELECT DEMOGRAPHIC."AGE",DEMOGRAPHIC."ADMISSION_LOCATION" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

tell me the age and location of admission for the patient with patient i d 2560 .

Answer: 0


what is the age and diagnosis icd9 code of subject id 2560?

SELECT DEMOGRAPHIC."AGE",DIAGNOSES."ICD9_CODE" FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

what is the age and diagnosis icd9 code of subject i d 2560 ?

Answer: 0

Answer: 0

Answer: 0

Answer: 0

Answer: 0


Specify the age of patient id 2560 and drug he was treated with

SELECT DEMOGRAPHIC."AGE",PRESCRIPTIONS."DRUG" FROM DEMOGRAPHIC INNER JOIN PRESCRIPTIONS on DEMOGRAPHIC.HADM_ID = PRESCRIPTIONS.HADM_ID WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

Answer: 0

Answer: 0

Answer: 0

Answer: 0


let me know the gender and birth date of patient with patient id 2560.

SELECT DEMOGRAPHIC."DOB",DEMOGRAPHIC."GENDER" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

let me know the gender and birth date of patient with patient i d 2560 .

Answer: 2182-04-24 00:00:00


let me know the gender and days for which patient with patient id 2560 was admitted.

SELECT DEMOGRAPHIC."GENDER",DEMOGRAPHIC."DAYS_STAY" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

let me know the gender and days for which patient with patient i d 2560 was admitted .

Answer: M


what is the gender and diagnosis icd9 code of the patient id 2560?

SELECT DEMOGRAPHIC."GENDER",DIAGNOSES."ICD9_CODE" FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

what is the gender and diagnosis icd9 code of the patient i d 2560 ?

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M


let me know the gender and short title of diagnoses for patient with patient id 2560.

SELECT DEMOGRAPHIC."GENDER",DIAGNOSES."SHORT_TITLE" FROM DEMOGRAPHIC INNER JOIN DIAGNOSES on DEMOGRAPHIC.HADM_ID = DIAGNOSES.HADM_ID WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

let me know the gender and short title of diagnoses for patient with patient i d 2560 .

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M


tell me the gender and procedure icd9 code of patient with patient id 2560.

SELECT DEMOGRAPHIC."GENDER",PROCEDURES."ICD9_CODE" FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

tell me the gender and procedure icd9 code of patient with patient i d 2560 .

Answer: M

Answer: M


for patient id 2560, specify gender and item id.

SELECT DEMOGRAPHIC."GENDER",LAB."ITEMID" FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

for patient i d 2560 , specify gender and item i d .

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M


let me know the gender and lab test abnormal status of patient with patient id 2560.

SELECT DEMOGRAPHIC."GENDER",LAB."FLAG" FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

let me know the gender and lab test abnormal status of patient with patient i d 2560 .

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M


Get me the gender and lab test name for patient with patient id 2560.

SELECT DEMOGRAPHIC."GENDER",LAB."LABEL" FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

Get me the gender and lab test name for patient with patient id 2560 .

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M

Answer: M


mention the admission type and death status of the patient with patient id 2560.

SELECT DEMOGRAPHIC."ADMISSION_TYPE",DEMOGRAPHIC."EXPIRE_FLAG" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

mention the admission type and death status of the patient with patient i d 2560 .

Answer: NEWBORN


tell me the admission type and primary disease of subject id 2560.

SELECT DEMOGRAPHIC."ADMISSION_TYPE",DEMOGRAPHIC."DIAGNOSIS" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

tell me the admission type and primary disease of subject i d 2560 .

Answer: NEWBORN


Let me know the type of admission and procedure ic9 code for the patient with patient id 2560.

SELECT DEMOGRAPHIC."ADMISSION_TYPE",PROCEDURES."ICD9_CODE" FROM DEMOGRAPHIC INNER JOIN PROCEDURES on DEMOGRAPHIC.HADM_ID = PROCEDURES.HADM_ID WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

Let me know the type of admission and procedure ic9 code for the patient with patient id 2560 .

Answer: NEWBORN

Answer: NEWBORN


what is the admission type and lab test name for the patient id 2560?

SELECT DEMOGRAPHIC."ADMISSION_TYPE",LAB."LABEL" FROM DEMOGRAPHIC INNER JOIN LAB on DEMOGRAPHIC.HADM_ID = LAB.HADM_ID WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

what is the admission type and lab test name for the patient i d 2560 ?

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN

Answer: NEWBORN


What is the primary disease and days of hospital stay for patient id 2560

SELECT DEMOGRAPHIC."DAYS_STAY",DEMOGRAPHIC."DIAGNOSIS" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

Answer: 4


what is the days of hospital stay and date of death of subject id 2560?

SELECT DEMOGRAPHIC."DAYS_STAY",DEMOGRAPHIC."DOD" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "2560"

what is the days of hospital stay and date of death of subject i d 2560 ?

Answer: 4


what is the subject name of subject id 6983?

SELECT DEMOGRAPHIC."NAME" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "6983"

what is the subject name of subject i d 6983 ?

Answer: Edward Castillo

Answer: Edward Castillo


SELECT DEMOGRAPHIC."GENDER" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "6983"

Answer: M

Answer: M


to which religious background does the patient with patient id 6983 belong to?

SELECT DEMOGRAPHIC."RELIGION" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "6983"

to which religious background does the patient with patient i d 6983 belong to ?

Answer: JEWISH

Answer: JEWISH


on which date did the patient with patient id 6983 die?

SELECT DEMOGRAPHIC."DOD" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "6983"

on which date did the patient with patient i d 6983 die ?

Answer: 2179-07-02 00:00:00

Answer: 2179-07-02 00:00:00


find the discharge time for subject id 6983.

SELECT DEMOGRAPHIC."DISCHTIME" FROM DEMOGRAPHIC WHERE DEMOGRAPHIC."SUBJECT_ID" = "6983"

find the discharge time for subject i d 6983 .

Answer: 2177-08-06 15:16:00

Answer: 2177-08-21 13:30:00


How is the drug administered to patient with patient id 6983?

SELECT PRESCRIPTIONS."ROUTE" FROM PRESCRIPTIONS WHERE PRESCRIPTIONS."SUBJECT_ID" = "6983"

How is the drug administered to patient with patient id 6983 ?

Answer: PO

Answer: PO

Answer: PO

Answer: PO

Answer: IV

Answer: IV

Answer: IV

Answer: IV

Answer: PO

Answer: SC

Answer: IV

Answer: PO

Answer: IV

Answer: IV

Answer: PO

Answer: IV

Answer: PO

Answer: PO

Answer: IV

Answer: IV

Answer: PO

Answer: PO

Answer: TP

Answer: PO

Answer: PO

Answer: IV

Answer: IV

Answer: TP

Answer: PO

Answer: PO

Answer: PO

Answer: IV

Answer: PO

Answer: IV

Answer: IV

Answer: IV

Answer: IV

Answer: IV

Answer: IV

Answer: SC

Answer: SC

Answer: PO

Answer: PO

Answer: IV

Answer: IV

Answer: IV

Answer: IV

Answer: PO

Answer: PO

Answer: PO

Answer: PO

Answer: PO

Answer: IV

Answer: PO

Answer: PO

Answer: IV

Answer: PO

Answer: PO

Answer: PO

Answer: SC

Answer: SC

Answer: SC

Answer: PO

Answer: PO

Answer: PO

Answer: PO

Answer: SC

Answer: PO

Answer: TP

Answer: PO

Answer: SC

Answer: PO

Answer: IV

Answer: IV

Answer: PO

Answer: SC

Answer: SC

Answer: SC

Answer: SC

Answer: PO

Answer: PO

Answer: PO