I have a MySQL table and I am looking to create a stats page on the data.
Id (integer), Pri (integer), blab1, blab2, blab3, ect...
The "pri" field has a number between 0-1000. I would like to how the rows are spread across the pri in the table. I am looking for a way to group the "pri" by 100s and count the number of rows in each group.
For example:
Range | Count
-----------------
0- 99 | 999
100-199 | 50
200-299 | 3587
The easier way would be to run 10 separate queries for each range, (WHERE pri >= 400 AND pri < 500
) but I was wondering if there was a easier way?