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 |
|
BitShift
Yak Posting Veteran
98 Posts |
Posted - 2007-01-19 : 14:14:59
|
| Lets say I have a table like so:idsales_person_idsale_idsale_typesale_amountdescriptionThere can be multiple records that share the same sale_id How can I return a result with each row a summary of the total sale amount for a given sale_id and sales_person_id ? |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-01-19 : 14:24:06
|
| select sales_person_id, sale_id, sum(sale_amount)from blablablagroup by sales_person_id, sale_id???Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|
|