I want to select the distinct IDs (which is associated with multiple rows) that DOESN\'T have any rows where VAL = \'current\'.
For example, in a table like this:
If you want to use Having Clause then use like this
SELECT id, count(*) as Total FROM Status S1 WHERE val <> 'current' GROUP BY id HAVING count(*) = (SELECT COUNT(*) FROM Status S2 WHERE S2.id = S1.id)