SELECT Id FROM new_searchtable where (town like 'Lyme' and state='NH' or town like 'Enfield' and state='NH' or town like 'Lebanon' and state='NH' or town like 'Hanover' and state='NH' or town like 'Plainfield'and state='NH' or town like 'Cornish'and state='NH' or town like 'Grantham'and state='NH' or town like 'Eastman'and state='NH' or town like 'Dorchester'and state='NH' ) and list_price > '700000' and type ='T' and wf_owned = 'Owned' and wf_owned = 'Owned' AND list_price BETWEEN '0' AND '30000000' ORDER BY list_price Desc