Reference solution
The shape we check against. Compare it with your query: the set of rows matters, the formatting does not.
SELECT status, COUNT(*) AS order_count FROM orders GROUP BY status ORDER BY order_count DESC;
Return each order status and the number of orders with that status, aliased as order_count. Sort by order_count descending.
hint ladder
Write a query with WITH … AS (…) blocks, then inspect each intermediate table before the final SELECT.
Run your code to see its output, or check your solution to grade it.
Reference solution
The shape we check against. Compare it with your query: the set of rows matters, the formatting does not.
SELECT status, COUNT(*) AS order_count FROM orders GROUP BY status ORDER BY order_count DESC;
Code is blurred until you solve this problem — the reasoning stays readable.