Community

Only GROUP BY what you really need to

(Andrew Dunstan) The old rule used to be that if you have a query that contained aggregated columns, you have to GROUP BY every other column selected. These days you are allowed to omit columns that are provably functionally dependent on one or more of the other grouped by columns.

Read More - Register for Free Membership