SELECT Table1.ID, Table1.Awaiting, Table1.Approve, Table1.Decline FROM Table1 INNER JOIN ( SELECT ID FROM table1 GROUP BY ID HAVING COUNT(*) = 2 AND MAX(awaiting = 1) > 0 ) q ON Table1.ID = q.ID