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: Max

Re: Max

From: Guido Konsolke <Guido.Konsolke_at_triaton.com>
Date: Fri, 31 Jan 2003 13:42:15 +0100
Message-ID: <1044016821.527021@news.thyssen.com>


"Alain" schrieb...
>
> Hello,
>
> I have :
>
> TX Date
> -- -----
> 3 2002-01-01
> 4 2002-05-01
> 5 2002-03-01
>
> I would like to get TX value where Date is the max date (4 in this sample)
> without using order by desc and selecting the first line...
>
> Thanks in advance.
>

Hi Alain,

something like:

SELECT a.tx
FROM table a
WHERE a.date = (SELECT MAX(b.date) FROM table b);

should do it.

Greetings and nice weekend,
Guido Received on Fri Jan 31 2003 - 06:42:15 CST

Original text of this message

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