Project(Extend(Extend(AggregationJoin(Aggregation(??agg1: ?p, SAMPLE, {}, G1=Group((?p), BGP( ?s . ?s ?p ?o . ?o ))), Aggregation(??agg2: ?p, COUNT, {}, G1)), ?p, ??agg1), ?count, ??agg2), {?p, ?count})