BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mmhxc5
Quartz | Level 8

Hi all,

Hope you all are doing great and stay safe during the pandemic. I would like to combine several "Select" statements where I calculate the average of the variables under one "Proc SQL". Below is the code I use and it works, but I use this code for each variable separately and producing unnecessary files. I want to get the average of other variables like length, age, ... for the same ID under this code. I appreciate your time and help.

1 ACCEPTED SOLUTION
2 REPLIES 2
Reeza
Super User
PROC MEANS is almost always a better option once you're looking at multiple variables, statistics and at different levels.
FYI - your SQL code was not included.

sas-innovate-white.png

🚨 Early Bird Rate Extended!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Lock in the best rate now before the price increases on April 1.

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1073 views
  • 1 like
  • 3 in conversation