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

describe the interaction table in sas di? : Sas-di

0 Answers  


I have 3 years of work experience at a startup and recently got certified in Data Science with SAS. I need to know how to get into the analytics industry

0 Answers  


what is conditional processing?

4 Answers   Accenture,


PROC SQL always ends with QUIT statement.Why cant you use RUN in PROQ SQL ?

7 Answers   HP,


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

0 Answers   Accenture, Icon,






· What are some good SAS programming practices for processing very large data sets?

6 Answers   Quintiles,


how can you get the single data set from the library(which has the number of data sets)?

3 Answers   Accenture, Deloitte,


Can you calculate the mean, median and mode of the following data set using data step logic? Don't use any function or procedure. data a; input age @@; datalines; 22 32 32 32 43 23 24 56 45 54 28 29 27 26 25 28 30 20 18 37 36 47 46 56 19 20 ; run; I have calculated the mean which i have posted in the answer section.

6 Answers   HSBC,


What does a PROC TRANSPOSE do?

8 Answers   Accenture,


What is SAS? is it a software just for use or we can creat something over there?

5 Answers   Cognizant,


what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming

0 Answers  


How would you delete duplicate observations?

9 Answers  


Categories