I have a table with multiple records per subsriberid, i need a query to find all subscriberid with 90 days gaps between any two records (grouped by subscriberid).
There are many entries per subscriberid on different dates. The objective to find subscriberid with gaps of 90 days, those who did not have any activity for 90 days in a row.
Desired outcome is a list of subscriberid that were idle for 90 days straight at any given point in time, not necessarily the last 90 days.
The columns in the table are: subscriberid datecreated eventtype (this has the different event types, subscription, unsubscription, charging, basically everything)
select * from SubsEvents
where DIFFERENCE between DateCreated >= 90 DAY
GROUP BY SubscriberId