how to use aggregate funnction in store processor