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
What do the PUT and INPUT functions do?
How to limit decimal places for the variable using proc means?
Give some ways by which you can define the variables to produce the summary report (using proc report)?
How does proc sql work?
This entry was posted in General. Bookmark the permalink. Post a comment or leave
What are the statements in proc sql?
What are the different versions of sas that you have used until now? : sas-grid-administration
What is the difference between the proc sql and data step?
Explain the difference between using drop = data set option in set and data statement?
what is slowly changing dimension? : Sas-di
what cause the "error: connect:" and "error in the libname statement" when there weren't any such problems?
I have a dataset concat having a variable a b & c. How to rename a b to e & f?
Give e an example of..
if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...
What is the maximum and minimum length of macro variable