Yurttas/PL/DBL/mysql-f-2010/01/BankOne/q111.sql

Revision as of 01:52, 4 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">β†’β€ŽREM REM q111.sql REM REM Find all customers who have an account at all branches REM located in 'Brooklyn'. REM: ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision β†’ (diff)
 1/*
 2REM
 3REM q111.sql
 4REM
 5REM Find all customers who have an account at all branches
 6REM located in 'Brooklyn'.
 7REM
 8*/
 9
10/*
11
12   MINUS is not implemented this won't work.
13
14*/
15
16\. set-db.sql
17
18SELECT DISTINCT S.customername
19FROM Depositor S
20WHERE NOT EXISTS ((SELECT branchname
21                   FROM Branch
22                   WHERE branchcity = 'Brooklyn')
23                  MINUS
24                  (SELECT T.branchname
25                   FROM Depositor T
26                   WHERE S.customername = T.customername));