How to display those employee whose joining of month and grade is equal?

Oracle Apps Interview QuestionsCategory: SQLHow to display those employee whose joining of month and grade is equal?
Questions Master asked 10 years ago

How to display those employee whose joining of month and grade is equal?

1 Answers
Questions Master answered 10 years ago

SELECT ename
FROM emp
WHERE sal BETWEEN
(SELECT losal FROM salgrade WHERE grade = TO_CHAR(hiredate,’MM’)
)
AND (SELECT hisal FROM salgrade WHERE grade = TO_CHAR(hiredate,’MM’));