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: SQL help

Re: SQL help

From: Chuck Hamilton <Xchuckh_at_dvol.com>
Date: 1997/10/29
Message-ID: <34573ebd.1143642@news.dvol.com>#1/1

On Tue, 28 Oct 1997 12:34:24 -0500, "H. John C. Hopkins" <john_spam_free_at_hpe.ufl.edu> wrote:

>Table VISITS
>Fields ID, DATE, RANK
>
>ID is not a primary key (i.e., can have multiple occurrences of ID, each
>with different dates and ranks)
>
>Need to select id AND date where highest rank value.
>
>Thanks so much for your input.
>
>-John
>
>
>

select id, date
from visits
where rank = (select max(rank) from visits);

If there are several rows with the same highest rank, they will all be selected.

--
Chuck Hamilton
Xchuckh_at_dvol.com
In an effort to reduce spam my return email address hasbeen changed.
To reply, remove the X from the beginning.

If at first you don't succeed, sky diving isn't for you.
Received on Wed Oct 29 1997 - 00:00:00 CST

Original text of this message

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