Home > database >  Group by in SQL server
Group by in SQL server

Time:05-07

Group by followed by multiple fields such as a, b to b, a, the result will be a or a, b, c to b, c, a,
If he will not change the default order of what is,,

CodePudding user response:

Group by itself is not sorted but behind the execution of default is according to the group by field in a display order sequence

CodePudding user response:

Group by a, b to group by b, a number of rows in the result influence, the results of the default sort may be random,
From rigorous consider recommending plus the order by clause stipulated sorting way.
  • Related