How to display the employee number and name for employee working as clerk and earning highest salary among clerks?

Oracle Apps Interview QuestionsCategory: SQLHow to display the employee number and name for employee working as clerk and earning highest salary among clerks?
Questions Master asked 10 years ago

How to display the employee number and name for employee working as clerk and  earning highest salary among clerks?

1 Answers
Shailender Thallam Staff answered 10 years ago

SELECT empno,
  ename
FROM emp
WHERE job=’CLERK’
AND sal  =
  (SELECT MAX(sal) FROM emp WHERE job=’CLERK’
  );