I have a running app, which tracks distance and measures heart rate. Those samples are saved along with the workout into HealthKit (on iOS 9).
Is there a way, a query of some sort, to ran and get calculated ActiveEnergy spent during the given workout?