Well, I don’t have all the answers for you. But I can try clarify some.
About the way to organize the results of a query, I think that’s impossible.
I don’t use (and ignore) the Obsidian Query Language plugin. But I think you try to apply some ‘rules’ from OQL in Dataview and that doesn’t work!
As I said before, dataview only works with markdown files. Dataview doesn’t parse any (meta)data from other file types (you can’t target any value from these files).
On other side, when I said that you apply some usage expressions from oql, I’m thinking in this:
WHERE contains(file.outlinks, ".png") = true
The string “xxx” needs to be a value, not a part of that value! And if you target a link you need to write a link. (and remove = true). Example of right expression:
WHERE contains(file.outlinks, [[image.png]])