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 |
tjonas
Starting Member
17 Posts |
Posted - 2015-01-16 : 13:20:24
|
I am wondering how I would add totals. I need to add all the sale_id by person. It should look like below. I can pull in the sale_name and sale_id but i'm unsure how to create a column that totals like sale_num below. Thanks. sale_Name sale_id sale_numJim Thomas 157452Jim Thomas 153352Jim Thomas 198762Jim Thomas 3Bill Simpson 254854 Bill Simpson 265782Bill Simpson 233122 Bill Simpson 257411 Bill Simpson 4 |
|
sz1
Aged Yak Warrior
555 Posts |
Posted - 2015-01-21 : 09:08:46
|
Select sale_Name, Sum(sale_id) sale_numFrom SalestableGroup By sale_name,sale_idOrder By sale_name ascWe are the creators of our own reality! |
|
|
|
|
|