How to calculate UNN aggregate