Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: analytic function
Billou schrieb:
> Hi,
>
> using a select like:
>
> select max(date) over (partition by...)
>
> how can I retrieve a value from the same row than the max(date) ?
> For example, how can I find the price value for the max(date) over that
> partition ?
>
> thank you
You could select not only the max(date) but also the key of the record with max(date) using a group by and then join it with the table. Something like this:
select a.price
from
your_table a,
(
select key
max(date) from your_table
Regards,
Jörg Received on Thu Jul 20 2006 - 06:36:04 CDT