CREATE TABLE accounts (custid VARCHAR2, name VARCHAR2)
CREATE TABLE checking (balance NUMBER, custid VARCHAR2)
CREATE TABLE savings (balance NUMBER, custid VARCHAR2)

Find the checking balance of the accounts whose savings balance is higher than the average savings 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))
SELECT "T2"."balance" FROM "accounts" "T1" JOIN "checking" "T2" ON "T1"."custid" = "T2"."custid" AND "T1"."name" IN (SELECT "T1"."name" FROM "accounts" "T1" JOIN "savings" "T2" ON "T1"."custid" = "T2"."custid" AND "T2"."balance" > (SELECT AVG("balance") FROM "savings"))