I have query in proc sql in SAS Enterprise Guide like below:
proc sql;
select
event
, mnth
, value
from table1
order by mnth, name
;quit;
Above proc sql query gives result as below:
event| mnth | value
-----|-------|-------
ABC | APRIL | 3E-6
ABC | APRIL | 0,27950
ABC | APRIL | 0,556
ABC | MAY | 0,228
... | ... | ...
And I need to create new column where will be showed sum of values per mnth, so as a result I need something like below (Of course we should take into account also values like '3E-6' if it is possible):
event| mnth | value | sum
-----|-------|---------|-----
ABC | APRIL | 3E-6 |
ABC | APRIL | 0,27950 |
ABC | APRIL | 0,556 | 0,8355
ABC | MAY | 0,228 | 0,228
... | ... | ... | ...
How can I modify my code in proc sql so as to achieve result like above ?