Write down the following SQL queries and also write down their outputs a) Find out the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
QUESTION1 SQL QUERY select LAMOUNT cCUSTOMERNAME from Custome... View the full answer
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date:
Students also viewed these databases questions
-
For the following problems, (1) write out the element stiffness matrix for each element, (2) assemble the global stiffness system, (3) apply boundary conditions, and (4) solve for the deformations....
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Write a query to find each customer who has an account at every branch located in Brooklyn Consider the bank database schema given below, where the primary keys are underlined. Write the SQL DDL...
-
For each polynomial function, find (a) (-1), (b) (2), and (c) (0). f(x)=x5x4
-
A loan of $5614 at 6% interest compounded monthly is paid off with monthly payments of $818.12. Give the difference equation for the monthly balances and determine the number of months until the loan...
-
Zelo, Inc. stock has a beta of 1.23. The risk-free rate of return is 4.5% and the market rate of return is 10%. What is the amount of the risk premium on Zelo stock? A. 4.47% B. 5.50% C. 5.54% D....
-
Creating a Digital Vision to Transform a Company and Improve the Customer Experience 1.Why is creating a clear vision of how a company will better engage with customers and solve their problems a...
-
On June 30, 2015, Wisconsin, Inc., issued $300,000 in debt and 15,000 new shares of its $10 par value stock to Badger Company owners in exchange for all of the outstanding shares of that company....
-
Total Amount Units Sales Variable Costs: 31,250 Per Unit $ 445,313 $ 14.25 Direct Materials $ 125,000 4.00 = Direct Labor $ 28,000 0.90 = Variable Manufacturing Overhead $ 66,250 2.12 = Sales...
-
On January 1, 2020, Xiamen Company made amendments to its defined benefit pension plan that resulted in 62,800 yuan of past service cost. The plan has 5,130 active employees with an average expected...
-
Mohammed and Salima have been married for 35 years. Mohammed is 66 years old; Salima is 62 years old. Both individuals have contributed to the CP for 40 years and both individuals are currently...
-
What is meant by the fruit of the poisonous tree doctrine in relation to searches and seizures?
-
What makes an incidental cartel different from other cartels? Why was the NCAA an incidental cartel?
-
While taking his nightly walk, Charley Goodneighbor saw Joe Macho commit a battery on Charlene Loverly, a fourteen-year-old girl. Goodneighbor came to Loverlys defense and struck Macho so hard it...
-
Use economic theory to explain why almost all the Southeastern Conferences football and basketball teams integrated within a few years of one another.
-
The maxim ignorance of the law is no excuse is derived from an age when laws were much simpler than todays sophisticated legal codes. Assume you are working as a staff person for a state legislator...
-
How can a company effectively manage its global supply chain to minimize disruptions and ensure continuity of operations, while also maximizing cost efficiency and minimizing the environmental impact...
-
Dr. Chan obtained a $15,000 demand loan at prime plus 1.5% on September 13 from the Bank of Montreal to purchase a new dental X-ray machine. Fixed payments of $700 will be deducted from the dentists...
-
How do you save the results of an SQL query as a table?
-
What is a fat client? What is a thin client?
-
What is an un-normalized relation? Is it a relation according to the definition of the word relation?
-
List a couple of advantages of using the stable analysis pattern for temptation.
-
Describe how the developed temptation analysis pattern would be stable over time.
-
List two scenarios, which will not be covered by the temptation analysis pattern.
Study smarter with the SolutionInn App