How to filter result after groupby

result(func: type(Person)) @groupby(age){

i want to filter count(age) > 5

Impossible to know exactly what’s going on without more information. But usually this sort of multiple filtering and aggregation operations requires blocks. I refer you to Dgraph’s tour of DQL, which covers this sort of operation: Query Variables | Blocksvars | Dgraph Tour