Question
please write both relational algebra expression and SQL for each of the following queries. Branch(branch_name, branch_city, assets) Customer(customer_name, customer_street, customer_city) Loan(loan_number, branch_name, amount) Borrower(customer_name, loan_number)
please write both relational algebra expression and SQL for each of the following queries.
Branch(branch_name, branch_city, assets)
Customer(customer_name, customer_street, customer_city)
Loan(loan_number, branch_name, amount)
Borrower(customer_name, loan_number)
Account(account_number, branch_name, balance)
Depositor(customer_name, account_number)
List all the customers who live in NY together with their account balances.
2. List all branches whose average account balances are more than $10,000.
3. List the customers who have account(s) in a branch city that is different where he lives.
4. List the customers who have both loan and account in the same branch.
5. List the customers who have both loan and account in the bank.
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