in data set200 observation how to take 110,150,170 using sql procedure?

Answers were Sorted based on User's Feedback



in data set200 observation how to take 110,150,170 using sql procedure?..

Answer / anji

Proc sql;
create table ab as select * from SASHELP.class where monotonic() in (10,12,14);
quit;

Is This Answer Correct ?    14 Yes 1 No

in data set200 observation how to take 110,150,170 using sql procedure?..

Answer / ashish

Hey , your anwer is almost right but the only correction is
we derived the count variable by using monotonic() function
so that we have to use "calculated count" in where
statement or we can also use HAVING in palce of WHERE..

PROC SQL;
CREATE TABLE TEST AS SELECT
*,
MONOTONIC() AS COUNT
FROM TEST1
HAVING COUNT IN (110,150,170);
QUIT;

Is This Answer Correct ?    4 Yes 3 No

in data set200 observation how to take 110,150,170 using sql procedure?..

Answer / ram

We have number of options to select or retrieve the data
data part_of;
/*do slice = 100,200,300,400,550,600,700,800,900;*/
do slice = 100 to 900;
set example_1 point=slice;
output;
end;
stop;
run;
Proc Sql;
Select *,monotonic ()as c from example_1
group by date having c in (110,150,170,190);
quit;
Proc Sql;
Select *from example_1
group by date having date in (100,150,180,190);
quit;

Is This Answer Correct ?    1 Yes 0 No

in data set200 observation how to take 110,150,170 using sql procedure?..

Answer / alok karan

proc sql;
select *,monotonic()as obs from alok.countries
where calculated obs in(1,4,8,7,21,23)
;
quit;

Is This Answer Correct ?    1 Yes 0 No

in data set200 observation how to take 110,150,170 using sql procedure?..

Answer / naveen

proc sql;
select *
from qqq
where Height in(69);
quit;

Is This Answer Correct ?    0 Yes 2 No

in data set200 observation how to take 110,150,170 using sql procedure?..

Answer / pranoy

PROC SQL;
CREATE TABLE TEST AS SELECT
*,
MONOTONIC() AS COUNT
FROM TEST1
WHERE COUNT IN (110,150,170);
QUIT;

Is This Answer Correct ?    2 Yes 5 No

in data set200 observation how to take 110,150,170 using sql procedure?..

Answer / naveen

proc sql;
select *
from
where obs, in(11, 23,44);
quit;

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SAS Interview Questions

what is SAS/Access and SAS/Connect?what are the uses?

3 Answers  


what type of graphs we will create(for 2+years candidates)?

0 Answers   Accenture, Icon,


what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming

0 Answers  


differnce between 8.2 and 9.1.3

1 Answers  


What is the order of application for output data set options, input data set options and SAS statements?

0 Answers   Quintiles,






How would you include common or reuse code to be processed along with your statements?

3 Answers   Accenture,


/* To determine the maximum and minimum of V1 */ data before3; input v1 v2 v3; cards; 3 2 1 4 6 5 2 1 3 6 5 4 1 3 2 5 4 6 ; run;

5 Answers  


what is prime numbers? how we can get plc write sas code?

5 Answers   Icon,


What are the difference between ceil and floor functions in sas?

0 Answers  


in which companies SAS openings are there? List of companies using SAS technology.

14 Answers   MIR-IFCR, TCS,


What are the different servers in sas? : sas-grid-administration

0 Answers  


What is the order of evaluation of the comparison && logical && relational operators:?

2 Answers   CitiGroup,


Categories