Sub Query Problem
Posted: Thu Mar 07, 2013 11:35 pm
Hi
I am trying to fetch 6th max or 8th min record.
so created query but not working anyone help me that what is wrong with this query.
6 Max Record
SELECT MIN(SAL) FROM EMP WHERE SAL IN (SELECT SAL FROM EMP FETCH FIRST 6 ROWS ONLY ORDER BY SAL DESC)
PLEASE LET ME KNOW WHAT IS WRONG WITH THIS QUERY
I am trying to fetch 6th max or 8th min record.
so created query but not working anyone help me that what is wrong with this query.
6 Max Record
SELECT MIN(SAL) FROM EMP WHERE SAL IN (SELECT SAL FROM EMP FETCH FIRST 6 ROWS ONLY ORDER BY SAL DESC)
PLEASE LET ME KNOW WHAT IS WRONG WITH THIS QUERY