Calculations in SQL Server -


i want use microsoft sql server management studio data database. in want calculations:

for every day have 2 different datapoints. want add new datapoint sum of 2 datapoints.

in example want code following task:

for every 'date' want new datapoint (let's call category3) sum af 'data' 'category1' , 'category2'. code:

 select         [date], [category], [data]        [ ... ]        category in ('category1', 'category2')  order      asofdate  

do want simple group by query where?

 select [date], sum(data)  [ ... ]  category  in ('category1','category2')  group asofdate  

Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -