Just a warning to the query I provided. If the customer has accounts in all branches and in some branches he has more than 1, that customer will not be returned by the query because his total accounts is more than the number of branches.
Another possible scenario where the query will not return proper results is when the customer has multiple accounts in one branch but none in the other branches and still his total number of accounts matches the total number of branches.
SQL Server Helper
How well do you know SQL? Find out with the free test assessment from SQL Server Helper!!!
Got a SQL Server Question? Ask us here: http://www.sql-server-helper.com/forums/default.asp