BookmarkSubscribeRSS Feed
BrahmanandaRao
Lapis Lazuli | Level 10

how to use Group by function in data step

4 REPLIES 4
PaigeMiller
Diamond | Level 26

There is no such thing as a GROUP BY in a DATA step. A roughly equivalent functionality for data in a SAS data set is PROC SUMMARY.

--
Paige Miller
Reeza
Super User

If you mean BY group processing it depends on what you're trying to do. 

Here's the documentation referencing what BY group processing does in SAS.

https://documentation.sas.com/?docsetId=lrcon&docsetTarget=n138da4gme3zb7n1nifpfhqv7clq.htm&docsetVe...

 


@BrahmanandaRao wrote:

how to use Group by function in data step


 

PaigeMiller
Diamond | Level 26

@Kurt_Bremser wrote:

I guess you want to know what the BY Statement does.


Well, this is what happens when the original poster writes such a brief description that it could mean just about anything, and I interpreted not as a question about BY statement in a DATA step but can the SQL command GROUP BY be used in a DATA step. But, I don't really know. We're all guessing, and that's not good.

 

So, @BrahmanandaRao, please explain what you are talking about, in sufficient detail (and trying to avoid your extreme brevity) that we all know clearly what your question is. In fact, as a general request to you, @BrahmanandaRao, now and in the future, write clear questions that are  detailed enough so that we don't all go in different directions and so that we don't have to ask a lot of follow-up questions.

--
Paige Miller

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
  • 4 replies
  • 1145 views
  • 2 likes
  • 4 in conversation