Hi Mark,
I am providing you the sample code for what you require. I hope thats what you require as an answer.
Keep in mind the "Week" function in the code will give you the week number starting from 1st week of the year i.e. the values will vary from 1 to 52.
Just try understanding the code. If you are new to proc sql, then you can go through the some basic concepts of the same, but the query is as simple as a SQL statement.
data test;
input date ddmmyy10. laptop_mod: $2. revenue;
cards;
10/03/2009 A 1000
11/03/2009 A 3000
12/03/2009 B 2000
12/03/2009 A 5000
13/03/2009 A 4000
14/03/2009 B 10000
15/03/2009 B 5500
16/03/2009 B 4000
;
run;
proc sql;
select week(date) as Week, laptop_mod,
sum(revenue) as revenue
from test
group by 1,2
;
quit;
Thanks,
Saurabh.