8.5.2.6 Joins

SELECT nt:file.jcr:path, jcr:lockOwner
FROM nt:file, mix:lockable
WHERE jcr:lockOwner = 'John'
AND mynt:file.jcr:path=mix:lockable.jcr:path

Additional join support, on other columns and with other tables, is optional.