Subject Re: [firebird-support] some sql help
Author Helen Borrie
At 01:23 PM 1/03/2004 +0100, you wrote:
>Hi, if I have the following table:
>Id Value
>1 100
>1 200
>2 300
>If I want to retrieve the maximum value in each Id group, i.e. line 2
>and 3, I was hoping that I could write:
>Select max(Value), Id
> >From aTable
>Group by Id
>I'm not getting the results I was hoping for using this method, but it
>might be that there is something else that is wrong since this is just
>part of a stored procedure.

What results did you hope for? You should get

200 1
300 2