Find the checking balance of the accounts whose savings balance is higher than the average savings balance.
CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE checking (balance INTEGER, custid VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE savings (balance INTEGER)
[SQL] 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)) [/SQL]