Wednesday, October 22, 2008

SQL Practice Test 3

  1. Display the avg(sal) of each department sorted according to sum of salaries of each dept wise.
  2. Display the number of employees for all the jobs.
  3. Display the sum of average salaries of all the jobs.
  4. Display the sum of all the average salaries of all the employees who is working as clerk or manager.
  5. Display all enames and dnames of emp and dept tables.
  6. Display the employee information who is working as manager in department ‘SALES’.
  7. Display the grades of employees based on their salaries from grade and emp table.
  8. Display the experience of employees in months as well as in years without using library functions.
  9. Display the employee name and his department name he is working with.
  10. Display the sum of all the employees who has salary greater than average salaries of their respective departments.
  11. Display the employee information whose salary is greater than the average salary of all the employess.
  12. Display the job,avg(sal) from emp table whose salary of each employee is greater than the maximum average salary of job.
  13. List all the employees names who draws max salary for each department.
  14. List all the employess whose sal is greater than all average salaries of all jobs.
  15. List only first five employess who draws the highest salary from the emp table.
  16. Edit all the names, jobs of an employee to make only their initial letter as capital.
  17. Insert the dname of the dept with the job(having dname of its deptno as its suffix) of the emp table and make the initial letter capital.
  18. Delete only those rows that are of dept 30.
  19. Insert any one duplicate record and delete it.
  20. Delete all the rows in the student table.
  21. Add a primary constraint to the existing student table field stid.
  22. Delete the table student.
  23. Calculate the cumulative sal of all the employees.
  24. Select an employee who dont have a manager.
  25. List all the dept names that are contained in the emp table.

No comments:

Post a Comment

Disclaimer