how can get the first and last observations in a dataset
using Proc SQl?
Answer Posted / venkatesh layam
crate one data in sql with adding of new var (a = 1) and
sort(order by) descending order by another variable and
take distinct of a (newvar-which is already created) --then
u wil get last observation.
next do ascending and get first obs ,then union these two
data sets .u will get first and last obs.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain substr function?
List out some key concept of SAS
How you are maintaining sas programmes in your company...any specific version control software you are using? If so, tell me the name?
What is program data vector (pdv)?
What are symget and symput? : sas-macro
explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di
what are the types of interactive display types? : Sas-bi
Have you used macros? For what purpose you have used? : sas-macro
What are the five ways to do a table lookup in sas? : sas-grid-administration
How would you include common or reuse to be processed along with your statements?
describe about physical data integration? : Sas-di
What is the basic structure of the SAS base program?
what is star schema? : Sas-di
What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro
Explain append procedure?