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