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 |
|
cornall
Posting Yak Master
148 Posts |
Posted - 2009-04-07 : 10:43:40
|
| Hi,If I have a tablegroup cost1 31 51 12 72 62 2How do I get the resultgroup cost1 92 15 |
|
|
cornall
Posting Yak Master
148 Posts |
Posted - 2009-04-07 : 10:45:05
|
| ignore this I was just missing a clause from my group by! |
 |
|
|
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2009-04-07 : 10:45:20
|
| select Group, sum(cost) group by group<><><><><><><><><><><><><><><><><><><><><><><><><>If you don't have the passion to help people, you have no passion |
 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2009-04-07 : 10:45:23
|
| select [group], sum(cost) from table group by [group] |
 |
|
|
cornall
Posting Yak Master
148 Posts |
Posted - 2009-04-07 : 10:51:11
|
| Cheers,The actual query is much more complex and I was just missing one element of my group by I thought I was going mad!! LOLThanks for the help though.Dave |
 |
|
|
|
|
|