I have many database entries, each containing a value.
I want to show some statistics regarding those values, so I should be able to say:
- how many entries (rows) have the value between 0 and 5,
- how many entries (rows) have the value between 6 and 10,
- how many entries (rows) have the value between 11 and 20,
- how many entries (rows) have the value more then 20.
(the values above where given only as an example)
Let's say I'll have like 6-7 intervals that I want to group the values by. Can I do this in a single MySQL query? If yes, how can I acces the grouped values using photoshop PHP aftewards?
Thanks!
EDIT:
Seems like the query is actually harder. I have 2 columns (val1 and val2). I want the query to count how many items have val1/val2 (val1 divided by val2) between an interval...