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