Fall 2022 - CS405 - 2
Fall 2022 - CS405 - 2
02
Total Marks: 20
Semester Fall 2022
Due Date: 27-1-2023
CS405 - Database Programming using Oracle 11g
Instructions
Please read the following instructions carefully before solving & submitting the
assignment:
It should be clear that your assignment will not get any credit (zero marks) if:
Uploading instructions
o For clarity and simplicity, you are required to Upload/Submit only “.doc” file.
Objective
Note:
No assignment will be accepted after the due date via email in any case (whether it is the case of
load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the
last hour of the deadline.
Question Statement:
An organization has total 04 female employees. Given is the Employee table:
EMPLOYEE_ID NAME SALARY
100 Saima 44000
101 Aamna 13000
102 Aisha 60000
103 Sana 11000
The organization has conducted the training especially for the female employees. The given
Training_details table contains the record of the female employees who have attended the
training lessons in the year 2020.
user_training_i user_id training_id training_date
d
1 1 1 "2020-08-02"
2 2 1 "2020-08-03"
3 3 2 "2020-08-02"
4 4 2 "2020-08-04"
5 2 2 "2020-08-03"
6 1 1 "2020-08-02"
7 3 2 "2020-08-04"
8 4 3 "2020-08-03"
9 1 4 "2020-08-03"
10 3 1 "2020-08-02"
11 4 2 "2020-08-04"
12 3 2 "2020-08-02"
13 1 1 "2020-08-02"
14 4 3 "2020-08-03"
Write a SQL query to display the list of female employees who took a training lesson
more than once in the same day grouped by user and training lesson. Each ordered from
the most recent training date to oldest date.
Write a SQL query to find the employee with second MAX Salary.