Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculating different sorts of averages

Status
Not open for further replies.

Welshbird

IS-IT--Management
Jul 14, 2000
7,378
DE
Hi y'all.

I'm trying to calculate the three different sorts of average, and I can see

AVG as mean
MEDIAN as median,

But I can't seem to pick a function which would find me the MODE. I guess I can build one with out too much trouble, but it strikes me that if Oracle includes the other two, it presumably includes the one calculated as the most frequently occuring answer?

Any ideas anyone?
Thanks

Fee

The question should be [red]Is it worth trying to do?[/red] not [blue] Can it be done?[/blue]
 
Fee,

I agree, there appears to be no such function within Oracle.

A perusal of the SQL reference
shows that there is indeed a MOD and MEDIAN function, but no mode.

I have googled, and the word "mode" swamps the returns with irrelevancies. I suggest that you write your own mode function, and let us know what you come up with. A nice interesting one Fee - how does one prove a negative?

Regards

Tharg

Grinding away at things Oracular
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top