SQLite Query on Darktable Database

Hi. I am trying to create a query on SQLite3 to query the Darktable 3.4.1 database. I want to get a list of photos that are not tagged. I am using Ubuntu 20.04.
Is there a filter setting in Darktable I am missing to get a list of untagged photos.

There’s a LUA script called select_untagged that adds an option in the select module in the lighttable section.

Thanks Jade. Worked well.