Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL riddle !
select num_project, num_contact
from contacts c1
where date_cre =
(select min(date_cre)
from contacts c2
where c2.num_project = c1.num_project)
Hth,
Sybrand Bakker, Oracle DBA
"olivier ALLAIN" <oallain_at_celya.fr> wrote in message =
news:38EE161D.62FF2B51_at_celya.fr...
I have a table which looks like this :
NUM_CONTACT DATE_CRE NUM_PROJECT
and i want to know the num_contact of the oldest contact of each = project.
Of course, i can't do that :
select min(date_cre),num_contact from contacts group by = num_project;
Is thereanyone who can help me ?
Thanx
Oli ALLAIN Received on Fri Apr 07 2000 - 13:01:44 CDT
![]() |
![]() |