Skip to content

SQL assignment 2

eshan3101 edited this page Apr 14, 2026 · 1 revision

1.Display employee full name by concatenating FIRST_NAME and LAST_NAME. image image

2.Show employee FIRST_NAME in uppercase and LAST_NAME in lowercase. image

3.Display employee names whose FIRST_NAME length > 6. image

4.Show employee details with annual salary. image

5.Display employees whose commission is NULL. image

6.Show employees with commission amount, replacing NULL with 0.

7.Display employee email IDs with @sha-infotech.com appended. image image

8.Display employees hired in the year 2005. image

9.Display employees with rounded salary to nearest hundred.

10.Show employee details along with experience in years. image

11.Find the number of employees in each department. image

12.Display department-wise average salary. image

13.Show maximum salary in each department. image

14.Find departments having more than 5 employees. image

15.Display department-wise total salary expense. image

  1. Find job-wise average salary.
image
  1. Show departments where average salary > 8000.
image
  1. Display minimum and maximum salary for each job_id.
image
  1. Display employees who earn more than the average salary.
image
  1. Find employees earning maximum salary in the company.
image
  1. Display employees who earn more than their department’s average salary.

  2. Find employees working in the same department as Steven King.

  3. Display employees who have the same job as employee 102.

image
  1. Find employees whose salary is greater than all employees in department 50. SELECT * FROM EMPLOYEES WHERE SALARY > ALL (SELECT SALARY FROM EMPLOYEES WHERE DEPARTMENT_ID = 50);

  2. Display employees who earn the second highest salary.

image

Clone this wiki locally