Write a SQL query to find the top three highest-selling server configurations by region over the last quarter.
Use the sales, server_configurations, and regions tables. Interpret last quarter as the completed calendar quarter immediately before the current quarter.
Output
- One row per selected configuration and region, with
region_name, configuration_name, total_units_sold, and sales_rank.
- Include no more than three configurations per region, ordered by region and descending sales rank.
- Break equal sales totals by
configuration_name alphabetically.
Output details
- Treat
DATE '2026-07-15' as today's date.
- Use an inclusive start date and exclusive end date for the completed quarter.
- Rank
NULL sales totals last and sort NULL region_name values last.