SQLServer GROUP BY
Basic GROUP BY example
It might be easier if you think of GROUP BY as "for each" for the sake of explanation. The query below:
"Give me the sum of MonthlySalary's for each EmpID"
So if your table looked like this:
Sum wouldn't appear to do anything because the sum of one number is that number. On the other hand if it looked like this:
Then it would because there are two EmpID 1's to sum together.