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
Post a Comment