Starting from:

$34.99

Course Code: CSE 370Credits: 3.0 Solution

Course Name: Database Systems Semester: Spring 24
Lab Assignment 3
You will use a database called Bank.
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 [2]
4. Find account numbers with the highest balances for each city in the database [2]
5. Show the loan number, loan amount, and name of customers with 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]

More products