Database Lab 5
Database Lab 5
(2)
(3)
(4)
2. Construct a table named Agent and Customer. Insert the values as below and
display both tables.
AGENT
COMMISION
3. Type the following commands and monitor the result:
a) SELECT AgentName FROM Agent WHERE Commision>2.00;
b) SELECT * FROM Agent WHERE Commision <1.00;
1. SELECT COUNT(Quantity)
FROM Product;
Activity 5f: AVG function
DISCUSSION
EXERCISE 1
Construct Database.
Create Table.
1. Display the Student table.
1. Display the records of the students who are in the same batch. (e.g.:
18DEP13F1004 the underlined part indicated the batch)
‘12F1’
‘11f1’
2. Display the records of the students who are in the same batch in alphabetical
order.
3. Display the student names whose CGPA is higher than 3.00 and from
Penang.
4. Display the student names whose CGPA less than 3.70 or from “DTK”
program.
5. Display the all the student records except the student from “Sarawak”.
6. Display the highest and lowest CGPA.