Difference between revisions of "Yurttas/PL/DBL/mysql-f-2010/01/BankOne/a04.sql"
Jump to navigation
Jump to search
(Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">/* REM REM a04.sql REM REM Find the average balance of all depositors REM who live in Harrison and have at least 3 acc...") |
(No difference)
|
Latest revision as of 01:51, 4 November 2013
1/*
2REM
3REM a04.sql
4REM
5REM Find the average balance of all depositors
6REM who live in Harrison and have at least 3 accounts.
7REM
8*/
9
10\. set-db.sql
11
12SELECT AVG(balance)
13FROM Depositor, Customer
14WHERE Depositor.customername = Customer.customername
15 AND Customer.customercity = 'Harrison'
16GROUP BY Depositor.customername
17HAVING COUNT(accountnumber) >= 3;