Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago