
/* For welcom follow up email */
SELECT * FROM `users` WHERE `created_at` LIKE '%2025-06-12%' AND `from_csv` IS NOT NULL AND `last_login_at` IS NULL ORDER BY `id` DESC 
UPDATE `users` SET `followup_stage` = '0', `welcome_email_sent_at` = NOW() WHERE DATE(`created_at`) = '2025-06-12' AND `from_csv` IS NOT NULL AND `last_login_at` IS NULL; 


/* For recycle follow up email */
SELECT * FROM users WHERE DATE(created_at) != '2025-06-12' AND `from_csv` IS NOT NULL AND `last_login_at` IS NULL ORDER BY `id` DESC; 
UPDATE `users` SET `welcome_email_sent_at` = NOW() WHERE DATE(created_at) != '2025-06-12' AND `from_csv` IS NOT NULL AND `last_login_at` IS NULL ORDER BY `id` DESC; 