SQL: Selecting IDs that don't have any rows with a certain value for a column
SELECT DISTINCT id
FROM table
WHERE id NOT IN (SELECT id
FROM table
WHERE val = 'current')
or:
SELECT a.id
FROM table a
LEFT JOIN table b ON a.id = b.id AND b.val = 'current'
WHERE b.id IS NULL