Spot the bug in the top-two query

from Advanced SQL
SQLite 3.45.1 advanced 4 min 2 issues to find

Find the correctness and stability problems in this generated top-two query.

SQL
SELECT
  order_id,
  customer,
  amount,
  ROW_NUMBER() OVER (
    PARTITION BY customer
    ORDER BY amount DESC
  ) AS position
FROM orders
WHERE position <= 2;
Open in playground
Report an error