ตั้งแต่ปี 2103 มีผู้ป่วยกี่รายที่ได้รับการวินิจฉัยว่าเป็นโรคความดันโลหิตสูงในเดือนเดียวกัน หลังจากที่ก่อนหน้านี้พวกเขาได้รับการวินิจฉัยว่ามีภาวะไขมันในเลือดสูง nec/nos? ไม่จำเป็นที่จะต้องใช้ตารางทั้งหมด
since 2103 how many patients were diagnosed with hypertension nos in the same month after they had previously been diagnosed with hyperlipidemia nec/nos?It is not neccessary to use all the tables.
 admissions:  row_id [ number]  subject_id [ number]  hadm_id [ number]  admittime [ time]  dischtime [ time]  admission_type [ text]  admission_location [ text]  discharge_location [ text]  insurance [ text]  language [ text]  marital_status [ text]  ethnicity [ text]  age [ number] 
SELECT COUNT(DISTINCT t1.subject_id) 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 = 'hypertension nos') AND STRFTIME('%y', diagnoses_icd.charttime) >= '2103') AS t1 JOIN (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 = 'hyperlipidemia nec/nos') AND STRFTIME('%y', diagnoses_icd.charttime) >= '2103') 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')