Count failures per test
beginner GROUP BY Challenge 2 of 13
Your team lead wants a quick list of the tests that fail most often across all builds.
Requirements
- Return each test case’s
titleand its number of failed runs asfailures. - Only include tests that failed at least once.
- Order by
failures(highest first), then bytitlealphabetically for ties.
Expected output
title | failures Apply SAVE10 coupon | 2 Checkout with saved card | 2 Password reset email | 2 Search by product name | 1
Checks (2)
- ○Sample data
- ○New failures change the ranking
Each check builds a fresh database and compares your result with the reference solution's: same number of columns in the same order (names are not checked), and the same rows in the same order.
query.sqlExecutes on SQLite in your browser
Ctrl/⌘ + Enter to check query · your code is saved in this browser
Results
Use Run query to see your rows, then Check query to grade it.
Schema · QA Tracker
SQLiteLoading the database…
“null” marks columns that allow NULL. Foreign keys are not enforced, as in many real test databases.