Re: How to write simple select clause for the following problem
From: Jusung Yang <JusungYang_at_yahoo.com>
Date: 16 Nov 2002 10:35:38 -0800
Message-ID: <130ba93a.0211161035.8857a3b_at_posting.google.com>
Date: 16 Nov 2002 10:35:38 -0800
Message-ID: <130ba93a.0211161035.8857a3b_at_posting.google.com>
Something like this should work:
select greatest(d1, d2, d3) from (select max(date1) d1, max(date2) d2, max(date3) d3 from mytable);
- Jusung Yang
oliveryao2000_at_yahoo.com (Oliver Yao) wrote in message news:<d617ee1.0211151840.372be2bf_at_posting.google.com>...
> Assume a table MYTABLE looks like the following:
>
> MYTABLE:
>
> NAME DATE1 DATE2 DATE3
> X 01/01/02 01/01/02 02/01/02
> Y 02/04/02 02/05/02 01/30/02
> Z 02/20/02 02/05/02 11/14/02
>
> The problem is to find the last date (i.e. 11/14/02) in all three column
> DATA1, DATA2 and DATA3. Thanks.
Received on Sat Nov 16 2002 - 19:35:38 CET
