Need an sql query which results those records whose status is complete for a same id. For example, mytable is the table name which has various records. We need to
mytable
This will find the ids where all its rows have a status of complete:
id
status
complete
SELECT id FROM mytable GROUP BY id HAVING COUNT(*) = COUNT( CASE status WHEN 'complete' THEN 1 END )