Difference between revisions of "Yurttas/PL/DBL/mysql-f-2010/01/BankOne/q110.sql"

From ZCubes Wiki
Jump to navigation Jump to search
(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 'Brooklyn'. REM: ...")
 
(No difference)

Latest revision as of 01:52, 4 November 2013

 1/*
 2REM
 3REM q110.sql
 4REM
 5REM Find all customers who have an account at all branches
 6REM located in 'Brooklyn'.
 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 = 'Brooklyn'
18     AND branchname NOT IN (SELECT T.branchname
19                            FROM Depositor T
20                            WHERE S.customername = T.customername));