How to groupby multiple fields using the Java MongoDB driver?

I am using mongodb-driver-sync:4.4.1 driver. I want to do a grouping with multiple fields and I want to it to be done using only the new Aggregates Builders. The other answers on this site use BasicDBObject or Document but I don’t want that.

1 Like

Didd you find an answer to the question above??