I want to get data from table in 5 member groups. How can I get nth five records( The nth group). I mean the records between (n-1)*5 and (n)*5.
I do not like to find my records in this below form, cause every time it runs 2 queries in my machine.
SELECT MAX(Salary) as 'Salary' from EmployeeDetails
where Salary NOT IN
(
SELECT TOP n-1 (SALARY) from EmployeeDetails ORDER BY Salary Desc
)
Note: I am new in Oracle and just asking you to give me a hint about this and not asking a complete code.