data ab;
input x;
cards;
23.45
67.89
22.45
28.23
-23.65
;
/*airthematic function*/
proc sql;
select * , int(x) as it,
round(x) as r1,
round(x,.1) as r2,
ceil(x) as c,
floor(x) as fr,
abs(x) as ab,
log(x)as lg1,
log10(x) as lg2 from ab;
quit;
/* aggregate*/
data pd_sal;
input pcode Jsale Fsale Msale;
cards;
101 230 320 310
102 340 320 210
103 560 450 340
;
proc sql;
select pcode,sum(jsale,fsale,msale) as ts'total sale',
mean(jsale,fsale,msale) as ags'average sale',
max (jsale,fsale,msale)as mx'maximum sale',
min (jsale,fsale,msale) as mn'minumum sale',
std (jsale,fsale,msale) as sd'deviation in sale' from pd_sal;
quit;
/*monthly wise*/
proc sql;
select 'january' as month,
No comments:
Post a Comment