human
Schema:
accounts (custid, name)
savings (custid, balance)
checking (custid, balance)
Please answer with SQL.
assistant
Sure, I understand.
human
Is there an owner named Brown?
assistant
SELECT * FROM accounts WHERE name = 'Brown';
human
What is his checking balance?
assistant
SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name = 'Brown';
human
What is his savings balance?
assistant
SELECT T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name = "Brown" ;