Zní to, jako byste chtěli něco jako
SELECT f.id,
(CASE WHEN open_bugs = 0
THEN 'PASS'
ELSE 'FAIL'
END) feature_status,
open_bugs,
closed_bugs
FROM (SELECT f.id,
SUM( CASE WHEN b.status IN (0,1)
THEN 1
ELSE 0
END) open_bugs,
SUM( CASE WHEN b.status = 2
THEN 1
ELSE 0
END) closed_bugs
FROM feature f
JOIN bugs b ON (f.id = b.feature_id)
GROUP BY f.id)