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 |
|
DWMelton
Starting Member
5 Posts |
Posted - 2012-07-06 : 15:33:31
|
| I have a query that joins multiple tables and the results are at the details level, now I need to sum the records based on 3 columns. Example, I execute the query and its results in 191 records returned (all detials), but I need it to return the summation of the 191 by type, group and name. Any suggestions and directions |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-07-06 : 16:55:21
|
with limited provided information, stub will look likeSELECT Col1,Col2,Col3,SUM(yourfield1),..FROM tableGROUP BY Col1,Col2,Col3 ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
DWMelton
Starting Member
5 Posts |
Posted - 2012-07-10 : 21:53:38
|
Thanks GB worked quote: Originally posted by DWMelton I have a query that joins multiple tables and the results are at the details level, now I need to sum the records based on 3 columns. Example, I execute the query and its results in 191 records returned (all detials), but I need it to return the summation of the 191 by type, group and name. Any suggestions and directions
|
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-07-10 : 22:09:14
|
| wc------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|
|
|