top | item 3979592

Do you use GROUP BY correctly?

7 points| donteatbark | 14 years ago |dbasquare.com | reply

1 comment

order
[+] Jare|14 years ago|reply
I often include such columns during ad-hoc analytics, because it is one valid example of the data being grouped. In particular, when COUNT(*) is 1 the value in that column is THE value, and thanks to including it in the query, I already have it. It's very convenient with very low cost.

For queries that are part of a formal process or application it's harder to find a use case.