Trying to get max in dataview

What I’m trying to do

I have a folder called ‘lifts’ that that contains files that look like

---
date_of_workout: 2023-09-02
exercise: 'Bench'
weight: '275'
sets: '3'
reps: '3'
---
---
date_of_workout: 2023-09-03
exercise: 'OHP'
weight: '165'
sets: '6'
reps: '3'
---

I want a table that shows the heaviest lift for each exercise.

What I tried

TABLE exercise, weight
FROM "workouts"
SORT weight DESC
GROUP BY exercise

but leaves the weight column empty.

Whenever you do GROUP BY the individual fields gets gathered in the rows list. So to get the max out of weight, you’ll then need to do max(rows.weight).

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.