text: CREATE TABLE checking (custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) -- Find the number of checking accounts for each account name. SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR) -- Find the total saving balance for each account name. SELECT SUM(T2.balance), T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name CREATE TABLE accounts (name VARCHAR, custid VARCHAR); CREATE TABLE checking (balance INTEGER); CREATE TABLE checking (custid VARCHAR, balance INTEGER) -- Find the name of accounts whose checking balance is below the average checking balance. SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM checking) CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE checking (custid VARCHAR, balance VARCHAR); CREATE TABLE accounts (custid VARCHAR) -- Find the saving balance of the account with the highest checking balance. 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 CREATE TABLE checking (balance VARCHAR, custid VARCHAR); CREATE TABLE savings (balance VARCHAR, custid VARCHAR) -- Find the total checking and saving balance of all accounts sorted by the total balance in ascending order. SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance