In ExactTarget I am trying to query the total number of sends within the last 7 for each subscriber, and only store the results where the number of 'TotalSends' is greater than 0.
Here is what I have going so far:
SELECT EmailAddress, ( SELECT count(*) FROM _Sent p WHERE p.SubscriberKey = s.EmailAddress AND EventDate between DATEADD(day, -7, CURRENT_TIMESTAMP) AND CURRENT_TIMESTAMP ) AS 'TotalSent' FROM Master_Subscriber_DE AS s WHERE 'TotalSent' > 0
I run this query and get no results. If I remove that last line - It works, but I get ALL results (I only want the results where 'TotalSent' > 0)