150 SQL Queries Part6

150 SQL Queries, www.askhareesh.com
101) Display employee name ,job,deptname,loc for all who are working as manager?

102) Display those employees whose manager name is jones and also display their manager

103) Display name and salary of ford if his salary is equal to hisal of his grade?

104) Display employee name ,job,deptname,his manager name ,his grade and make an
under department wise?

105) List out all the employee names ,job,salary,grade and deptname for everyone in a company except 'CLERK' . Sort on salary display the highest salary?

106) Display employee name,job abd his manager .Display also employees who are with out

107) Display Top 5 employee of a Company?

108) Display the names of those employees who are getting the highest salary?

109) Display those employees whose salary is equal to average of maximum and minimum?

110) Select count of employees in each department where count >3?

111) Display dname where atleast three are working and display only deptname?

112) Display name of those managers name whose salary is more than average salary of

113) Display those managers name whose salary is more than average salary salary of his

114) Display employee name,sal,comm and netpay for those employees whose netpay is
greater than or equal to any other employee salary of the company?

115) Display those employees whose salary is less than his manager but more than salary of
other managers?

116) Display all employees names with total sal of company with each employee name?

117) Find the last 5(least) employees of company?

118) Find out the number of employees whose salary is greater than their managers salary?

119) Display the manager who are not working under president but they are working under
any other manager?

120) Delete those department where no employee working?