Group by in Sql server
Group by = merge all such column values that are same and show single row of that merged row. The columns that are in SELECT list and Group by list should be same.
Here any 2 rows[all column] values will be same so when u use group by it will return one row.
Note : if any row's single column value is different with other row's single column value [i.e. if any mismatch. See red round circle] then Groupby will return all rows in this case.
It returns all the rows because : Till Resource column both rows has same values but since status/decision columns has different values. Group By will return all rows in such cases
Comments
Post a Comment