0

SQL for multiple category_omit and category

Need to know if this is possible. I want a very specific set of data dealing with three categories ex:(bars, restaurants, clubs). I would like to omit certain categories ex(fast food, ice cream, coffee). If a location has a category of (restaurants, coffee) is shouldn't show up since it has been omitted by the coffee category. I am using this currently to grap my three categories then soft by distance and ensure they are unique. However, this approach is taxing and will not properly allow for multiple omit's. Is there a better solution? I need to use the YQL syntax as well, I cannot use the URL at this time.
CODE
select id, Title, Address, City, Distance from local.search(20) where query="?" and location="ENTER ADDRESS" and (category="96926236" or category="96926195" or category="96926057") and radius="3" | SORT(field="Distance") | unique(field="id")


Any help would be appreciated! Thanks in advance.

0 Replies

Recent Posts

in YQL