ระบุจำนวนผู้ป่วยประเภทเข้าฉุกเฉิน และรหัสขั้นตอน icd9 คือ 9961 ไม่จำเป็นต้องใช้ทุกตาราง
provide the number of patients whose admission type is emergency and procedure icd9 code is 9961?It is not neccessary to use all the tables.
 prescriptions:  subject_id [ text]  hadm_id [ text]  icustay_id [ text]  drug_type [ text]  drug [ text]  formulary_drug_cd [ text]  route [ text]  drug_dose [ text] 
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.icd9_code = "9961"