Queries with custom attributes

There is a way to build queries with custom model attributes?
I have total active points in a private attribute that I retrieve with Transaction table and I don’t have this value in db.
I am trying to get all elements with a minimum of N points. Can I use a custom public method to retrieve this number? Thank you

Not sure what defines the “total active points” for you but is it something like this you are looking for?

Unless you explain with examples, your explanations aren’t helpful