Re: SQL PUZZLE: selecting top 50 salaries in a table

From: Charles Johnson <charjohn_at_usa.capgemini.com>
Date: Fri, 22 Oct 1999 13:11:58 -0500
Message-ID: <3810a91b_4_at_news1.prserv.net>


NetComrade,

[Quoted] The following SQL should work...

select salary from <table_name>
where rownum <= 50
order by salary desc
/
Essentially, only the first 50 rows of the salary listing is displayed in descending order.

clj

NetComrade wrote in message <380f8e89.268436409_at_news.earthlink.net>...
>Well.. we know how to select top salary, which is select max(salary),
>but how would I select top 50 records?
>---------------
>Andrey Dmitriev eFax: (978) 383-5892 Daytime: (917) 373-5417
>AOL: NetComrade ICQ: 11340726 remove NSPAM to email
>
Received on Fri Oct 22 1999 - 20:11:58 CEST

Original text of this message