extract time filter function
use time filter in active_people
total events query
past n months query