Detecting trends with aggregations