HINT: When you get an error copy the code from the log along with the message and paste that into a code box opened with the forum's {I} icon.
Do you want a data set (for further manipulation) or a report (people read these)?
Better is to post a data step representative of your data. Not all versions of SAS can use your data sets natively and it is extra work for use to 1) download, 2) make the set available to code and then test.
I am assuming that "ppl" means people. Depending on how your actual data is structured that may be very easy or somewhat tricky.
I would likely start with something like:
proc means data=combo n mean;
class dept;
var salary;
run;
if none of your people appear more than once. If the same person is in more than one department for some reason you'll have to decide how to handle that.