SQL query won't work

Hey, i try to convert this query:

SELECT DISTINCT *
FROM elgg_entities e
JOIN elgg_entity_relationships r ON e.guid = r.guid_one
WHERE e.type = 'group' AND NOT
EXISTS ( SELECT * FROM elgg_entity_relationships s
WHERE e.guid = s.guid_two AND s.relationship = 'subgroup')

into Elgg. What i should recieve are groups which are in no children relationship to another group. This is my first try:

$options = array(
                'type' => 'group',
                'joins' => array("JOIN elgg_entity_relationships r ON e.guid = r.guid_one"),
                'WHERE' => array("e.type='group' AND not exists (SELECT e.guid
                FROM elgg_entity_relationships s
                WHERE e.guid = s.guid_two
                AND s.relationship = 'subgroup'
                )"),
                'limit' => $limit,
                'full_view' => FALSE,
            );
            $content = elgg_list_entities($options);

But it looks like the 'Where' part doesn't work. Some ideas?