Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL: More fields in select list with group by
Christopher Beck wrote:
>
> You can use an inline view like...
>
> SQL> l
> 1 select d.id, d.version, d.title
> 2 from dummy d,
> 3 ( select id, max(version) version from dummy group by id ) m
> 4 where m.id = d.id
> 5* and m.version = d.version
> SQL> /
>
> ID VERSION TITLE
> --- -------- ------------------------------
> 1 2 Title 1, version 2
> 2 3 Title 2, version 3
> 3 1 Title 3, version 1
>
> SQL>
>
> hope this helps.
>
> chris.
>
Yes, this helps indeed. This reflects exactly what I need. Thank you very much, thanks goes also to Leonel Sanhueza, who came up with the same suggestion.
btw: Is there some literature for such things I would call more advanced sql (although Oracle specific).
Thank you all,
Michael
--
Michael Hase michael_at_six.de Six Offene Systeme GmbH http://www.six.de Sielminger Str. 63 phone +49 711 99091 62 70771 Leinfelden-Echterdingen, GermanyReceived on Tue Oct 13 1998 - 03:57:42 CDT