Greetings, Stack!
I need to select the number of values grouped by ranges.
To illustrate, suppose I have the following values in a columm table: 1,2,4,5,6,8,9,11,13,16
Then, I want to retreave their number in ranges of 5, like this:
From 0 to 4 there is 3 values (1,2,4) From 5 to 9 there is 4 values (5,6,8,9) From 10 to 14 there is 2 values (11,13) From 15 to 19 there is 1 values (16)
Etc...
How to do this in a request?
sql mysql
Nemostein
source share