@Override
    public void accept(final MeterEntity entity, final Long value) {
        decorate(entity);
        this.entityId = entity.id();
        this.serviceId = entity.serviceId();
        this.summation += value;
        this.count += 1;
    }
Service ID is required for sort query.
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/meter/function/avg/AvgFunction.java