How would you write a SQL query to identify power users at Aircall based on call volume and integration usage?
For this exercise, consider a user a power user if they made at least 5 calls and used at least 2 distinct integrations during January 2025. Use the users, calls, and integration_usage tables.
Output
- One row per qualifying user.
- Columns:
user_id, user_name, call_volume, and integration_count.
- Include only users meeting both thresholds.
- Order by
call_volume descending, integration_count descending, then user_id ascending.