If they have no thumbnail record, they don't exist in the database and there'd be nothing for an SQL-query to find.
What you can do though is set TP to display all files, and to show thumbnails last so that all non-thumbnailed files (red X icon) are shown first in the thumbnail list. Select them and press Shift-Alt-C to copy their filenames to the clipboard. Depending on your settings, the list may not include Hidden and System files and files in subfolders.