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 |
GeirA
Starting Member
2 Posts |
Posted - 2012-05-03 : 01:38:58
|
I have this query:And I would like to sum the rows with the same weeknumber.I have tried a combination of distinct and sum, but with no luck. |
|
nathans
Aged Yak Warrior
938 Posts |
Posted - 2012-05-03 : 02:04:17
|
Use GROUP BY with SUM.select rwweek, sum(grosswool)from ...where ...group by rwweekorder by rweek |
|
|
GeirA
Starting Member
2 Posts |
Posted - 2012-05-03 : 03:14:31
|
Thanks a lot! |
|
|
|
|
|