Help needed with summary query

Hi guys,

I’m looking for the number of users who have signed up for notifications at different intervals, e.g. how many have signed up to be notified immediately, once an hour, once a day …

My notifications table has a user id (uid) column and a send_interval column.

mysql> select distinct send_interval from notifications;
±--------------+
| send_interval |
±--------------+
| 86400 |
| 3600 |
| 0 |
| 43200 |
| 604800 |
±--------------+
5 rows in set (0.19 sec)

Any help you could offer would be greatly appreciated.

Kevin


SELECT
   send_interval 
 , COUNT(uid)
FROM
   notifications
GROUP BY
   time_interval

Man you guys make this look easy!

Thanks, I’ll take that as a compliment :smiley: