Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write down the following SQL queries and also write down their outputs a) Find out the loan amount of the customers whose customer city

Write down the following SQL queries and also write down their outputs a) Find out the loan amount of the 

The following sample dataset tables have been given to you. Customer CUSTOME CUSTOMER R NAME STREET Adams 

Account ACCOUN T_NUMB ER A-101 A-215 A-102 A-305 A-201 A-222 A-217 Loan LOAN NU MBER L-17 L-23 L-15 L-14 L-93

Write down the following SQL queries and also write down their outputs a) Find out the loan amount of the customers whose customer city is "Main". b) Find out the name of the city of the customers whose Bank branch has the secona maximum amount of assets. e) Find the average account balance of those branches where the average account balance is greater than $1000 and the branch balance is 900000 or 1700000.(You don't need to find output table for this one) The following sample dataset tables have been given to you. Customer CUSTOME CUSTOMER R NAME STREET Adams Brooks Curry Glenn Green Hayes Johnson Jones Smith Turner Williams Spring Senator North Sand Hill Walnut Main Alma Main Main Putnam Nassau CUSTOME R CITY Pittsfield Brooklyn Rye Woodside Stamford Harrison Palo Alto Harrison Rye Stamford Princeton Depositor CUSTOMER N AME Johnson Smith Hayes Turner Johnson Jones Lindsay ACCOUNT NUMB A-101 A-215 A-102 A-305 A-201 A-217 A-222 ER Account ACCOUN T_NUMB ER A-101 A-215 A-102 A-305 A-201 A-222 A-217 Loan LOAN NU MBER L-17 L-23 L-15 L-14 L-93 L-11 L-16 BRANCH NAME Downtown 500 Mianus 700 Perryridge 400 Round Hill 350 900 700 750 Perryridge Redwood Brighton BRANCH_NA ME Downtown Redwood Perryridge Downtown Mianus Round Hill Perryridge BALANCE AMOUN T 1000 2000 1500 1500 500 900 1300 Borrower CUSTOMER NA Jones Smith Hayes Jackson Curry Smith Williams Adams Branch BRANCH N AME Downtown Redwood Perryridge Mianus Round Hill Pownal North Town Brighton LOAN NUMBE R L-17 L-23 L-15 L-14 L-93 L-11 L-17 L-16 BRANCH CITY Brooklyn Palo Alto Horseneck Horseneck Horseneck Bennington Rye Brooklyn ASSETS 900000 2100000 1700000 400200 8000000 400000 3700000 7000000

Step by Step Solution

There are 3 Steps involved in it

Step: 1

QUESTION1 SQL QUERY select LAMOUNT cCUSTOMERNAME from Custome... 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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

How do you save the results of an SQL query as a table?

Answered: 1 week ago

Question

What is a fat client? What is a thin client?

Answered: 1 week ago