Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A. Print employee_id, last_name, salary for those employees whose salary is equa

ID: 3725624 • Letter: A

Question

A. Print employee_id, last_name, salary for those employees whose salary is equal or

greater than 10000 or job_id contains "MAN".

B. Print last_name, job_id for those employees whose job_id is not IT_PROG,

ST_CLERK and SA_REP

C. Print the First_name, Last_name and salary from employees where salary range

is in between 10000 and 25000. sort it by descending using salary.

C. Print the total count of COMMISION_PCT for all NULL value. -- use NVL - google it

1D. Print the maximum of the MIN_SALARY and minimum of MAX_SALARY from JOBS table

E. Count the number of employees where department_id is 50

F. Count the number of department_id from EMPLOYEES table without counting any department_id twice!

G. Print the COUNTRY_NAME and REGION_NAME for every countries and regions. (Inner join, find out which table are involved)

H. Print the department_id and average salary for every departments where average salary >8000 from EMPLOYEES table ascended

order by average salary.

I. Find out which department_id has the maximum average salary? print department_id as well as the maximum average salary.

Salary should be rounded and department_id should not be NULL

Explanation / Answer

A)select e.employee_id,e.last_name

from employee e

where e.salary>=10000 or e.job_id='MAN';

B)select e.last_name,e.job_id

from employee e

where e.job_id NOT IN('IT_PROG', 'ST_CLERK', 'SA_REP');

C)select e.First_name,e.Last_name

from employee e

where e.salary between 10000 and 25000

orderby e.salary desc

E)select count(department_id)

from department d

where d.dno=50

group by department_id