Project(Extend(Extend(AggregationJoin(Aggregation(??agg1: ?s, SAMPLE, {}, G1=Group((?s), BGP( ?s ?p ?o))), Aggregation(??agg2: avg(?o) , MAX, {}, G1)), ?s, ??agg1), ?maxAvg, ??agg2), {?s, ?maxAvg})