Confluent's customer analytics team needs a ranked view of its highest-revenue customers. Assuming the reporting date is January 1, 2026, write a PostgreSQL query to find the top five customers by completed-order revenue during the previous calendar year, January 1 through December 31, 2025.
Requirements
- Include only orders with
status = 'completed' and an order_date in the 2025 calendar year.
- Join qualifying orders to
customers and aggregate revenue by customer.
- Return the top five customers, ordered by revenue descending, with
customer_id as a deterministic tie-breaker.