SQL: How to see if a file is checked out?

I tried

WHERE Documents.LockDate IS NOT NULL

but that returned a lot of files that are not checked out to me, and some files and even folders (projects) that don't exist.

Obviously I'm looking at it the wrong way

SolidworksApi macros