There’s a count function that I think you can use for this:
//project count(task not @done) = 0
//@type = project and count(@type = task and not @done) = 0
Looks like I never got around to documenting count
or really mentioning it other then here:
I don’t think I’ve documented it, and I’m not really sure what state “count” is in… but it seems that at some point I implemented it :). Basically it evaluates an item path based on the current path node that’s being check and returns the count of results of that path as a string.