|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I would like to count the number of entries that are in a certain proportion interval. Something like: select count(*), proportion from t where (t.a/(t.a+t.b)) as proportion group by proportion but so that I get it in intervals like (0-0.1), ]0.1-0.2), ... and so on up to ]0.9-1) any ideas? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
avilella wrote:
> Hi, > > I would like to count the number of entries that are in a certain > proportion interval. Something like: > > select count(*), proportion > from t where > (t.a/(t.a+t.b)) as proportion > group by proportion > > but so that I get it in intervals like (0-0.1), ]0.1-0.2), ... and so > on up to ]0.9-1) > > any ideas? GROUP BY INTERVAL(proportion,0.1,0.2,....) |
|
![]() |
| Outils de la discussion | |
|
|