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


Please Help Members By Posting Answers For Below Questions

why a stop statement is needed for the point= option on a set statement?

811


what is sas application server? : Sas-di

711


how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?

2507


If you use a symput in a data step, when and where can you use the macro variable? : sas-macro

815


Mention what is SAS data set?

888


how does sas handle missing values in assignment statements? : Sas programming

776


what is information maps?

1813


what are the benefits of data integration? : Sas-di

741


What are the features of base sas system?

784


what is broad cast agent? : Sas-bi

811


what is sas data set?

861


Describe a time when you were really stuck on a problem and how you solved it?

2301


how does sas handle missing values in formats? : Sas programming

829


Differentiate input and infile.

809


Give e an example of..

1828