0% found this document useful (0 votes)
3 views

DBMS

The document outlines Assignment 02 for CSE370: Database Systems, authored by Farhan Zarif. It includes seven SQL queries related to employee data, focusing on various conditions such as hire dates, salaries, and commission percentages. Each query is followed by a placeholder for its corresponding shell output.

Uploaded by

tcomputer095
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

DBMS

The document outlines Assignment 02 for CSE370: Database Systems, authored by Farhan Zarif. It includes seven SQL queries related to employee data, focusing on various conditions such as hire dates, salaries, and commission percentages. Each query is followed by a placeholder for its corresponding shell output.

Uploaded by

tcomputer095
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CSE370 : Database Systems

Assignment 02 | Spring 2025


ID : 23301692 | Name : Farhan Zarif

Table:

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 E1 where salary=(select
(as Plain Text) min(salary) from employee E2 where E1.department_id = E2.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_employee 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<any(select commission_pct from


(as Plain Text) employee E2 where E1.department_id = E2.department_id and E1.job_id != E2.job_id);

No 5 SS
(of Query & Output
in Shell)

No 6 Query select manager_id from employee group by manager_id having min(salary)>=3500;


(as Plain Text)
No 6 SS
(of Query & Output
in Shell)

No 7 Query select first_name,last_name,employee_id,email,salary,department_id, commission_pct from employee E1 where


(as Plain Text) commission_pct = (select min(commission_pct) from employee E2 where E1.manager_id = E2.manager_id);

No 7 SS
(of Query & Output
in Shell)

You might also like