Help with Maintenance Queries: Alphabetical Page List and Untagged Pages Filter

I’m currently working on some maintenance views in SilverBullet (v2) to keep my space organized. I’m using the Lua-based index.tag queries, but I’m struggling with two specific views.

1. Comprehensive Page List (Alphabetical with Tags)
I want to generate an alphabetical list of all pages (as clickable links) followed by their tags. I want to exclude internal system pages (like CONFIG, #meta, #meta/…)
My current approach is showing CONFIG and meta/ pages despite the where clause:

${template.each(
query[[ 
from p = index.tag "page" 
where not p.name:match("^meta") and p.parent != "builtin"
select{ name = p.name, modified = p.lastModified, tags = p.tags } 
]], 
template.new[==[ * [[${name}]] ${tags and #tags >0 and "#" .. table.concat(tags," #") or ""} 
]==] 
)}

2. List of Untagged Pages
Additionally, I would like to create a second list that only shows pages which have no content tags (meaning: they only have the default #page tag and possibly some #meta/… tags, but nothing else).

If anyone has a hint on how to robustly filter for “absence of specific tags” in this Lua context, I would be very grateful!

Thanks in advance for your help!