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