Monday, March 26, 2012

Modal Average

Hi!
Does anyone know how to compute a 'mode' average instead of the 'mean'
average that the aggregate function 'AVG' returns? Is there another
function, or some kind of parameter for the AVG function?
Thanks,
CraigThere are no othe average functions, but can you explain in more detail what
you want... The mode of a list of values is the value which occurs most
frequently... and I don't understand "mode average".
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"CraigyBoop" <CraigyBoop@.discussions.microsoft.com> wrote in message
news:9896A30B-F1B3-44BB-8BDA-7CAB98EE3487@.microsoft.com...
> Hi!
> Does anyone know how to compute a 'mode' average instead of the 'mean'
> average that the aggregate function 'AVG' returns? Is there another
> function, or some kind of parameter for the AVG function?
> Thanks,
> Craig|||Wayne,
Thanks for replying!
From what I can make out, the AVG function returns the 'mean' average (that
is, add up all the values in a set of numbers, then divide the total by the
'number' of numbers in the set). I want to return the 'modal' average.
Your definition of 'mode' is precisely what I'm looking for, so I was hoping
there was a function that would return the average in this manner.
Any suggestions?
"Wayne Snyder" wrote:
> There are no othe average functions, but can you explain in more detail what
> you want... The mode of a list of values is the value which occurs most
> frequently... and I don't understand "mode average".
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "CraigyBoop" <CraigyBoop@.discussions.microsoft.com> wrote in message
> news:9896A30B-F1B3-44BB-8BDA-7CAB98EE3487@.microsoft.com...
> > Hi!
> >
> > Does anyone know how to compute a 'mode' average instead of the 'mean'
> > average that the aggregate function 'AVG' returns? Is there another
> > function, or some kind of parameter for the AVG function?
> >
> > Thanks,
> >
> > Craig
>
>

No comments:

Post a Comment