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

Show Count Of Weekly Production

$
0
0

I have seen several examples close to what I am after, but none that hit the nail on the head (and I am not savy enough to tweak to hit exactly my needs).  Heres the story, I want to declare a local variable called @SalesBegin date and input a date.  Then from that date, I want to show WEEKLY sales.  So the query would be (w.o. date parameters obviously) and @SalesBegin would always be a Monday and the Weekly Data shown below would need to contain data for Monday - Sunday.

Select Count(*) from SalesInfo
Where Approved = 'yes'

And have the output placed in a similar format:

Week1 --- 500

Week2 --- 750

Week3 - 1000

Week4 - 1500


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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