     views = if hasViews
       dayRangeQuery model, {
         shouldStream
-        fromDay
-        toDay
+        days
         query:
           select: 'count(distinct(userId))'
           from: 'view'

      toDay = util.dateToDay(new Date()) + 1
      fromDay = toDay - 1

    numerator = dayRangeQuery model, {
      shouldStream
      fromDay
      toDay
      query:
        select: metric.numerator.select
        from: metric.numerator.from


    "#{result} AND #{where}"

dayRangeQuery = (model, {query, days, shouldStream}) ->
  join = if shouldStream then util.streamJoin else util.forkJoin
  join _.map(days, (day) ->
    model.event.query _.defaults {
