Average time to close defects
intermediate Dates Challenge 9 of 13
QA leadership tracks how quickly defects get fixed. Report the average number of days from creation to closure for each severity.
Requirements
- Only include defects whose
statusis'closed'. - Return
severity,closed_defects(how many closed defects it has) andavg_days_to_close, rounded to one decimal place. - Order by
avg_days_to_close, slowest first.
Expected output
severity | closed_defects | avg_days_to_close low | 2 | 18.5 medium | 2 | 7.5 high | 2 | 2.5 critical | 1 | 1
Checks (3)
- ○Sample data
- ○The cart badge defect is fixed
- ○A closed defect is reopened
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.
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.