2 ms·
(I had to correct myself) SELECT is evaluated after GROUP BY, at least in most databases that implement SQL correctly. SQL Server's documentation nicely explai
by lukaseder 13y ago
(I had to correct myself)
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 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!