Assuming this DAM path:
[img]tagsInDam.png[/img]
This would not be a one shot query to get this information. You need to use JCR SQL and some Java app logic to achieve this.
First - you would select all DAM Assets in a given path.
Then for each dam asset - pass it to another method to query the metadata node (of type nt:unstructured):
<DAM ASSET>/jcr:content/metadata
Once you have the metadata node - you can check to see if that node has a cq:tags prop of type String[].
If so - place the DAM asset name into a collection. For those that do not - then place the DAM asset into another collection. Once you have gone through all DAM assets - the answer you are seeking is in the both collections.
Hope this helps you.