1) In human-readable format:
----------------------------
tn.idthumb not in (
select distinct idthumb
from thumbnailkeyword
where thumbnailkeyword.idkeyword = (
select idkeyword
from keyword
where keyword = 'dog'
)
)
2) As a single long line, which should remain intact in the 'Found Files' results list, so that the query can be re-used later on:
----------------------------------------------------------------------
tn.idthumb not in (select distinct idthumb from thumbnailkeyword where
thumbnailkeyword.idkeyword = (select idkeyword from keyword where
keyword = 'dog'))