Du kan prova nedan - du måste använda subquery för inre select-sats
DELETE FROM test WHERE ext_no IN
(
select ext_no from
(
SELECT ext_no, MAX(value)
FROM test
GROUP BY ext_no
HAVING COUNT(*) > 2 AND
COUNT(*) = COUNT(CASE value WHEN 0 THEN 1 END)
)t)