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