SQL Practice Logo

SQLPractice Online

Level 9 - DistinguishedQuery-Based Questionsm1 optimizer cardinality internals

Top Failed Merchants in Last 24 Hours

Interviewer prompt: Return top 10 merchant_id by failed payment count in the last 24 hours. Output merchant_id and fail_count ordered by fail_count descending.

Schema Context

payments(id, merchant_id, status, created_at)