Subject | Re: [firebird-support] [Qry][Err:-206]Column does not belong to referenced table |
---|---|
Author | Andrea Raimondi |
Post date | 2006-02-08T21:03:45Z |
Alexandre Benson Smith wrote:
select Messages.*,avg(MessageRatings.ratingvalue) as AvgRate from Messages
join messageratings mg on mg.message_id = Messages.message_id
group by Messages.* order by AvgRate
If you mean something like the above, then it doesn't work.
Same error, same message.
Andrew
> Andrea,Alexandre,
> Put every column (Messages.*) on the GROUP BY clause and then ORDER BY avgLike this?
select Messages.*,avg(MessageRatings.ratingvalue) as AvgRate from Messages
join messageratings mg on mg.message_id = Messages.message_id
group by Messages.* order by AvgRate
If you mean something like the above, then it doesn't work.
Same error, same message.
> see you !Cheers,
Andrew