Last active
August 2, 2017 00:54
-
-
Save josephcc/f1aa59ab975908554b609925c06f3df7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select W1.review_id, W1.index, W2.index, W1.token, W2.token | |
from index W1 INNER JOIN index W2 | |
ON ( | |
(W1.token = 'stand' AND W2.token = 'behind' AND | |
W1.review_id = W2.review_id AND | |
W1.index + 1 = W2.index) OR | |
(W1.token = 'stand' AND W2.token = 'up' AND | |
W1.review_id = W2.review_id AND | |
W1.index + 1 = W2.index) OR | |
(W1.token = 'stood' AND W2.token = 'behind' AND | |
W1.review_id = W2.review_id AND | |
W1.index + 1 = W2.index) | |
) | |
WHERE | |
W1.token IN ('stand', 'stood') AND W2.token IN ('behind', 'up') AND W1.city = 'Pittsburgh' AND W2.city = 'Pittsburgh' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment