How to sum numbers of attribute Core Data

Hello. Im only started learning Core Data and have problem with sum numbers of attribute. I playing with application like ToDoIst and want release function sum attribute numbers. I don't find information of this and don't know how to do. I try to do with 'reduce' of array and find old project for swift 3 but don't working this. Maybe someone tell me where to find information about this?