Yurttas/PL/DBL/postgres/F/01/Bank/q101.sql
1/*
2REM
3REM q101.sql
4REM
5REM Find all customers with both loan and an account
6REM at the 'Perryridge' branch.
7REM
8*/
9
10/*
11
12 INTERSECT is not implemented this won't work.
13
14*/
15
16SELECT current_schema();
17SET search_path to "bank";
18
19(SELECT customername
20 FROM Depositor
21 WHERE branchname = 'Perryridge')
22INTERSECT
23(SELECT customername
24 FROM Borrower
25 WHERE branchname = 'Perryridge');