Complex query like max() to use in enrichment

let 'say that I have a Node CI which can be linked to one or many BusinessApp Ci and we want the server to take the higher SLA from the BA

SLA being an attribute of SERVER and BA


is it  possible with the enrichment rules ?

 and if not

 I would like to have a report which indicate  the BA linked to a server which have a SLA higher or at least not equal ?


How to do so ? I will know to do it in a  direct SQL but not with TQL ?


Thanks for your help !