If the uniqueIDs are only unique per src/dest, and since you are only calculating your stats on the totalExecTime, which only occurs when the session end. I recommend:
source=xxxxxxx "com.pqr.MyOwnClass" (taskbegin OR taskEnd)
| stats sum(totalExecMin) as sumTotalExecMin, avg(totalExecMin) as avgTotalExecMin, values(src) as src, values(dst) as dst, by uniqueID
| stats count avg(avgTotalExecMin) sum(sumTotalExecMin) by src dest
| eval sumTotalExecMin=round(sumTotalExecTime/60000,1), avgTotalExecMin=round(avgTotalExecMin/60000,1)
This will calculate the sum and avg for all sessions tied to a uniqueID.
You then aggregate those based on the src and dst.
... View more