Subject Re: [firebird-support] Re: group by ??
Author Robert martin
Hi

I believe the SQL I posted does as you describe. Please give it a go.

--
Rob Martin
Software Engineer

phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com

Wild Software Ltd



danyschaer wrote:
> Thanks to all for each try, but it seams I am not clear with my
> example; so please give me a chance to try again:
>
> An sample table called MOVI is:
>
> MOVI Char(10) ----------> primary key (unique record id)
> PROC Char(10) ----------> groups key
> FECH Char(12) ----------> datetime
> DSCR Varchar(200) ------> description
> etc, etc, etc ..
>
> I have to get the whole record with the last FECH, of each group. I
> can obtain the last FECH very fast, by doing:
>
> select max("FECH") from "MOVI" group by "PROC"
>
> But ... how to get whe whole record instead of only "FECH" ???
>
> Thanx again.
>
> Dany
>
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>
>
>