you have a data set like this.
data qqq;
input name $ total;
cards;
qq 22
ww 33
qq 22
ee 44
rr 33
ww 44
;
run;
and you want output like this.........
name total
qq 22
ww 44
Do it by data set step.
Answer Posted / vishal
proc sort data=qqq;
by name;
run;
data f;
set qqq;
by name;
if first.name=0;
run;
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what is function of retain statment
What are the implications?
How do you use the do loop if you don’t know how many times you should execute the do loop?
I have a dataset concat having a variable a b & c. How to rename a b to e & f?
in the flow of data step processing, what is the first action in a typical data step? : Sas programming
Describe the function and untility of the most difficult SAS macro that you have written.
what is the use of sas management console? : Sas-di
what do the sas log messages "numeric values have been converted to character" mean? : Sas programming
Enlist the syntax rules followed in sas statements.
What are the different servers in sas? : sas-grid-administration
which features do you use to check the data validations and errors? : Sas-administrator
how are numeric and character missing values represented internally? : Sas programming
Difference between informat and format?
how can you create zero observation dataset? : Sas programming
What is the difference between match merge and one to one merge?