Hippo Node for Referenced Document in an Asset

Hi,

I have a requirement, where we have to check all the assets in gallery folder which are not referenced in any document. So we thought of creating a JCRQuery for the same. But couldn’t find any property/ node which specifies that any document is referenced or not in that particular asset on either console/ yaml.
Can anyone please help or guide on the same.
Thanks in advance.