Skip to content

Instantly share code, notes, and snippets.

@drob
Created November 12, 2014 00:51
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 drob/63acf6a03ab07709b799 to your computer and use it in GitHub Desktop.
Save drob/63acf6a03ab07709b799 to your computer and use it in GitHub Desktop.
SELECT
1 AS enter_credit_card,
time AS enter_credit_card_time
FROM event
WHERE
user_id = e1.user_id AND
data->>'type' = 'enter_credit_card' AND
time BETWEEN view_homepage_time AND (view_homepage_time + 1000*60*60*24*14)
ORDER BY time
LIMIT 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment