SELECT
cha.changwatname,
SUM(IFNULL(s.rel_01,0)) as sumrel_01,
SUM(IFNULL(s.rel_02,0)) as sumrel_02,
SUM(IFNULL(s.rel_03,0)) as sumrel_03,
SUM(IFNULL(s.rel_00,0)) as sumrel_00,
SUM(IFNULL(s.rel_99,0)) as sumrel_99,
SUM(IFNULL(s.rel_other,0)) as sumrel_other
FROM
mrisk_basedb s
LEFT JOIN hdc.chospital ch on ch.hoscode = s.hospcode
LEFT JOIN hdc.campur ca on ca.ampurcodefull = CONCAT(ch.provcode,ch.distcode)
LEFT JOIN hdc.cchangwat cha on cha.changwatcode = CONCAT(ch.provcode)
WHERE 1=1
and cha.zonecode = '12' group by cha.changwatcode;