How to find 5 largest salary in nth nob of Record | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to find 5 largest salary in nth nob of Record

20th Sep 2016, 6:32 PM
Rahul Sharma
Rahul Sharma - avatar
2 Answers
+ 1
You can use MAX function to return rows with largest salary and using LIMIT. e.g. SELECT MAX(Salary) FROM Customers LIMIT 5;
21st Sep 2016, 9:16 AM
Joshua Ng andwe
Joshua Ng andwe - avatar
0
select max(SALARY) ... returns exactly one row, the maximum salary found in the table respectively. You better use this statement: select SALARY from CUSTOMERS order by SALARY desc limit 5;
20th Dec 2016, 9:24 PM
Stephan Borsodi
Stephan Borsodi - avatar