On 20-mei-05, at 20:37, Will Leshner wrote:

select sum(ft) as Pts, pkey from playergame where Pts > 15 group by pkey

I just get back one record with "0" for the value of Pts. I guess what I was trying to do was get back results something like the first query, but for only those sums of ft that were greater than 15.

Hi Will,

You can't use a WHERE clause on the result of an aggregation. Use HAVING instead.

This should work:
select sum(ft) as Pts, pkey from playergame group by pkey having Pts > 15



- Rob Laveaux

--------------------------------------------------------
Pluggers Software
Thijssestraat 203
2521 ZG  Den Haag
The Netherlands

Email: [EMAIL PROTECTED]
Website: http://www.pluggers.nl

--------------------------------------------------------



Reply via email to