Try This,
select empno,deptno,sal,dense_rank from (SELECT empno,
deptno,sal,
DENSE_RANK() OVER (PARTITION BY
deptno ORDER BY sal DESC NULLS
LAST) DENSE_RANK
FROM emp) tmp
where dense_rank<=5;
Regards,
Murali
Hi All,
Recently I attended a interview for a developer position in
an educational university. They asked me the a question, I
answered somehow but I was not not satisfied myself. Can
anybody reply for it? The question is:
A business user comes to you directly with an urgent
request:: there is a problem with some students not being
able to re-enrol. It appears that ?something has gone wrong
with the end-dating of some previous courses they had
enrolled in, and this is preventing them from completing
their on-line re-enrolments?. Fortunately the user has done
some analysis on the situation, and has developed some code
to change the end dates. They tell you that they have
tested this code in the ?dev? environment, and it works
fine. They are asking you to please get this implemented in
production as soon as possible.
What steps would you take in response to their request ?
Thanks