Faça um
GROUP BY
, use HAVING
para retornar task_id tendo apenas estados nulos. select task_id
from tablename
group by task_id
having max(state) is null
GROUP BY
, use HAVING
para retornar task_id tendo apenas estados nulos. select task_id
from tablename
group by task_id
having max(state) is null