Re: 7.3 "group by" issue - Mailing list pgsql-sql

From Gaetano Mendola
Subject Re: 7.3 "group by" issue
Date
Msg-id 008a01c2d9d5$92d59ed0$152aa8c0@GMENDOLA2
Whole thread Raw
In response to 7.3 "group by" issue  ("Dan Langille" <dan@langille.org>)
Responses Re: 7.3 "group by" issue
List pgsql-sql
----- Original Message ----- 
From: "Dan Langille" <dan@langille.org>
To: <pgsql-sql@postgresql.org>
Sent: Friday, February 21, 2003 7:01 PM
Subject: [SQL] 7.3 "group by" issue


> 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


Ciao
Gaetano



pgsql-sql by date:

Previous
From: "Dan Langille"
Date:
Subject: 7.3 "group by" issue
Next
From: "Dan Langille"
Date:
Subject: Re: 7.3 "group by" issue