| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: use of ROWNUM
Mariano schrieb:
> Then I have this query result:
>
>> select * from analisi_ricovero WHERE id_ric=82>
> ID_ANL ID_RIC INDATA VALORE
> 41 82 29-APR-07 11.54.17,000000 PM 43
> 41 82 29-APR-07 11.54.10,000000 PM 5
WITH analisi_ricovero AS (
SELECT 41 id_anl,
82 id_ric,
to_timestamp('29-APR-07 11.54.17,000000 PM','dd-mon-yy hh:mi:ss,ff AM')
indata,
43 valore
FROM dual UNION ALL
SELECT 41,
82,
to_timestamp('29-APR-07 11.54.10,000000 PM','dd-mon-yy hh:mi:ss,ff AM'),
5
FROM dual
)
SELECT
max(id_anl) KEEP (dense_rank LAST ORDER BY valore), max(id_ric) KEEP (dense_rank LAST ORDER BY valore), max(indata) KEEP (dense_rank LAST ORDER BY valore)FROM analisi_ricovero
Best regards
Maxim Received on Sat May 05 2007 - 08:48:12 CDT
![]() |
![]() |