Use desktop for interactive SQL sandbox

Failed Banks Dataset

Source

Prepare data by running these SQL statements

Analysis


Number of failed banks

select count(*) from failed_banks;

Top-5 States with most failed banks

select state_, count(*) as num from failed_banks group by state_ order by num desc limit 5;

Top-5 Cities with most failed banks

select city_, count(*) as num from failed_banks group by city_ order by num desc limit 5;

Bank failures by year

select date_part('year', to_date(closing_date_, 'dd-MON-yy')) as closing_yr,
    count(*) as closing_by_year
    from failed_banks group by closing_yr
    order by closing_yr desc;

SQL Output

Failed Banks
Public
Failed Banks
jrz1977
PostgreSQL
Created Dec 20, 2024
Updated Feb 22, 2025
1Notes Notes
2SQL SQL
3Tab-3 SQL
2 SQL 1 Notes
Switch to a SQL tab and press Alt+Enter to run queries
Failed Banks Updated 2/22/25, 5:36 PM
Notes SQL Tab-3
Alt+Enter to run