Identify Churned Users with a Simple SQL Query
SELECT user_id, email, subscription_end_date FROM users WHERE subscription_status = 'expired' AND subscription_end_date < CURRENT_DATE - INTERVAL '30 days';
This query targets your users table to filter out records where the subscription status is marked as expired. By comparing the 'subscription_end_date' against the current date, the query isolates users who have been inactive for more than 30 days.
Using this SQL snippet allows your marketing or retention team to quickly export a list of churned users. You can then use this data to trigger automated re-engagement email campaigns or special discount offers to win back customers who have recently churned.