Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Select Family, First (Name) from ... group by Family

Re: Select Family, First (Name) from ... group by Family

From: Dmitry Sirotkin <sdmitry1_at_mail.ru>
Date: Thu, 24 Feb 2000 16:11:05 +0300
Message-ID: <893aka$eal$1@news.rinet.ru>


Uhh! Cool guy :)

I agree with Jonathan Lewis that there's can't be "just first" and "just last" row in the table in any RDBMS.
If you mean "first" in terms of inserting time, that's no problems: SELECT f1.*
  FROM Table1 f1, (SELECT Family, Min(Insert_Time) InsTime FROM Table1 GROUP BY Family) f2
 WHERE f1.Family = f2.Family
  AND f1.Insert_Time = f2.InsTime
and so on.
Or you can simply write PLSQL block with a cursor loop and do what you're gonna do within it.

With best wishes,
Dmitry Sirotkin. Received on Thu Feb 24 2000 - 07:11:05 CST

Original text of this message

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