Subject | Re: [firebird-support] [Qry][Err:-206]Column does not belong to referenced table |
---|---|
Author | Alexandre Benson Smith |
Post date | 2006-02-08T20:55:20Z |
Andrea Raimondi wrote:
Put every column (Messages.*) on the GROUP BY clause and then ORDER BY avg
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
> Hello.Andrea,
>
> This is a prettily tricky query in fact.
> Here it is:
>
> select Messages.*,avg(MessageRatings.ratingvalue) as AvgRate
> from Messages
> join messageratings mg on mg.message_id = Messages.message_id
> group by AvgRate
>
>
Put every column (Messages.*) on the GROUP BY clause and then ORDER BY avg
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br