CSE370 Lab Assignment02 (Student View)
CSE370 Lab Assignment02 (Student View)
Lab Assignment 2
Proving yourself worthy of being able to handle more significant tasks, the tech lead has decided
to give you a challenging job. However, this time, the data you would be handling is very sensitive
and no one wants this data to be leaked. Therefore, instead of getting the entire table, the tech
lead has given you the list of attributes that the table contains and the table name. The information
given is as follows:
employee_id char(10)
first_name varchar(20)
last_name varchar(20)
email varchar(60)
phone_number char(14)
hire_date date
job_id char(10)
salary int
commission_pct decimal(5,3)
manager_id char(10)
department_id char(10)
You need to insert rows (around 10 or more to test all of the queries for the following tasks)
as per the data types of the attributes/columns and problem statements of the following
tasks.
4. Find the department_id and total number of employees of each department which does
not have a single employee under it with a salary more than 30,000.
5. For each department, find the department_id, job_id and commission_pct with
commission_pct less than at least one other job_id in that department.
6. Find the manager_id who does not have any employee under them with a salary less than
3500.