Hello People. I'm learner in SAS.
I have a simple query in access:
SELECT Tbl.Location, Tbl.Jobcode, Count(Tbl.EmpId), Sum(Tbl.Salary)
FROM Tbl
GROUP BY Tbl.Location, Tbl.Jobcode;
I need to display the same results in SAS. The dataset is created.
The code i'm trying to write is as follows:
PROC SORT DATA = msdq.crew OUT=work.Tbl;
BY Location Jobcode;
RUN;
PROC PRINT DATA = Tbl;
ID Location Jobcode;
BY Location Jobcode;
VAR Salary;
SUM Salary;
RUN;
I need to write Count(EmpId) and Sum(Salary)
And also the above code does not group the two variables; it creates a Sub-total and a grand total.
How to group. Help me out plz ?
... View more