I'm not seeing the valueof the CTE. Why not access assessmenticcqa_rawdirectly in the main query and only do GROUP BY once? Do you have manyvalues in iccqar_ques_code which are not used in this query?
>