Name: Anjana Nair
Subject Name: DBMS Lab
Subject Code: 303105203
[Link] CSE Year 2 Semester 3
Enrollment No: 2203031050040
PRACTICAL 9
“Miscellaneous” Queries
1) Find the average rate for each Order.
2) Give the loan details of all the customers.
3) List the customer name having loan account in the same branch city they live in.
COMPUTER SCIENCE AND ENGINEERING-PIET Page 53
Name: Anjana Nair
Subject Name: DBMS Lab
Subject Code: 303105203
[Link] CSE Year 2 Semester 3
Enrollment No: 2203031050040
4) Provide the loan details of all the customers who have opened their accounts after August’95.
5) List the order information for client C00001 and C00002.
6) List all the information for the orders placed in the month of June.
7) List the details of clients who do not stay in Maharashtra.
COMPUTER SCIENCE AND ENGINEERING-PIET Page 54
Name: Anjana Nair
Subject Name: DBMS Lab
Subject Code: 303105203
[Link] CSE Year 2 Semester 3
Enrollment No: 2203031050040
8) Determine the maximum and minimum product price. Rename the output as “Max_Price” and
“Min_Price”.
9) Count the number of products having price less than or equal to 500.
10) List the order number and the day on which client placed an order.
11) List the month and the date on which an order is to be delivered.
COMPUTER SCIENCE AND ENGINEERING-PIET Page 55
Name: Anjana Nair
Subject Name: DBMS Lab
Subject Code: 303105203
[Link] CSE Year 2 Semester 3
Enrollment No: 2203031050040
12) List the date, 25 days after today’s date.
13) Find the total of all the billed orders in the month of June.
14) List the products and orders from customers who have ordered less than 5 units of “Pull Overs”.
COMPUTER SCIENCE AND ENGINEERING-PIET Page 56
Name: Anjana Nair
Subject Name: DBMS Lab
Subject Code: 303105203
[Link] CSE Year 2 Semester 3
Enrollment No: 2203031050040
15) Find the list of products and orders placed by “Ivan Bayrosss” and “Mamta Muzumdar”.
16) List the clients who placed order before June 04.
17) List all the clients who stays in “Bengaluru” or “Mangalore”.
COMPUTER SCIENCE AND ENGINEERING-PIET Page 57
Name: Anjana Nair
Subject Name: DBMS Lab
Subject Code: 303105203
[Link] CSE Year 2 Semester 3
Enrollment No: 2203031050040
PRACTICAL 10
“PL/SQL Block
1) Write a PL/SQL Block to Add 2 Numbers.
2) Write a PL/SQL Block to find Area of Rectangle, Triangle and Square.
COMPUTER SCIENCE AND ENGINEERING-PIET Page 58
Name: Anjana Nair
Subject Name: DBMS Lab
Subject Code: 303105203
[Link] CSE Year 2 Semester 3
Enrollment No: 2203031050040
3) Write a PL/SQL Block to find Maximum of 3 numbers.
4) Write a PL/SQL Block to print sum of N Numbers using For Loop.
COMPUTER SCIENCE AND ENGINEERING-PIET Page 59
Name: Anjana Nair
Subject Name: DBMS Lab
Subject Code: 303105203
[Link] CSE Year 2 Semester 3
Enrollment No: 2203031050040
5) Write a PL/SQL Block to generate Fibonacci series of N number.
COMPUTER SCIENCE AND ENGINEERING-PIET Page 60
Name: Anjana Nair
Subject Name: DBMS Lab
Subject Code: 303105203
[Link] CSE Year 2 Semester 3
Enrollment No: 2203031050040
COMPUTER SCIENCE AND ENGINEERING-PIET Page 61