Yurttas/PL/DBL/mysql-f-2010/01/BankTwo/q110.sql
Revision as of 01:56, 4 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">ββREM REM q110.sql REM REM Find all customers who have an account at all branches REM located in 'Hearne'. REM: \....")
1/*
2REM
3REM q110.sql
4REM
5REM Find all customers who have an account at all branches
6REM located in 'Hearne'.
7REM
8*/
9
10\. set-db.sql
11
12SELECT DISTINCT S.customername
13FROM Depositor S
14WHERE NOT EXISTS
15 (SELECT branchname
16 FROM Branch
17 WHERE branchcity = 'Hearne'
18 AND branchname NOT IN (SELECT T.branchname
19 FROM Depositor T
20 WHERE S.customername = T.customername));