Error! Could not run query:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 's edge'
AND A.`location` != 'bay's edge' AND A.`bedrooms` = 0 ORDER B...' at line 8
SELECT 'subcommunity / building', IF(LENGTH(A.`location`)>=30, CONCAT(SUBSTR(A.`location`, 1, 30), '...'), A.`location`) AS label,
FROM listings_stats A, locations B, locations C
WHERE A.`location` = B.`location`
AND B.`parent_location_id` = C.`location_id`
AND A.`listing_type_id` = 2
AND A.`category_id` = 1
AND C.`location` = 'bay's edge'
AND A.`location` != 'bay's edge' AND A.`bedrooms` = 0 ORDER BY A.`total` DESC, label ASC