Forum OpenACS Q&A: Response to sql difficulties

Collapse
Posted by David Kuczek on
The strange thing about it is, that the gc.comment_type is being recognized when I exchange the subquery

(select avg(wert) from general_bewertung where comment_id in (select comment_id from general_comments where user_id = gc.user_id and comment_type = gc.comment_type)) as durchschnitt_bewertung,

to

(select max(comment_id) from general_comments where user_id = gc.user_id and comment_type = gc.comment_type) as durchschnitt_bewertung,

Is this possibly a postgres bug???