
October 29th, 2012, 11:33 AM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 2
Time spent in forums: 40 m 20 sec
Reputation Power: 0
|
|
This is a practice problem,but you are right,you have no reason to believe me.Can you atleast point me in the right direction regarding the second part of the query.Here is what i did for the first part.
Code:
SELECT fname,lname,B.id FROM
customers A INNER JOIN depositors D on A.id=D.cid INNER JOIN accounts C on D.account_number=C.account_number INNER JOIN branches B ON C.branch_id=B.id
WHERE C.balance>(SELECT AVG(balance) FROM accounts)
I have no idea on how to select branches with the same state as the customer
|