Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

how to get the weekly sales of summing up each week in sql

$
0
0

hi 

i want to get weekly sales after summing up totalsales of each week. following is my table how to accomplish this task

CREATETABLE[dbo].[CashSales](

[CSNo][nvarchar](255)NOTNULL,

[CashDate][datetime]NULL,[CashCode][int]NULL,[CashName][nvarchar](255)NULL,[NetTotal][float]NULL GO

NOTE: NetTotal column is net sales of every invoice

the result should be as 

1st week-may-2014  2nd week-may-2014  3rd week-may-2014

22422.00224243.00 264224.00


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>