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 |
|
sqlclarify
Yak Posting Veteran
56 Posts |
Posted - 2008-10-09 : 00:47:09
|
| I have several columns in my select select a, b, c, qfrom awhere etc. etc.I want the sum of q grouped by a but I also want to display b,and c.So logically select a, b, c, sum(q)from awhere etc. etc.group by a, b, c won't work even though that is syntatically correct. How do I solve this problem? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-09 : 00:57:58
|
| select a, b, c, sum(q) over (partition by a)from awhere etc. etc. |
 |
|
|
|
|
|