How can I make a view showing all users who have not created any nodes or made comments?
Before some days I was also work on some thing like this. In my registration page there is a field named looking-for. I was created a view to show all the members as per there looking-for field. It mean that if user selected male in looking for then only male is shown. I have added below code in the view. You can change condition as per your condition &amp; add relationship &amp; filter criteria.

global $user;
  $profiles = profile2_load_by_user($user);
    foreach ($profiles as $profile) {
        if ($items = field_get_items('profile2', $profile, 'field_sex')) {
        break;
      }
    }
    $i_am=$items[0]['value'];
 if($i_am=='sdmale' || $i_am=='sbmale'){

  $looking='smfemale+sbfemale';

}

if($i_am=='smfemale' || $i_am=='sbfemale'){

  $looking='sdmale+sbmale';

}

   return $looking;