select host from com.soffid.iam.am.model.HostEntity as host where host.ip=:ip and host.tenant.id=:tenantId and host.deleted=false order by host.lastSeen desc
select host from com.soffid.iam.am.model.SessionEntity as session left join session.host host where host.ip = :ip and session.user.id=:userId and not (host.deleted is true)