Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
PGG_CA
Starting Member
24 Posts |
Posted - 2012-05-16 : 15:54:52
|
I have the following output from my query.Minutes Assignee5 Aa180 Bb35 Cc5 Aa20 Dd25 BbHow can I rewrite the query so that instead of returning 2 rows each for Aa and Bb, it will only return one each and a total of the minutes. The output should look like this instead:Minutes Assignee10 Aa205 Bb35 Cc20 DdThanks. |
|
influent
Constraint Violating Yak Guru
367 Posts |
Posted - 2012-05-16 : 16:45:22
|
select assignee, totalmins = sum(minutes) from thetablegroup by assignee |
 |
|
|
|
|