Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Easy Steps to a Complete Understanding of SQL. Parent comment
SELECT is evaluated after GROUP BY, at least in most databases that implement SQL correctly. SQL Server's documentation nicely explains this:
http://technet.microsoft.com/en-us/library/ms189499.aspx
Skip to "Logical Processing Order of the SELECT statement".
MySQL, PostgreSQL, and SQLite behave differently, though!
There are no comments on this comment yet.
SELECT is evaluated after GROUP BY, at least in most databases that implement SQL correctly. SQL Server's documentation nicely explains this:
http://technet.microsoft.com/en-us/library/ms189499.aspx
Skip to "Logical Processing Order of the SELECT statement".
MySQL, PostgreSQL, and SQLite behave differently, though!