Skip to content

Instantly share code, notes, and snippets.

@kstirman
Created November 9, 2017 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kstirman/d961ce455d055c47cbeadb91e292fce5 to your computer and use it in GitHub Desktop.
Save kstirman/d961ce455d055c47cbeadb91e292fce5 to your computer and use it in GitHub Desktop.
SELECT
business.name,
business.full_address,
business.city,
business.state,
review.text,
review."date" AS "date",
review.user_id AS user_id,
review.stars AS stars,
review.text AS text
FROM
elastic.yelp.business AS business
INNER JOIN
elastic.yelp.review AS review ON business.business_id = review.business_id
WHERE CONTAINS(text:'amazing OR awesome OR terrific OR fantastic NOT (awful OR terrible OR disgusting OR horrible)')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment