René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

Aggregate functions in Oracle

Oracle 9i has the following aggregate functions for SQL Queries:
  • avg
  • corr
  • count
  • covar_pop
  • covar_samp
  • cume_dist
  • dense_rank
  • first
  • group_id
  • grouping
  • grouping_id
  • last
  • max
  • min
  • percentile_cont
  • percentile_disc
  • percent_rank
  • rank
  • regr_ (linear regression) functions
  • stddev
  • stddev_pop
  • stddev_samp
  • sum
  • var_pop
  • var_samp
  • variance
10g additionaly has:
  • collect
    See here for an example.
  • median
  • stats_binomial_test
  • stats_crosstab
  • stats_f_test
  • stats_ks_test
  • stats_mode
  • stats_mw_test
  • stats_one_way_anova
  • stats_t_test_*
  • stats_wsr_test
Aggregate functions are mostly used in conjunction with a group by in order to be useful.

User defined aggregate functions

In Oracle, it's possible to create user defined aggregate functions. See User defined aggregate functions in 9i and On the collect aggreage function.