Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the bank database in the figure above where the primary keys are underlined. Construct the following SQL queries for this relational database. 1. Find

Consider the bank database in the figure above where the primary keys are underlined. Construct the following SQL queries for this relational database. 1. Find every client who has an account in every agency located in Toronto. There are other ways to write this query, such as first finding customers who don't have an account at a branch in Brooklyn, then removing those customers from the set of all customers at the using an except clause. 2. Find the sum total of all loan amounts in the bank. 3. Find the names of all branches with more assets than at least least one branch located in Toronto. The keyword any could be used instead of some
image text in transcribed
branch(branch name, branch city, assets) customer (ID, customer_name, customer_street, customer_city) loan (loannumber, branch name, amount) borrower (ID, loansumber) account (account_number, branch name, balance) depositor (ID, account_number)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions