FitTrackee icon indicating copy to clipboard operation
FitTrackee copied to clipboard

Sum for sports that use same activites

Open DavidHenryThoreau opened this issue 1 year ago • 0 comments

It would be nice to sum same sports stats I mean bike in the workouts there's sport_id (1,2,4)

fittrackee=# select SUM(distance) AS Distance_in_bikes from workouts where sport_id IN (1,2,4);
 distance_in_bikes
-------------------
         10220.612
(1 ligne)

Same for run

fittrackee=# select SUM(distance) AS Distance_in_runs from workouts where sport_id IN (5,8);
 distance_in_runs
------------------
         4372.734
(1 ligne)

DavidHenryThoreau avatar Jan 30 '24 07:01 DavidHenryThoreau