The question arose sample of quanta values. The situation is:
There is a table payment (payments):
id_user[int]
sum [int]
date[date]
sum (amount) can be on any from 0 to 100,000 for example.
I need to group the data output by the sum of the quantum of 50 coins.
For example:
0- 49 coins - paid 14 people.
50-99 coins - 59 users
100-150 - 147, etc.
to the end (to 100,000)
In another way, I can not formulate the task.
I need to establish SQL-query (or if use php)
If I understood your problem correctly, you want something like this: