Yurttas/PL/DBL/postgres/F/01/Bank/q070.sql

From ZCubes Wiki
Jump to navigation Jump to search
 1/*
 2REM
 3REM q070.sql
 4REM
 5REM Find all customers of the 'Perryridge' branch who have
 6REM an account but not a loan.
 7REM
 8*/
 9
10SELECT current_schema();
11SET search_path to "bank";
12
13SELECT customername
14FROM Depositor
15WHERE branchname = 'Perryridge'
16  AND customername NOT IN (SELECT customername
17                           FROM Borrower
18                           WHERE branchname = 'Perryridge');