Last active
October 2, 2018 19:31
-
-
Save wvpv/8db55db35239cea0870347b86d590661 to your computer and use it in GitHub Desktop.
This file contains 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
/* 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