CSE302_Lab03
CSE302_Lab03
Lab Objective
Familiarize students with SQL statements involving multi-table, set and aggregate queries.
Lab Outcome
This lab involves activities that encompass the following learning levels in psychomotor domain.
Level Category Meaning Keywords
P2 Manipulation Reproduce activity Copy, response, trace, Show,
from instruction or Start, Perform, Execute,
memory Recreate.
Instructions
Lab Discussions
You must write all SQL statements in notepad first and save them with .sql extension.
Then execute your SQL scripts.
Lab Tasks
1) Find all branch names and cities with assets more than 1000000. (on single table)
2) Find all account numbers and their balance which are opened in ‘Downtown’ branch or
which have balance in between 600 and 750. (on single table)
3) Find all account numbers which are opened in a branch located in ‘Rye’ city. (multiple
tables)
4) Find all loan numbers which have amount greater than or equal to 1000 and their customers
are living in ‘Harrison’ city. (multiple tables)
5) Display the account related information based on the descending order of the balance. (order
by clause)
6) Display the customer related information in alphabetic order of customer cities. (order by
clause)
7) Find all customer names who have an account as well as a loan. (intersect)
8) Find all customer related information who have an account or a loan. (union)
9) Find all customer names and their cities who have a loan but not an account. (minus)
10) Find the total assets of all branches. (aggregate function)
11) Find the average balance of accounts at each branch. (aggregate function)
12) Find the average balance of accounts at each branch city. (aggregate function)
13) Find the lowest amount of loan at each branch. (aggregate function)
14) Find the total number of loans at each branch. (aggregate function)
15) Find the customer name and account number of the account which has the highest balance.
(aggregate function)
Submission
Take screenshots of the execution and result of your queries in SQLPlus Tool and insert the captured image
in a doc file for each and every question . Submit both doc and sql file in the given submission link in the
Classroom. Submit files separately. Name the file as per the following format: 2022-1-60-001_LAB03.docx
and 2022-1-60-001.sql_LAB03.