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
How do I connect to a postgresql database?
How to setup postgresql sysv startup script?
What is the advantage of postgresql?
How do I connect to pgadmin server?
What is special about postgresql?
What is medical indexing?
What is a foreign key constraint why are such constraints important?
How to get the ddl of a table in postgresql?
What is gis data?
How do I create a foreign key in postgresql?
What is shared buffer in postgres?
Is postgresql like oracle?
Does postgres support json?
How to call postgresql function in asp net?
What is dual table in postgresql?