I'm not sure if this is a bug in SQLite, or just whacky sql, but lets say I've got a table called playergame with two integer columns, one called ft and the other called pkey and I try to do something like this:

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

I get back the sum of ft, as Pts, for each distinct value of pkey, right? That seems to work just fine.

But now if I try to do this:

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.

Reply via email to