Subject Re: [firebird-support] SELECT MIN
Author Nick Upson
you need to decide which value for date2 you want to show

On 18/04/07, Alejandro Garcia <aleplgr@...> wrote:
> Hi! I have a 3 columns table: CLIENTID DATE1 DATE2
> for each CLIENTID can be more than one DATE1 so I have to select the MIN. Just doing this works fine:
> SELECT MIN (DATE1)
> from mytable
> group by CLIENTID
> Now I need also to show DATE2 in the result, if I include it in the SELECT I need to include it in the GROUP BY but if I do that I don't get the MIN(DATE1)for each CLIENTID: it returns all of them..