What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance?
select t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid where t2.balance > (select avg(balance) from checking) intersect select t1.name from accounts as t1 join savings as t2 on t1.custid = t2.custid where t2.balance < (select avg(balance) from savings)