Question: 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

1 Expert Approved Answer
Step: 1 Unlock

QUESTION1 SQL QUERY select LAMOUNT cCUSTOMERNAME from Custome... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!