select distinct * from (select * from s where fordqty<=50 and fordup between 95 and 100) a where binary_checksum(*) in ( select top 1 binary_checksum(*) from (select * from s where fordqty<=50 and fordup between 95 and 100) b where a.ffgcode=b.ffgcode)