LIMIT keeps the first rows from an already ordered result.
highlighted = computed this step
Input table
Start with the same five order rows.
Orders
Order query
Order by amount descending with an order_id tie-breaker, then keep the first rows.
ORDER BY amount DESC LIMIT
Ordered output
The result is the top rows from that explicit order.
top three rows