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 |
MadForPlaid
Starting Member
1 Post |
Posted - 2013-05-29 : 13:13:50
|
Given the sample results from a subquery:Store.....Ticket...Date........Cashier....POS...Dept.....Sum1..........10......2012-08-30.....25.......12....6......45.341..........10......2012-08-30.....25.......12....6......265.892..........12......2012-07-15.....38.......9....16......41.402..........12......2012-07-15.....38.......9....16......125.69How can I then query off of that to arrive at 1 row (per each match) returned with the sum of amount?Store.....Ticket...Date........Cashier....POS...Dept.....Sum1..........10......2012-08-30.....25.......12....6......311.232..........12......2012-07-15.....38.......9....16......167.09Thanks for any help,Paul B. |
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2013-05-29 : 13:18:58
|
SELECT Store, Ticket, DAte, CAshier, POS, Dept, Sum(SumColumn)FROM TableNameGroup by Store, Ticket, DAte, CAshier, POS, DeptCheersMIK |
|
|
|
|
|