Hi @paoloap, thanks for posting.
There is a syntax error in your query – commas aren’t allowed after the last item before FROM.
But maybe we could start with how your data is defined. It would be helpful if you could post some examples of your source data. I can see that your query is expecting a “minutes” field, but I’m not sure how you’re using it your journal pages.
For this post, I’m going to make an assumption that each of your journal pages you have a single minutes field in the YAML:
minutes: 10
or perhaps in the body text:
minutes:: 10
If that’s the case, then a query like this would give you the count, total, average, min, and max for these fields:
```dataview
TABLE WITHOUT ID Count, Total, Average, Minimum, Maximum
FROM "Inbox"
WHERE minutes
GROUP BY ""
FLATTEN length(rows.minutes) as Count
FLATTEN sum(rows.minutes) as Total
FLATTEN Total / Count as Average
FLATTEN min(rows.minutes) as Minimum
FLATTEN max(rows.minutes) as Maximum
```
(Of course, you should replace the FROM "Inbox"
and WHERE minutes
with clauses that make sense for your vault.)
Here’s what that looks like in my test folder: