Yurttas/PL/DBL/mssql/F/01/Bank/a03.sql

From ZCubes Wiki
Revision as of 04:24, 3 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">/* REM REM a03.sql REM REM Find the average account balance at each branch REM where the average account balance is mo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1/*
 2REM
 3REM a03.sql
 4REM
 5REM Find the average account balance at each branch
 6REM where the average account balance is more than $400.
 7REM
 8*/
 9
10SELECT branchname, AVG(balance)
11FROM Depositor
12GROUP BY branchname
13HAVING AVG(balance)>400;