Subject | Re: group by ?? |
---|---|
Author | danyschaer |
Post date | 2008-06-09T21:57:42Z |
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
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