What is the average savings account balance?
select avg ( balance ) from savings
Which accounts with checking accounts have savings account balances higher than the average savings balance?
select t1.name 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 ) )
What is its checking account balance?
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 ) )