Code a PROC MEANS that shows both summed and averaged
output of the data.

Answers were Sorted based on User's Feedback



Code a PROC MEANS that shows both summed and averaged output of the data. ..

Answer / amit nakrani

I think we can do it in following way. Please correct me if
it is wrong.

proc means noprint data = sourcedata;
var var1 var2;
by var3;(optional)
output out = newdata
sum(var1,var2) = SumVar1 SumVar2
mean(var1,var2) = MeanVar1 MeanVar2;
run;

proc print data = newdata;
run;

Is This Answer Correct ?    9 Yes 2 No

Code a PROC MEANS that shows both summed and averaged output of the data. ..

Answer / sreekanth rao

please correct me if my thought process is wrong.

question is to show only sum and avg...

proc means data=test sum mean;
by var (optional);
run;

here we are req only for sum mean. use out=new data set
name to print most recent data set.

Thanks

hi friends expecting the ansewrs.


Thanks
Sreekanth rao

Is This Answer Correct ?    3 Yes 5 No

Code a PROC MEANS that shows both summed and averaged output of the data. ..

Answer / sumit

proc means data=work.emp sum mean;
class deptno;
var sal;
run;

Is This Answer Correct ?    0 Yes 2 No

Code a PROC MEANS that shows both summed and averaged output of the data. ..

Answer / venkatesh.layam

proc means data=sashelp.calss means sum=total;
class gender;
var age;
run;

Is This Answer Correct ?    0 Yes 3 No

Code a PROC MEANS that shows both summed and averaged output of the data. ..

Answer / srini

Proc Means data=test noprint;
var var1 var2(optional)
output out=newdataset
sum= mean=;
run;

Is This Answer Correct ?    0 Yes 8 No

Post New Answer

More SAS Interview Questions

In sas, what are the areas that you are most interested in? : sas-grid-administration

0 Answers  


what is snowflake schema? : Sas-di

0 Answers  


Hi, I need to create a SAS Map of USA using SAS Graphs(Proc Gmap).The data i have dosent contain any co-ordinates of USA cities or counties or states, and the zip codes are diffrent in the data i have from the zip code in the Maps.US dataset in the Maps Library for SAS MAPS. the data i have is a sales report. i have to generate the maps according to the states,cities aligned in the sales data, HELP Appriciated

1 Answers  


How to display duplicate observations in data?

1 Answers  


Differentiate between format and informat? : sas-grid-administration

0 Answers  






i have one dataset data l; input name: $ 25; cards; manoj is a good boy to krishna krishna is a god boy to malli malli is good boy to ramana ques: here i want "manoj" observations nubers

3 Answers   SAS,


How to read multiple excel sheets from a single excel file at once????

7 Answers   HCL, Verinon Technology Solutions,


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

1 Answers   Accenture, HSBC,


my problem is to export my report to xsl.i can do that.but the problem is my report has 3 headings first heading should be printed with the merging of (1-5)cells and heading 2 should be of merge(2-4)cells?how to do this condition?

2 Answers   Dr Reddys, Oracle,


How to limit decimal places for variable using proc means?

0 Answers  


Why double trailing @@ is used in input statement?

0 Answers  


what is sas data set?

0 Answers  


Categories