I have a dataset with 2 columns PSR,TASK_TYPE. Here PSR is unique numbers. But there are many task types which can be repeated. Now I have applied a group by using aggregate operator. Now I want compare the PSR's among the task types, I don't want same PSR to be in all the task types. I just need that PSR be only in task type but not in all.
For example: If I have got a dataset as mentioned below.
PSR Task_Type
123 new
123 new
123 old
123 process
123 process
456 process
After applying group by result is
PSR Task_Type
123 new
123 old
123 process
456 process
Now I need a logic like if PSR is present in old, new, process flag should show as new record which is trans only. If a PSR is present in only process task_type then flag it as service with the same task_type (process).
End result should be like:
PSR Task_Type Flag
123 new trans
456 process service