Query 1 below finds all uncompleted tasks in my vault and sorts them by due date.
Query 2 is the same query but with the tasks grouped by their file name. In this query, sorting by due date doesn’t work, even if the files containing the tasks only have one task each.
Possible to sort by due date when grouped in this way?
# Query 1
```dataview
TASK
FROM
""
AND
-#excludefromtodoqueries
WHERE
!completed
SORT
due
ASC
```
# Query 2
```dataview
TASK
FROM
""
AND
-#excludefromtodoqueries
WHERE
!completed
GROUP BY
link(file.name)
SORT
due
ASC
```
With thanks for any pointers or solutions … I have tried countless permutations.