SAS Practical Interview Questions and Answers
Vložit
- čas přidán 25. 02. 2024
- SAS Practical Interview Questions and Answers
This video contains SAS performance based interview questions and answers.
Key Questions:
Time Topics
MM:SS
00:37 Q1. Write a program to create new dataset with only Last 3 observations of source dataset dynamically.
04:37 Q2. What will happen if we run below code.
06:14 Q3. Make the changes in the below program so that both where statements should work.
08:38 Q4. Write a program to calculate runs scored in each over.
Nice videos Sir .. we learnt alot from your videos...
Excellent, please make more videos like this.
Really good questions sir, would love more similar once
Good questions. Please do more practical questions .
proc sql;
create table total_run as
select ceil(ball/6) as over,
sum(run) as runs from ds
group by over;
quit;
Nice vid0es🙏👍❤🎉
proc sql;
create table grouped_data as
select
ceil(ball/6) as over,
sum(coalesce(run, 0)) as total_run
from
ungrouped_data
group by
ceil(ball/6);
quit;
use unique funtion to expected output ---- unique(ceil(ball/6))as over,
Can you make a video on sas macros practical experience wise questions
Sure
proc format;
value balls
1-6="1 over"
7-12="2 over"
13-18="3 over";
run;
proc means data=cricket sum;
class balls;
var runs;
format balls balls.;
run;
Good Attempt. However suppose if balls are 600 then you have to hardcode 100 overs in formats. So this approach will not work dynamically, as total balls can be changed. So try solving this using only one data step. You can use underscore N underscore with combination of mod function.
@@sasworld2021 how about this
proc sql;
create table have as
select ceil(balls/6) as overs, sum(runs) as runs
from cricket
group by ceil(balls/6);
quit;
data have2;
set have;
by overs;
if first.overs then output;
run;
Excellent sir what is a roadmap to clear SAS interview for experience individuals
Kindly set up a sas interview session and I will guide you.
data want;
set given;
if _n_
Very good
pls share solution for the Q4 using macros
Data new (keep=j cnt rename=(cnt=runs j=over));
X=6;
DO J=1 to nobs;
Do i=1 to x;
Set old nobs=nobs;
Cnt+runs;
If i=x then output;
If i=1 then cnt=0;
End;
End;
Run;
Can you do vedio on sas9.4 installation for windows
Already have one. Please check.
Hii sir
Hi
data x;
set y ;
over = ceil (ball/6) ;
run;
proc sql;
create table new as select over, sum(run) as total_run from x group by over ; quit;
can some one tell what is the result of the below:
%let a=b;
%let b=c;
%let c=d;
%let d=e;
%let e=f;
%put &&&&&a;
c hoga
F
63, If u want &a in the last step.
@@parulsingh1697 63 Kha s aa gya?
@@parvsharma8767 I thought u r asking how many '& ' will be required to get %a at last ..... for this question ans will be 'c'.