ในช่วงปีที่แล้ว มีผู้ป่วยกี่รายที่ได้รับยา ciprofloxacin hcl ภายในเดือนเดียวกันหลังจากพวกเขาเข้ารับการผ่าตัดหัวใจห้องบนเต้นผิดจังหวะ? ไม่จำเป็นที่จะต้องใช้ตารางทั้งหมด
during the previous year, how many patients were prescribed with ciprofloxacin hcl within the same month after they underwent atrial cardioversion?It is not neccessary to use all the tables.
 transfers:  row_id [ number]  subject_id [ number]  hadm_id [ number]  icustay_id [ number]  eventtype [ text]  careunit [ text]  wardid [ number]  intime [ time]  outtime [ time] 
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 = 'atrial cardioversion') AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t1 JOIN (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'ciprofloxacin hcl' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) 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')