Answer Posted / liju
nth lowest
nth lowest
*******************************************************
SELECT DISTINCT (A.sal) FROM EMP A WHERE (N-1) =
(SELECT COUNT (DISTINCT (b.sal)) FROM EMP B
WHERE b.sal<a.sal);
nth highest
*******************************************************
SELECT DISTINCT (A.sal) FROM EMP A WHERE (N-1) =
(SELECT COUNT (DISTINCT (b.sal)) FROM EMP B
WHERE b.sal>a.sal);
| Is This Answer Correct ? | 14 Yes | 3 No |
Post New Answer View All Answers
Does unique constraint create index postgres?
How to execute postgres function in pgadmin?
What is pgbouncer in postgresql?
What is postgres default password?
What is a foreign key example?
What is the difference between oracle and postgresql?
Is postgresql object oriented?
What is pgrouting?
How do you enter data in pgadmin4?
How do I set up pgadmin?
What is the port number for postgresql?
How to start postgresql server in windows 10?
What is pg_catalog?
What is the command enable-debug?
How do you create a database in pgadmin 3?