Yurttas/PL/DBL/postgres/F/01/Bank/a01.sql
Revision as of 00:37, 5 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">ββREM REM a01.sql REM REM Find the average account balance at each branch. REM: SELECT current_schema(); SET searc...")
1/*
2REM
3REM a01.sql
4REM
5REM Find the average account balance at each branch.
6REM
7*/
8
9SELECT current_schema();
10SET search_path to "bank";
11
12SELECT branchname, AVG(balance)
13FROM Depositor
14GROUP BY branchname;