You are on page 1of 1

ORDER By

1. Sort employee by last name


2. Sort employee by last name in descending order
3. Sort employee by email in descending order
4. Sort employee ( employee_id , first_name, last_name, hire_date, salary) by two values:
employee_id and Salary (Descending order)

COUNT

1. Count the number of departments in the department table


2. Count the number of country in the country table
3. Count the number of employess which have job_id = 17
4. Count the number of employess which have manager_id = 100 as well as department_id = 8

MAX, MIN, AVG

1. Find max of the highest job_id of employee (MAX statement)


2. Get all employees who have the highest job_id (using MAX statement)
3. Find the lowest salary of employees (MIN Statement)
4. Get all employees who have the lowest salary (using MIN Statement)
5. To calculate sum of job_id
6. To calculate sum of salary of employy where job_id = 17
7. To calculate sum of salary of employy where department_id = 8;
8. To calculate average of salary of employee where department_id = 15

GROUP BY

1. Find the sum of salary based on (GROUP BY each job_id)


2. Find Average of salary based on each department_ID (Using group by)

You might also like