Core Data is a beautifully designed object mapping and persistence framework -- big kudos to the Apple engineers.
I am using the max: function in this example. There are other functions that are supported by NSExpression:
These are not all of the predefined functions, but some of the most commonly used ones. You can read more about the expressionForFunction:arguments: method, the predefined functions, and the arguments that are necessary for each function. In my example, we are using the max: function, which only takes a single argument, the expression containing the key path.