Hi all, I am attempting to use Proc SQL to combine values (Total_XP_Made) of specific players (as each player has multiple observations within the data set) based on a dummy variable I have created along with it (Pre_or_post_change). Below is the code itself, let me know if additional information is needed.
proc sql;
create table KID1 as
select distinct a.player, a.pre_or_post_change, a.Total_XP_made,
(case
when a.pre_or_post_change = 0 then sum(a.Total_XP_Made)
else 'None'
end) as XpMade
from KickersInfoDiff as a
group by Player;
quit;