Hi all
Table I'm trying to get analytical result from is voice calls record. Each call (one row) has duration in seconds (just int value, not datetime). I'm trying to get number of records grouped by 15 seconds spans like this:
+-------------------+
|Period | Count |
+-------------------+
| 0-15 | 213421 |
|15-30 | 231123 |
|30-45 | 1234 |
+-------------------+
Starts of period is 0, end is 86400.
I've tried some combinations with setting variables for start and end and then incrementing them by 15, but i'm not very successful, and i can't understand what is going wrong.
Please help out. Thank you!