PLSQL QUESTION
Top questions
- Display avg sal from emp without using avg function.
- Display details of employees having sal > 3000 without using > operator.
- Display details of employees having sal between >=2000 and <=5000 without using between operator.
- Display deptno,job wise number of employees only for those deptno and job combination having atleast 3 employees.
single row subquery:-
- Display details of employees working in the same dept as that of clerk.
- Display 2nd lowest sal from emp.
- Display details of employees having highest or lowest sal in emp table.
- Display the deptno having highest number of employees among all the depts of emp table.
- Display details of employees having 3rd highest sal in emp table.
- Display deptno having total sal > the combined total sal of deptno 10&20.
- Display details of employees working in a deptno having 2nd lowest number of employees.
- Display deptno wise avs sal only for those depts having count of emp > the count of employee whose name starts with letter ‘a’ & sal >=2000.
- Display details of manager to whome highest number of employees are reporting.
- Display details of employees working under a manager having second lowest sal among all the managers of emp table.
- Display details of manager having highest sal among all the managers of emp table.
- Display details of employees to whome no body is reporting.
- Display details of employees to whome at least one person is reporting.
multiple rows sub-query:-
- Display the highest sal from emp table without using max function.
- Display details of employees having sal > the avg sal of any of the depts of emp tables.
- Display details of employees having sal > the highest sal of deptno 30 without using max function.
- Display lowest sal from emp without using min function.
- Display lowest sal from emp without using min and all.
- Display details of employees working in a deptno having total sal > the highest sal of depts 10,20,30.
multicolumn subquery:-
- Display details of employees having highest sal in their own dept.
co-related sub query:-
- Display details of employees having sal > the avg sal of their own dept.
- Display details of dept from dept table having employees in the same deptno of emptable.
- Display highest sal from emp table without using max, all ,any(using corelated…).
- Display the top three highest salaries from emp table.
- Display details of employeees having 7th lowest sal in emp table.
- Display details of employeees having 2nd lowest sal under every manager.
- Display 3rd highest and 4th lowest sal from emp table.
- Display 3rd lowest sal from emp using co related sub query.
- Display deptno wise ist three highest sal from emp table.
- Display details of employees having highest sal under every deptno using co related sub query.
set operator:-
- Display job from deptno 10,20,30 without displaying the same record more than once.
- Display deptno wise ist 3 highest salaries without using count function.
- Display job which are common to deptno 10,20&30.
- Display job which belongs to deptno 10 only.
- Display job which are common to deptno 10,20,30 without using intersection operator.