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
Is postgresql a sql server?
How do you remove a foreign key constraint?
What is schema in teaching?
How to create a new table from existing table in postgresql?
What is the function of create command?
How to connect postgresql database using pgadmin 4?
How do I start a pgadmin server?
How to get month wise data in postgresql?
Can you have a composite foreign key?
What is the password of postgres user?
Is postgresql similar to sql server?
Which version of postgresql should I use?
What is a postgresql schema?
What is join and how many types of joins?
How many indexes per table are allowed in postgresql?