Next Customer Contact Deadline
For completed outbound calls and emails, show the next meaningful contact for the same customer. Order by contacted_at then contact_id. The deadline is 7 days after the current contact, and flag whether the next contact missed it. The final contact has NULL next-contact fields. Return customer_id, contact_id, next_contact_id, next_contact_at, deadline_at and deadline_missed. Return columns: customer_id, contact_id, next_contact_id, next_contact_at, deadline_at, deadline_missed.
Preparing the interactive SQL workspace...