I’m planning to do something similar and still haven’t figured out an ideal way to do this – @Gower’s solution doesn’t have a clear way to deal with ties, for example (the stats listed first will ‘win’ ties unless you write code to check for it). You might find the other suggestions on this other thread helpful: