Hello all I am trying to get timestamps from today and yesterday. The thing is my query is only returning rows for today - am I missing something? I normally dont use multiple conditions in a JOIN statement but my logic seems like it makes sense
I am using dateadd to minus 1 day but its still returning only aug 8 entries - see screenshot as well
SELECT O.subscriber_key, O.timestamp, O.data from abandoned_browse_1643376986 O
JOIN ENT._Subscribers s ON O.subscriber_key = s.SubscriberKey
AND
(
cast(O.timestamp As Date) = cast(GetDate() As Date)
OR
cast(DATEADD(day,-1,O.timestamp )As Date) =
cast(DATEADD(day,-1, GetDate()) as DATE)
)