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;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9. Sign up by Dec. 31 to get the 2024 rate of just $495. Register now!