On 21 Feb 2003 at 19:18, Gaetano Mendola wrote:

> > Hi folks,
> > 
> > This query:
> > 
> > SELECT element_id as wle_element_id, COUNT(watch_list_id)
> >     FROM watch_list JOIN watch_list_element
> >         ON watch_list.id      = watch_list_element.watch_list_id
> >        AND watch_list.user_id = 1
> >   GROUP BY watch_list_element.element_id
> 
> Try: 
> 
> SELECT element_id as wle_element_id, COUNT(watch_list_id)
>      FROM watch_list JOIN watch_list_element
>          ON watch_list.id      = watch_list_element.watch_list_id
> WHERE
>     watch_list.user_id = 1
>    GROUP BY watch_list_element.element_id

ERROR:  Attribute unnamed_join.element_id must be GROUPed or used in 
an aggregate function

-- 
Dan Langille : http://www.langille.org/


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to