human
Schema:
accounts (custid, name)
savings (custid, balance)
checking (custid, balance)
Please answer with SQL.
assistant
Sure, I understand.
human
What is the average saving balance?
assistant
SELECT AVG ( balance ) FROM savings;
human
Who have savings account balances below that?
assistant
SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < ( SELECT AVG ( balance ) FROM savings ) ;