human
Schema:
accounts (custid, name)
savings (custid, balance)
checking (custid, balance)
Please answer with SQL.
assistant
Sure, I understand.
human
How many accounts are there in the bank?
assistant
SELECT COUNT( * ) FROM accounts;
human
What are the names for each?
assistant
SELECT name FROM accounts;
human
Include the checking and saving balances for each.
assistant
SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ;