Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Binning data

Re: Binning data

From: James Sims <sims5311_at_students.sou.edu>
Date: Mon, 26 Apr 1999 15:33:55 -0700
Message-ID: <3724E9D3.D8924EE8@students.sou.edu>


SELECT COUNT(*) FROM <table_name> WHERE <column_name> >= 50 AND <column_name> <=100 ??? for each range, or is this what you're trying to avoid?

James Petts wrote:

> Hi
>
> I have a series of real numbers, and I want to bin the data by ranges,
> and get a count of the number of values in each bin. The values range
> from 75.1 to 1200.4, and I want to bin them in steps of fifty. Thus, I
> want to count all values between 50.0001 and 100.0000, between
> 100.0001 and 150.0000, etc., all the way up to the range from
> 1200.0001 to 1250.0000.
>
> Can anybody suggest an easy way to do this in SQL or do I need to
> resort to PL/SQL?
>
> James Petts
Received on Mon Apr 26 1999 - 17:33:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US