OneBug This week's bugs
Spot the bug SQL
1
-- July's failed payments from the two pilot regions, biggest first.
2
SELECT id, region, status, amount
3
FROM payments
4
WHERE strftime('%Y-%m', created_at) = '2026-07'
5
  AND status = 'failed'
6
  AND region = 'EU'
7
  OR region = 'UK'
8
ORDER BY amount DESC;

Read the full write-up for this bug (spoilers)