มีผู้ป่วยกี่รายที่ได้รับยาลดไขมันในเลือดสูง - hmg-coa reductase inhibitor ภายใน 2 เดือนหลังจากได้รับการรักษาด้วย cpap/peep - 5-10 ซม. h2o?ไม่จำเป็นต้องใช้ตารางทั้งหมด
how many patients received antihyperlipidemic agent - hmg-coa reductase inhibitor within 2 months after having received cpap/peep therapy - 5-10 cm h2o?It is not neccessary to use all the tables.
 treatment:  treatmentid [ number]  patientunitstayid [ number]  treatmentname [ text]  treatmenttime [ time] 
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'cpap/peep therapy - 5-10 cm h2o') AS t1 JOIN (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'antihyperlipidemic agent - hmg-coa reductase inhibitor') AS t2 WHERE t1.treatmenttime < t2.treatmenttime AND DATETIME(t2.treatmenttime) BETWEEN DATETIME(t1.treatmenttime) AND DATETIME(t1.treatmenttime, '+2 month')