On 2014/08/04 18:27, Mark Lawrence wrote:
On Mon Aug 04, 2014 at 06:04:53PM +0200, RSmith wrote:
Yes it does, thanks. I guess I still find the combination of COUNT without a GROUP BY to be unintuitive, but at least I know why now.

As far as I know, there is no requirement for a group by clause for any of the functions really, a table or any SELECT result set is by definition "a group" (or should I say "the Group"), and unless a "group by" is explicitly stated, the table/result-set is itself the group and all group functions (aggregates functions) should work on it. The reverse is not necessarily true though, in that SQL (the Standard anyway) really requires you to specify an aggregate function for each and every element in a SELECT containing a GROUP BY function - but most engines (SQLite too) are quite lenient in this regard.

(This being my current understanding and experience, I might be wrong)

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to