t.package_type = 'apm_application' exists (select 1 from apm_package_owners o where o.version_id = v.version_id and owner_uri='mailto:$my_email')