data have;
input date :date9. price;
format date date9.;
cards;
01jul1994 10
02may1995 15
10may1995 20
16jun1995 25
28jun1995 30
;
proc sql;
create table want as
select put(date,monyy7.) as Month_year, avg(price) as Average_price
from have
group by Month_year;
quit;
data have;
input date :date9. price;
format date date9.;
cards;
01jul1994 10
02may1995 15
10may1995 20
16jun1995 25
28jun1995 30
;
proc sql;
create table want as
select put(date,monyy7.) as Month_year, avg(price) as Average_price
from have
group by Month_year;
quit;