SQL error: misuse of aggregate

后端 未结 3 1633
夕颜
夕颜 2020-12-03 02:46

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         


        
3条回答
  •  抹茶落季
    2020-12-03 03:43

    Short-version fix for this is:

    When you're using function like COUNT/SUM, you need to use HAVING instead of WHERE.

提交回复
热议问题