What is the average savings balance?
select avg(balance) from savings
How many people have savings account balances over it?
select count(*) from savings where balance > (select avg(balance) from savings)
What are their names?
select t1.name from accounts as t1 join savings as t2 on t1.custid = t2.custid where t2.balance > (select avg(balance) from savings)
What are their checking account balances?
select t2.balance from accounts as t1 join checking as t2 on t1.custid = t2.custid where t1.name in (select t1.name from accounts as t1 join savings as t2 on t1.custid = t2.custid where t2.balance > (select avg(balance) from savings))