Question
7. branch(branch name, branch city, assets) customer (ID, customer name, customer street, customer city) loan (loan number, branch name, amount) borrower (ID, loan number) account
7. branch(branch name, branch city, assets)
customer (ID, customer name, customer street, customer city)
loan (loan number, branch name, amount)
borrower (ID, loan number)
account (account number, branch name, balance )
depositor (ID, account number)
Consider the bank database above, where the primary keys are underlined.
Construct the following SQL queries for this relational database.
i. Find each customer who has an account at every branch located in Brooklyn.
ii. Find the total sum of all loan amounts in the bank.
iii. Find the names of all branches that have assets greater than those of at least one branch located in Brooklyn.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started