how to find nth lowest salary

Answer Posted / mohd javed

For All SQL , Tested in PostgresSQL : Javedcc@gmail.com

SELECT * FROM <Table_Name> A
WHERE N = (SELECT COUNT(DISTINCT B.Column_Name ) FROM
<Table_Name> B WHERE A.Column_Name >= B.Column_Name)

Is This Answer Correct ?    8 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does psql command do?

615


How do I remove all rows from a table?

559


Do indexes speed up queries?

582


How to create local server in postgresql?

568


Does postgres have clustered index?

558






Can primary key be null postgres?

564


Do provide an explanation for pgadmin?

606


Is postgresql a sql server?

604


What is a primary key constraint?

543


How do I start postgresql?

602


What is pg_hba conf file?

585


What is the option that can be used in PostgreSQL to find out how the query optimizer is evaluating the query given?

1041


What is multi-version control?

545


What is postgis extension?

527


How do you create a table in pgadmin?

572