Give this a try -
SELECT HuName,
SUM(IF(EREC=RED,1,0)) AS RED,
SUM(IF(EREC=AMBER,1,0)) AS AMBER,
SUM(IF(EREC=GREEN,1,0)) AS GREEN,
SUM(IF(EREC=OFF,1,0)) AS OFF,
SUM(IF(EREC=FAIL,1,0)) AS FAIL
FROM tbl_name
GROUP BY HuName, EREC
I haven't done the OTHER and TOTAL columns because my brain is fried at this precise moment.
If it is producing what you want, so far, then post again with a small datadump so I can test the query as I go.
Hope this helps 😉