class WcoEmail::Context

def self.summary

def self.summary
  pipeline = [
    { '$group' => {
      '_id' => { '$dateToString' => { 'format' => "%Y-%m-%d", 'date' => "$sent_at", 'timezone' => 'America/Chicago' } }, 'total' => { '$sum' => 1 }
    } },
    { '$sort' => { '_id': -1 } },
  ]
  outs = WcoEmail::Context.collection.aggregate( pipeline )
  outs.to_a
end