What are the most important SQL joins you use for complex reporting?
Write a PostgreSQL query that demonstrates this reporting task using the provided tables. Include active customers, their active subscription details when available, and usage events during the first quarter of 2026.
Output
- One row per active customer, with
customer_id, customer_name, plan_name, event_count, and engagement_status.
- Use
No active subscription when no active subscription exists and Unspecified when an active subscription has no plan name.
- Sort by
event_count descending, then customer_id ascending.