FitTrackee
FitTrackee copied to clipboard
Sum for sports that use same activites
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)