CSE370_Lab Assignment02_Spring2025
CSE370_Lab Assignment02_Spring2025
No 1 Query Select first_name, last_name, email, phone_number, hire_date, department_id from Employee where hire_date = (select
(as Plain Text) max(hire_date) from Employee);
No 1 SS
(of Query & Output
in Shell)
No 2 Query Select first_name, last_name, employee_id, phone_number, salary, department_id from Employee
(as Plain Text) where (department_id, salary) in (select department_id, min(salary) from Employee group by department_id);
No 2 SS
(of Query & Output
in Shell)
No 3 Query Select first_name, last_name, employee_id, commission_pct, department_id from Employee where department_id =
(as Plain Text) 'DPT007' and commission_pct < all (Select commission_pct from Employee where department_id = 'DPT005');
No 3 SS
(of Query & Output
in Shell)
No 4 Query Select department_id, count(*) as total_employees from Employee group by department_id having max(salary) <= 30000;
(as Plain Text)
No 4 SS
(of Query & Output
in Shell)
No 5 Query Select department_id, job_id, commission_pct from Employee e1 where commission_pct < (Select max(commission_pct)
(as Plain Text) from Employee e2 where e1.department_id = e2.department_id);
No 5 SS
(of Query & Output
in Shell)
No 6 Query Select Distinct manager_id from Employee where manager_id not in (Select manager_id from Employee where salary <
(as Plain Text) 3500);
No 6 SS
(of Query & Output
in Shell)
No 7 Query
(as Plain Text) Select first_name, last_name, employee_id, email, salary, department_id, commission_pct from Employee e1 where
commission_pct = (Select min(commission_pct) from Employee e2 where e1.manager_id = e2.manager_id);
No 7 SS
(of Query & Output
in Shell)