Link to home
Start Free TrialLog in
Avatar of Connie Jerdet-Skehan
Connie Jerdet-SkehanFlag for United States of America

asked on

count number of orders in 6 month intervals

I am trying to create a query\procedure that will show the total number of orders from a selected customer in 6 month intervals. For 6, 12, 18 and 24 months. Please show a step by step.

example if abc company order 6 times from Jan to Jun and 4 times from Jul-Dec then i want the report to show

company    6_Months    12_Months
acbc                   6                  10 <----- Rolling sum

I am using microsoft sql server 14
ASKER CERTIFIED SOLUTION
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Connie Jerdet-Skehan

ASKER

Had to do a little tweaking to code, but you got me in the right directions. Thanks!!