Help using Base SAS procedures

which statement should I use to display the top 15 players with the highest efficiency rating?

Reply
New Contributor 233
New Contributor
Posts: 3

which statement should I use to display the top 15 players with the highest efficiency rating?

Hi,

I was assigned to create a temporary data set that contains the top 15 players with the highest efficiency rating. Efficiency rating is one of the variables in the dataset. I was wondering which statement could I use to solve this kind of problem? (I only learned about where, if, proc freq statements like that) Thanks!

Regular Contributor
Posts: 156

Re: which statement should I use to display the top 15 players with the highest efficiency rating?

you would want to sort the dataset in descending order first "proc sort; by descending efficiency; run;" and then there would be a number of ways to select the first 15 obs of this dataset, eg just count obs and "proc print data=xxx (where=(count le 15)); var efficiency; run;"

--------------
blog: papersandprograms.com
Ask a Question
Discussion stats
  • 1 reply
  • 127 views
  • 2 likes
  • 2 in conversation