Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: A sample question

Re: A sample question

From: Fernando Carvalho <f.carvalho_at_mail.telepac.pt>
Date: Wed, 23 Sep 1998 16:57:15 +0200
Message-ID: <6ub94g$2au$1@duke.telepac.pt>


>Suppose I have a table contains 10000 employee's names and their salaries.
>Who can come out a query can get the 1000 highest salary employees?

Dong

You can also use the following statement::

SELECT Sal FROM
(
SELECT -Sal, Sal FROM Employees
GROUP BY -Sal, Sal
)
WHERE rownum < 1000

Regards

Fernando Carvalho Received on Wed Sep 23 1998 - 09:57:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US