[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1601
  • Last Modified:

ORACLE function corresponding to SAS's MEAN function

Hello,
Can anybody please help me in finding out the function name in ORACLE which gives same result as SAS's MEAN() function.
e.g. In SAS,
       mean(1,2,3,2)=2
       mean(2,.,.,6)=4;

Thanks.
0
sharada
Asked:
sharada
  • 2
  • 2
1 Solution
 
ishandoCommented:
SAS's MEAN is simply the arithmetic mean, or average, of a set of numbers. Oracle's AVG is the corresponding function.
0
 
sharadaAuthor Commented:
Oracle's AVG function will be useful to me if I need to find out the MEAN or average of a column.

But I have following statement in SAS
x=mean(a,b,c)
If I need to convert this statement to Oracle, should I write
x=(a+b+c)/3
??
0
 
ishandoCommented:
Yes, if you are dealing with a list of values that would be the easiest way to do it.
0
 
sharadaAuthor Commented:
Yes, I tried this yesterday and it worked.. thanks
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now