fixed query in getAllTimeSiteAggregate