Returns the sum of all the samples that match the query.
- iOS 8.0+
- Mac Catalyst 13.0+
- watchOS 2.0+
cumulative option was set, this method returns a quantity object containing the sum of all the samples matching the query; otherwise, it returns