Wednesday, October 22, 2008

SQL Practice Test 4

  1. If sum(sal) of a department is greater than 10,000 ,then return it as highest valued dept, if sum(sal)>5000 and less than 10000 return it as mediumvalued, else low valued department.
  2. Get the count of distinct job and manager for each department.
  3. Get the day wise count of employees hired.
  4. Get the count of employees department wise whose hiredate is less than Jan 2005.
  5. Get the department wise, manager wise, job wisesum(sal) and also department wise salary, manager wisesalary, job wise salary, department manager wisesalary.
  6. Get me minimum salary of employee in department 10.If the minimum salary is greater that maximum commission in that department, display it as null.
  7. Get the average salary of employees who were hired during 1980-1985 department wise.
  8. Get me average salary of employees who were hired year wise and also department wise.
  9. Get me sum(sal)-sum(comm) job wise for all employees.
  10. Get me all employees whose salary is greater than average salary in their department.

No comments:

Post a Comment

Disclaimer