Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Select max problem
Hello,
I have this table :
id1 id2 date_begin date_end id 1 1 10/03/2004 16/03/2004 3 2 1 10/03/2004 17/03/2004 3 3 2 10/03/2004 17/03/2004 4 4 2 11/03/2004 16/03/2004 4
I would like to get id1 for each id and date_begin = max(date_begin)
*but* if there are many rows returned (id = 3 in this sample), I must get also
max(date_end)
(in this sample, I should get id = 3, id1 = 2 and id = 4, id1 = 4 )
I've tried with group by having without success...
Thanks in advance
-- Ce message a ete poste via la plateforme Web club-Internet.fr This message has been posted by the Web platform club-Internet.fr http://forums.club-internet.fr/Received on Tue Mar 09 2004 - 05:19:51 CST
![]() |
![]() |