1 comment

[ 3.1 ms ] story [ 15.8 ms ] thread
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.