você pode tentar como abaixo, remova distinto
SELECT
THESTATUS,
COUNT(THENAME),
SUM(THECOST)
FROM THETABLE
GROUP BY thestatus
demonstração
SELECT
THESTATUS,
COUNT(THENAME),
SUM(THECOST)
FROM THETABLE
GROUP BY thestatus