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

Getting Started
1Switch to a SQL tab and select a database
2Write or paste your SQL in the editor
3Press Alt+Enter to run
Tip:Select text in the editor to run only that portion
Failed Banks Updated 2/22/25, 5:36 PM
Notes SQL Tab-3
Alt+Enter to run