Have tried using API, but
$result = civicrm_api3('Contact', 'get', array(
'return' => "id",
'contact_sub_type' => array('!=' => "Parent"),
));
gives zero results, while Search builder gives results using this query:
Contact Subtype Not Like Parent ...AND...
Contact Type = 'Individual'
API calls also give zero results count if
'organization_name' => array('IS NOT NULL' => 1),
and
'current_employer' => array('IS NOT NULL' => 1),
being used, although we know such records exist. Moreover, theree are records, where "Current employer' field is empty, which yet have Relationships.
In theory, it might be possible to compare two arrays (all existent Relationships wjere Contact A is an Individual and all existent Individuals), but it might be tricky a bit at current number of records in both arrays (around 100K in each). So, any reliable way to find Individual Contacts with no Relationships, nor Employers?