About removing sub-tasks, I think that is not possible with simple dataview queries (I don’t know if there’s a way with dataviewjs).
But that is possible if you use a workaround via css, i.e., creating a css snippet to hide subtasks in dataview results.
In the pages where you want to hide subtasks, create a cssclass in yaml frontmatter. For example:
---
cssclass: no-subtasks
---
Then, create a css snippet with this code:
.markdown-preview-view.no-subtasks .dataview.result-group ul.contains-task-list ul {
display: none;
}
I didn’t try exhaustly this snippet, so I don’t know if there is any conflict with others elements…