Find All Customers Who Have An Account At All The Branches #561
This subjective question is related to the book/course gs gs114 Relational Database Management System. It can also be found in gs gs114 Practical Questions Solved Past Paper No. 1.
Question 1: Find all customers who have an account at all the branches located in Brooklyn.
where exists (select * from branch
where b1.branch_name = ‘Downtown’
and b1.branch_name=’Brighton’);
Answer:
select customer_name from account as b1 natural join depositorwhere exists (select * from branch
where b1.branch_name = ‘Downtown’
and b1.branch_name=’Brighton’);