human
Schema:
accounts (custid, name)
savings (custid, balance)
checking (custid, balance)
Please answer with SQL.
assistant
Sure, I understand.
human
can you show me a list of checking balance?
assistant
SELECT * FROM CHECKING;
human
can you show me a list of saving balance?
assistant
SELECT * FROM SAVINGS;
human
can you show me a list of ACCOUNTS name?
assistant
SELECT * FROM ACCOUNTS;
human
find the saving balance of the account with the highest checking balance?
assistant
SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1 ;