นับจำนวนผู้ป่วยที่ได้รับการผ่าตัดทำลายเนื้อเยื่อในช่องท้องภายในเดือนเดียวกันหลังจากได้รับท่อช่วยหายใจแบบสอดในปี 2101 ไม่จำเป็นต้องใช้ตารางทั้งหมด
count the number of patients who have received a destruct peritoneal tiss procedure within the same month after having received a insert endotracheal tube in 2101.It is not neccessary to use all the tables.
 prescriptions:  row_id [ number]  subject_id [ number]  hadm_id [ number]  startdate [ time]  enddate [ time]  drug [ text]  dose_val_rx [ text]  dose_unit_rx [ text]  route [ text] 
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'insert endotracheal tube') AND STRFTIME('%y', procedures_icd.charttime) = '2101') AS t1 JOIN (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'destruct peritoneal tiss') AND STRFTIME('%y', procedures_icd.charttime) = '2101') AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND DATETIME(t1.charttime, 'start of month') = DATETIME(t2.charttime, 'start of month')