#1053

Payment Cleared, Status Is Old

Step 5: the reverse daily check finds orders with status = 'pending' that already have a payment with status = 'success'. Return each id once, sorted by id.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

id
13

Your query result will appear here