มีผู้ป่วยเสียชีวิตกี่รายในเดือนเดียวกันหลังจากได้รับการวินิจฉัยจนถึงปี 2102 ด้วยยาเกินขนาดทั่วไป?ไม่จำเป็นต้องใช้ตารางทั้งหมด
how many patients died within the same month after being diagnosed until 2102 with drug overdose- general?It is not neccessary to use all the tables.
 diagnosis:  diagnosisid [ number]  patientunitstayid [ number]  diagnosisname [ text]  diagnosistime [ time]  icd9code [ text] 
SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'drug overdose- general') AS t1 GROUP BY t1.uniquepid HAVING MIN(t1.diagnosistime) = t1.diagnosistime AND STRFTIME('%y', t1.diagnosistime) <= '2102') AS t2 JOIN (SELECT patient.uniquepid, patient.patienthealthsystemstayid, patient.hospitaldischargetime FROM patient WHERE patient.hospitaldischargestatus = 'expired') AS t3 ON t2.uniquepid = t3.uniquepid WHERE DATETIME(t2.diagnosistime, 'start of month') = DATETIME(t3.hospitaldischargetime, 'start of month')