BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JKCho
Pyrite | Level 9
proc sql;
create table Rstd as 
 select cusip and year,std(dailyr) as with_in_std 
  from rvol
   group by cusip, year;
quit;

I think this time I am even closer to the right answer than before. feels like I am learnings SAS more.

Yes. I know I do not have to put and year after cusip but simply do not know how to have grouped std...

I did both select cusip,std(dailyr) as with_in_std and select year,std(dailyr) as with_in_std

and it worked so good and saw groups std eight by cusip or year.

BUT... I want grouping using both year and cusip simultaneously.

 

I appreciate your help very much!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
proc sql;
create table Rstd as
select cusip, year,std(dailyr) as with_in_std
from rvol
group by cusip, year;
quit;

View solution in original post

1 REPLY 1
Reeza
Super User
proc sql;
create table Rstd as
select cusip, year,std(dailyr) as with_in_std
from rvol
group by cusip, year;
quit;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 712 views
  • 1 like
  • 2 in conversation