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.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 before and after query

Author  Topic 

usafelix
Posting Yak Master

165 Posts

Posted - 2014-08-13 : 02:35:10
Anyone can help ? how to write this query ? i want get the after result and average the GP and sum total.

before After
type sales GP % type sales GP %
A 100 10 A 100 10
B 200 5.3 B 200 5.3
C 300 21 C 300 21
Total 600 12.1

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-08-13 : 03:01:52
This sounds pretty basic. What have you tried so far?
Go to Top of Page
   

- Advertisement -