Below is the table.
Required to be output should be the highest number of each student_id.
Example.
Student_id Subject Marks
1 Hindi 86
2 Hindi 70
3 English 80
.
Calculate sum and average marks for each group of student_id
Example.
Student_id Subject Marks Total Marks Average
1 English 40 181 60.33333
2 English 67 196 65.33333
3 English 80 160 53.33333
PLEASE PROVIDE THE CODE OF ABOVE PROBLEMS
data a;
input id sub$ marks;
cards;
1 Hindi 86
2 Hindi 70
3 Hindi 80
1 English 80
2 English 34
3 English 39
1 Maths 28
2 Maths 45
3 Maths 12
;
run;
proc sort data = a out=b;
by id descending marks;
run;
data c (drop=total_marks) d;
set b;
by id descending marks;
if first.id then output c;
if first.id then total_marks=marks;
else total_marks+marks;
if last.id then output d;
run;
proc print; run;
proc means data = a mean max sum;
class id;
var marks;
output out=df;
run;
proc means data = a noprint nway;
class id;
var marks;
output out=df sum= mean= max= /autoname;
run;
proc print; run;
| Is This Answer Correct ? | 1 Yes | 0 No |
For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration
what are the three main credit bureau names
1 Answers Synchrony Financial,
when we are using the PROC TRANSPOSE? OBSERVATIONS are repeated then what will happen and what it will show in log window.
what are different type of sas servers ? On which server does the sas code execute ?
Why Info School? BUILD YOUR CAREER WITH RIGHT GUIDANCE AND SUPPORT
What is the order of evaluation of the following operators + - * / ** () ???
what are sas/access and sas/connect? : Sas programming
Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??
what is AE onset date and what is RDS?
how to import HTML files into SAS datasets?
what is the difference between %put and symbolgen?
How to import the Zip files into SAS? If it is possible in SAS? If it is posible write the code...