ในบรรดาผู้ป่วยที่ได้รับการวินิจฉัยว่าเป็น prim cardiomyopathy โดยบอกฉันถึงอัตราการรอดชีวิตหนึ่งปี ไม่จำเป็นต้องใช้ตารางทั้งหมด
among patients who have been diagnosed with prim cardiomyopathy nec tell me the one year survival rate.It is not neccessary to use all the tables.
 inputevents_cv:  row_id [ number]  subject_id [ number]  hadm_id [ number]  icustay_id [ number]  charttime [ time]  itemid [ number]  amount [ number] 
SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t2.charttime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.subject_id, t1.charttime 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 = 'prim cardiomyopathy nec') GROUP BY admissions.subject_id HAVING MIN(diagnoses_icd.charttime) = diagnoses_icd.charttime) AS t1 WHERE STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', t1.charttime) > 1 * 365) AS t2 JOIN patients ON t2.subject_id = patients.subject_id