Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL question - need to select only one row of a group-by result set?
Definetely read about the keyword HAVING...
It will help you restrict the rows returned by
your group by...
In article <36BFA80F.AA8F4EE3_at_iquest.net>, dvanzandt_at_iquest.net says...
>
>Hi all, and yes, I've been reading TFM for two days now. Just in case
>I'm beating my head neadlessly, I'm asking for help parsing a SQL query.
>
>Seems simple enough: the need is to query one table, returning such
>columns as a product_key, date last updated, and time last updated. I
>obviously need to use GROUP-BY in order to utilize the MAX function, but
>my queries generate all of the rows that fulfill the group-by
>constraints -- not just the one maximum-value row.
>
>I've played with rownum, only to find it's relative to the result set.
>I'd have to save an intermediate table, then do a second query to obtain
>it that way.
>
>Am I missing something basic? I'm stumped, and would welcome your
>suggestions. TIA.
>
>--
>Dave Van Zandt
>dvanzandt at iquest.net
Received on Tue Feb 09 1999 - 13:00:57 CST
![]() |
![]() |