SQLite version 3.4.0 What\'s wrong with aggregate functions? Additionally, I suspect that ORDER BY won\'t work as well. How to rewrite this?
sqlite> SELE
Short-version fix for this is:
When you're using function like COUNT/SUM, you need to use HAVING instead of WHERE.
COUNT/SUM
HAVING
WHERE