Here is the query:-
SELECT * FROM table
WHERE CutOffDate > '2013-05-23 00:00:00.001'
AND Zone = 1
OR id IN (SELECT id FROM table
WHERE Zone = 1
and status = 1)
All i need is all records greater than cutoffdate in same Zone. Also if any record from same zone has status 1. And records are from same Table.
The above query is working fine. But I am hoping there is definitely a better way to write this kind of query.