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 |
|
andrewcw
Posting Yak Master
133 Posts |
Posted - 2006-02-11 : 14:07:17
|
| I can represent my table with this sample:Item elapsedsecsA 50A 50B 25B 25C 20 I try to get A 100B 50C 20with this query :SELECT SUM(elapsedsecs) AS inTotalFROM (SELECT item, elapsedsecs FROM dbo.inworkTable GROUP BY item, elapsedsecs) AS MY_ASBut instead i just get 1 column, with the sum = 95. This has 2 issues - it dumped the 'apparent duplicates' and did not do the grouping I had hoped and need. I really need the grouping so I can run stdev and avg on the result.What should the query be ?? Thanksandrewcw |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
andrewcw
Posting Yak Master
133 Posts |
Posted - 2006-02-11 : 14:27:37
|
| Very Fast ! Thank you :)andrewcw |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|