Get distribution of data with decimal numbers

G

Guest

I have a query showing e.g. 800 decimal data values in the range from 0 to
50. I
would now like to see the distribution - i.e. how many percent 0-1, how many
percent 1-2, 2-3, 3-4...etc.

Is there an easy way of doing that?

I can run through all my data and count for each value - but I dont want
that if I could just make a query.
 
M

Michel Walsh

Hi,



SELECT -INT(-x), COUNT(*)
FROM myTable
GROUP BY -INT(-x)


assuming "x" are positive, will group by integer value rounded up (with
x=0.1, we get 1 = - INT( - 0.1) )


The GROUP BY clause accepts computed expression, that did the trick.


Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top