how many bank branches does the state of New York have?
select count(*) from bank where state = 'New York'
what are their names?
select bname from bank where state = 'New York'
what is the total amount of loans provided by them?
select sum(t2.amount) from bank as t1 join loan as t2 on t1.branch_id = t2.branch_id where t1.state = 'New York'