Having trouble getting the SQL right for this. I'm looking to get a total count of emails a specific subscriber received in the last 30 days. But it keeps failing. I'd also like to be able to query what those emails were during that same timeframe.
SELECT s.SubscriberKey COUNT (SubscriberKey) AS SENT_COUNT FROM _Sent
WHERE JobID IN (SELECT JobID FROM _Job WHERE SubscriberKey = 'XXX')
and EventDate between '2022-07-18' and '2022-08-18'