Allowed replacement using aggregate result