Hi Abhilash,
To give more clarity, my first group is Transaction and second group is type. In my second group need to find minimum date for value 'aaa' and compare with rest of my first group dates. If any date is less than this date then amount should be zero.
Thanks,
Sastry