$29.99
You will use the Bank database that has been explained in Lab class.
Data for the Bank database is available here : https://docs.google.com/document/d/1dCRpz5RGNrUsB8uJwFgBPCPov8d1FyewIvb6i FaPyQ8/
Using the bank database, write MySQL queries for the following tasks:
1. Find the name and loan number of all customers having a loan at the Downtown branch. [2]
2. Find all the possible pairs of customers who are from the same city. show in the format Customer1, Customer2, City. [2]
3. If the bank gives out 4% interest to all accounts, show the total interest across each branch. Print Branch_name, Total_Interest [1]
4. Find account numbers with the highest balances for each city in the database [1]
5. Show the loan number, loan amount, and name of customers who have the top 5 highest loan amounts. The data should be sorted by increasing amounts, then decreasing loan numbers in case of the same loan amount. [Hint for top 5 check the "limit" keyword in mysql] [2]
6. Find the names of customers with an account and also a loan at the Perryridge branch.
[2]
7. Find the total loan amount of all customers having at least 2 loans from the bank. Show in format customer name, total_loan. [2]