"SELECT hospitalsql.HosAmp ,hospitalsql.Amp, Count(pcu_status.pcu_code) AS amt,
(if(pcu_code=10679,sum(sum_lncm) AS Cnt10679, (if(pcu_code=11299,sum(sum_lncm) AS Cnt10679
FROM pcu_status INNER JOIN hospitalsql ON pcu_status.pcu_code =hospitalsql.CUPCODE
GROUP BY hospitalsql.CUPCODE, hospitalsql.Amp
ORDER BY hospitalsql.CUPCODE");