select * from (Select a.`postalCode`,a.`uniturl`, `region`, `bathrooms`, `bedrooms`,`registration_number`, `sleeps`,en_US_VRBO as href, `thumbnailUrl`, `headline`, description, `state`, `city`, `country`, `source`, `property_type`, `address`,round(price) as price,minimum_nights, `rating`, `review_count`,`latitude`, `longitude`,case when propertyName='' then trim(address) else CONCAT(CONCAT(propertyName,'(',trim(address)),'',')') end as addre,propertyName,
rewritten_description, custom_url, ai_description,
(6371 *
acos(
cos( radians( 21.2759167 ) ) *
cos( radians( `latitude` ) ) *
cos(
radians( `longitude` ) - radians( -157.8233677 )
) +
sin(radians(21.2759167)) *
sin(radians(`latitude`))
)
) as distance from `vacationrentalindex` a inner join vacationrentalindexfeed b on a.uniturl=b.unitUrl and a.headline!='' and a.thumbnailUrl!='' and b.enabled=1 and b.blocked=0 ) as vw where 1 and round(price)>0 and bedrooms>=0 AND (`uniturl` like '%108401264%' ) AND sleeps>=1 AND (
(postalCode NOT IN('96701','96706','96707','96712','6717','96730','96731','96734','96744','96782','96786','96789','96792','96826','96795','96797','96813','96814','96815','96816','96817','96818','96819','96821','96822','96825')
AND city NOT IN('Aiea','Ewa Beach','Haleiwa','Hauula','Hawaii Kai','Honolulu','Kaaawa','Kahala','Kahuku','Kailua','Kaneohe','Kapolei','Laie','Manoa','Makaha','Mililani','Nanakuli','Pearl City','Wahiawa','Waialua','Waianae','Waikiki','Waimanalo','Waipahu','Lanikai','Maili')
) OR (registration_number like '%TA-%' or registration_number like '%TA %')
) order by rating desc LIMIT 0, 15
Royal Mauian #207 Oceanfront Maui Condo with Views | To-Hawaii.com