Select a Column in SQL not in Group By

前端 未结 7 1405
忘了有多久
忘了有多久 2020-11-30 02:25

I have been trying to find some info on how to select a non-aggregate column that is not contained in the Group By statement in SQL, but nothing I\'ve found so far seems to

7条回答
  •  感情败类
    2020-11-30 02:36

    What you are asking, Sir, is as the answer of RedFilter. This answer as well helps in understanding why group by is somehow a simpler version or partition over: SQL Server: Difference between PARTITION BY and GROUP BY since it changes the way the returned value is calculated and therefore you could (somehow) return columns group by can not return.

提交回复
热议问题