I have a table called Employees
, each employees has a salary value. I want to select the top 20 employees based on salary.
My database columns look like this:
EMPLOYEE SALARY DEPARTMENT
--------------------------
KARTHI 500 IT
MANO 500 ADMIN
SANDY 300 HR
KARTHI 400 IT
I want to get top records like this:
EMPLOYEE SALARY DEPARTMENT
---------------------------
KARTHI 900 IT
MANO 500 ADMIN
SANDY 300 HR
How to get top 5 records from database like above?