ในปี พ.ศ. 2102 ยาสี่ชนิดที่จ่ายบ่อยที่สุดในเดือนเดียวกันให้กับผู้ป่วยชายอายุ 50 ปี หลังจากได้รับการวินิจฉัยว่าเป็นโรคโปลิโอเฉียบพลันที่ส่งผลช้า? ไม่จำเป็นที่จะต้องใช้ตารางทั้งหมด
in 2102 what was the four most frequent medications prescribed during the same month to the male patients with age 50s after they were diagnosed with late effect acute polio?It is not neccessary to use all the tables.
 procedures_icd:  row_id [ number]  subject_id [ number]  hadm_id [ number]  icd9_code [ text]  charttime [ time] 
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'late effect acute polio') AND STRFTIME('%y', diagnoses_icd.charttime) = '2102') AS t1 JOIN (SELECT admissions.subject_id, prescriptions.drug, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE admissions.subject_id IN (SELECT patients.subject_id FROM patients WHERE patients.gender = 'm') AND admissions.age BETWEEN 50 AND 59 AND STRFTIME('%y', prescriptions.startdate) = '2102') AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.startdate AND DATETIME(t1.charttime, 'start of month') = DATETIME(t2.startdate, 'start of month') GROUP BY t2.drug) AS t3 WHERE t3.c1 <= 4