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
I have a dataset concat having a variable a b & c. How to rename a b to e & f?
explain about sas business intelligence? : Sas-bi
How can I remove header from output data set?
What commands are used in the case of including or excluding any specific variables in the data set?
What are the difficulties u faced while doing vital signs table or dataset?
what is the difference between infile and input? : Sas-administrator
what is sas application server, database server, sas olap server and sas metadata server? : Sas-di
how will you location sas platform applications available from web browser? : Sas-bi
Describe the function and untility of the most difficult SAS macro that you have written.
What are the different types of sas functions?
Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??
What is the difference between nodupkey and nodup options?
what is business intelligence? : Sas-bi
What can be the size of largest dataset in SAS?
What is the use of function Proc summary?