SQL Quest › SQL Interview Questions › Date Functions
Failed Banks Recent Decade
How many bank failures occurred in 2020 or later? The failure_date column is text in M/D/YYYY format — but the YEAR is always the last 4 characters. Show failure_year, failure_count, total_pre_failure_assets. Group by year, order ascending. (Useful for tracking the post-COVID stability stress wave including 2023's regional bank crisis: SVB, Signature, First Republic.)
Solve it in the browser editor →
Runs on SQLite in your browser, graded against the expected result, no signup. A wrong answer gets a diagnosis, not just "incorrect".
Schema
failures
| cert | name | city | state | failure_date | pre_failure_assets | pre_failure_deposits | resolution_type | estimated_loss |
|---|---|---|---|---|---|---|---|---|
| 57488 | METROPOLITAN CAPITAL B&T | CHICAGO | NULL | 1/30/2026 | 261185 | 212152 | FAILURE | NULL |
| 5520 | SANTA ANNA NATIONAL BANK | SANTA ANNA | NULL | 6/27/2025 | 76938 | 71376 | FAILURE | 23460 |
| 28611 | PULASKI SAVINGS BANK | CHICAGO | NULL | 1/17/2025 | 49466 | 42741 | FAILURE | 30284 |
Expected output: Year-by-year failure count + scale
Hint
Concepts
SELECT WHERE Date Functions Aggregation GROUP BY
Practise the topic: SQL practice questions · Date function practice · GROUP BY exercises
In these company practice sets
A SQL Quest challenge matched to patterns reported for these companies — not a question any of them has published.
Related questions
Where would this cost you points in an interview?
Ten questions, no signup: a Skillmap across nine SQL skills and the one to fix first.
Take the readiness test