Skip to content

Instantly share code, notes, and snippets.

@wvpv
Last active October 2, 2018 19:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
/* do not do this */
select
o.subscriberkey
from _open o
where
cast(o.eventdate as date) = convert(date, getDate()-1)
and o.isunique = 1
/* do this instead */
select
o.subscriberkey
from _open o
where
o.eventdate >= convert(date, getDate()-1)
and o.eventdate < convert(date, getDate())
and o.isunique = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment