How to display grade and employees name for the dept no 10 or 30 but grade is not 4 while joined the company before 31-dec-82?

Oracle Apps Interview QuestionsCategory: SQLHow to display grade and employees name for the dept no 10 or 30 but grade is not 4 while joined the company before 31-dec-82?
Questions Master asked 10 years ago

How to display grade and employees name for the dept no 10 or 30 but grade is  not 4 while joined the company before 31-dec-82?

1 Answers
Shailender Thallam Staff answered 10 years ago

SELECT ename,
  grade
FROM emp,
  salgrade
WHERE sal BETWEEN losal AND hisal
AND deptno IN(10,30)
AND grade  <>4
AND hiredate<’31-DEC-82′;