If I have a table with the columns:
branch-name
account-balance
Assuming there are more than one entries for branch-name and account-balance, how can I perform a query to show the average account balance for each branch-name?
Thanks.
If I have a table with the columns:
branch-name
account-balance
Assuming there are more than one entries for branch-name and account-balance, how can I perform a query to show the average account balance for each branch-name?
Thanks.
SELECT avg(account-balance) AS branchAverage, branch-name
FROM tableName
GROUP BY branch-name
select branch_name from Account group by branch_name having avg(balance) >= all( select avg(balance) from Account group by branch_name);