Aggregate on fields and get distinct documents

This is brilliant, many thanks!