Suppose you have a table like:

```
CREATE TABLE `checkins` (
  `id` bigint(20) NOT NULL default '0',
  `userid` bigint(20) default NULL,
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id`),
  KEY `ind_userid` (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8

```

Based on a date range, how can I tell how many users were active 3-5 days a week.

Something like

```
input - two months date range
output - 310 users were active 3-5 days a week

```