Java Mailing List Archive

http://www.dba.5341.com/

Home » Home (12/2007) » oracle l »

Re: Histogram Procedure/Function

Wolfgang Breitling

2006-03-10

Replies:

Ethan,

not sure if it will server your purpose, but check out the ntile() analytic
function.

Quoting Ethan Post <post.ethan@(protected)>:

> I am looking for the easiest way to take a select and transform into some
> sort of histogram...
>
> select numeric_value from table_name;
>
> should come back as
>
> range         total
> 1-10           30
> 11-20         100
> ...
>
--
regards

Wolfgang Breitling
Oracle 7,8,8i,9i OCP DBA
Centrex Consulting Corporation
www.centrexcc.com

--
http://www.freelists.org/webpage/oracle-l


©2008 dba.5341.com - Jax Systems, LLC, U.S.A.