Subject Re: [ib-support] firebird1.5 group by question
Author Helen Borrie
At 01:20 PM 30/04/2003 +0800, you wrote:
>Thank you answer,
>
>But this query error too :
>
>Select max(o.workingorder), o.ColorId,max(c.name) colorname , max(c.colorno)
>colorno
> from OrderColor O
> join color c on (o.colorid = c.colorid)
> group by o.colorid
> order by o.workingorder

o.workingorder is not in the output set.


>if like this then no error
>
>Select max(o.workingorder), o.ColorId,max(c.name) colorname , max(c.colorno)
>colorno
> from OrderColor O
> join color c on (o.colorid = c.colorid)
> group by o.colorid
> order by 1

The first column is a calculated value - it is not o.workingorder.

heLen