Answers.Body: <p>The best solution would be to use search builder like so:</p>
  
  <p><img src="https://i.sstatic.net/1sWo7.png" alt="enter image description here"></p>
  
  <p>However as Laryn noted there was a bug preventing this from working. I've <a href="https://issues.civicrm.org/jira/browse/CRM-16483" rel="noreferrer">filed an issue for this</a>, and worked up a fix that hopefully will make it into the next release.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-10T01:35:32.493Z
Answers.LastActivityDate: 2015-05-10T01:35:32.493Z
Answers.UserDisplayName: Coleman
Answers.Body: <p>This is a workaround, but it will get what you need with minimal effort. Use the Import Contacts feature. On the first screen, choose Update. Instead of a CSV file as the source, use the SQL query option like so:</p>
  
  <pre><code>SELECT
      c.ID AS InternalContactID
  FROM
      c9.civicrm_contact c
  WHERE
      c.contact_type = 'Individual'
      AND NOT EXISTS (
          SELECT 1 FROM
          c9.civicrm_group_contact c2
          WHERE c2.contact_id = c.id)
      AND NOT EXISTS ( -- don't forget to check smart groups
          SELECT 1 FROM
          c9.civicrm_group_contact_cache c3
          WHERE c3.contact_id = c.id);
  </code></pre>
  
  <p>Map the field if it isn't already, and continue to the next screen. Here, you can add the contacts to a group or assign a tag. Click Import Now and you have a "No Group" group that your users can work with.</p>
  
  <p>This technique with Import gives us a full-featured Search Builder for the SQL-savvy.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-09T17:54:41.773Z
Answers.Text: Nice, I think I'm going to wrap your query into a custom search. and double nice for adding the smart group cache.
Answers.UserDisplayName: Xavier
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-09T18:31:28.887Z
Answers.Text: I've found it a name for the extension, the hardest is done https://github.com/TechToThePeople/lonesome
Answers.UserDisplayName: Xavier
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-09T20:22:06.923Z
Answers.Text: @Xavier in addition to leaving nice comments, please *upvote* good posts and *accept* correct answers to your questions. This is super-important for building the site. [Vote early, vote often](http://meta.civicrm.stackexchange.com/questions/76)!
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-09T16:19:58.450Z
Answers.LastActivityDate: 2015-05-09T16:19:58.450Z
Answers.UserDisplayName: Nicholai
Answers.Body: <p>The easiest is probably to install the extension I just created, thanks to Nicholai magic sql suggestion:</p>
  
  <p><a href="https://civicrm.org/extensions/lonesome-find-contacts-without-group" rel="nofollow">https://civicrm.org/extensions/lonesome-find-contacts-without-group</a></p>
  
  <p>Otherwise, the clunkier way I found is to use the custom search exclude/include and select every group in the exclude fields.</p>
  
  <p>It works, with two issues still
  - it does include organisations (that are often without a group)
  - it's a bit of a pita to select all groups when you have more than a handful</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-08T14:51:32.453Z
Answers.Text: Can you create a smart group on the Contact Type = "Individual" and use that in the "Include" section?
Answers.UserDisplayName: Laryn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-08T15:00:46.603Z
Answers.Text: good idea, but getting clunkier by the minute ;)
Answers.UserDisplayName: Xavier
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-08T16:21:37.277Z
Answers.Text: True. :) I was going to suggest a nice clean Search Builder with "Contact - Group(s) - IS EMPTY (or IS NULL)" but that throws a WSOD...
Answers.UserDisplayName: Laryn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-08T14:44:21.810Z
Answers.LastActivityDate: 2015-05-10T19:13:53.303Z
Answers.LastEditDate: 2015-05-10T19:13:53.303Z
Answers.UserDisplayName: Xavier
Body: <p>I want to do some spring cleanup and see who in my individual contacts aren't in any group, is there an easy way to do it?</p>
  
Tags: <search><custom-search>
Title: How to find contacts with no group?
ThreadText: # How to find contacts with no group?
  
  (Asked by: username_0 on 2015-05-08)
  
  I want to do some spring cleanup and see who in my individual contacts aren't in any group, is there an easy way to do it?
  
  **Tags:** search, custom-search
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_0 on 2015-05-08. Score: 4 | Accepted answer
  
  The easiest is probably to install the extension I just created, thanks to username_2 magic sql suggestion:
  
  <https://civicrm.org/extensions/lonesome-find-contacts-without-group>
  
  Otherwise, the clunkier way I found is to use the custom search exclude/include and select every group in the exclude fields.
  
  It works, with two issues still
  - it does include organisations (that are often without a group)
  - it's a bit of a pita to select all groups when you have more than a handful
  
  > **Comments:**
  > **username_3**: Can you create a smart group on the Contact Type = "Individual" and use that in the "Include" section?  
  > **username_0**: good idea, but getting clunkier by the minute ;)  
  > **username_3**: True. :) I was going to suggest a nice clean Search Builder with "Contact - Group(s) - IS EMPTY (or IS NULL)" but that throws a WSOD...  
  
  ---
  
  ### Answer by username_1 on 2015-05-10. Score: 9
  
  The best solution would be to use search builder like so:
  
  ![enter image description here](https://i.sstatic.net/1sWo7.png)
  
  However as username_3 noted there was a bug preventing this from working. I've [filed an issue for this](https://issues.civicrm.org/jira/browse/CRM-16483), and worked up a fix that hopefully will make it into the next release.
  
  
  ---
  
  ### Answer by username_2 on 2015-05-09. Score: 5
  
  This is a workaround, but it will get what you need with minimal effort. Use the Import Contacts feature. On the first screen, choose Update. Instead of a CSV file as the source, use the SQL query option like so:
  SELECT
      c.ID AS InternalContactID
  FROM
      c9.civicrm_contact c
  WHERE
      c.contact_type = 'Individual'
      AND NOT EXISTS (
          SELECT 1 FROM
          c9.civicrm_group_contact c2
          WHERE c2.contact_id = c.id)
      AND NOT EXISTS ( -- don't forget to check smart groups
          SELECT 1 FROM
          c9.civicrm_group_contact_cache c3
          WHERE c3.contact_id = c.id);
  
  Map the field if it isn't already, and continue to the next screen. Here, you can add the contacts to a group or assign a tag. Click Import Now and you have a "No Group" group that your users can work with.
  This technique with Import gives us a full-featured Search Builder for the SQL-savvy.
  
  > **Comments:**
  > **username_0**: Nice, I think I'm going to wrap your query into a custom search. and double nice for adding the smart group cache.  
  > **username_0**: I've found it a name for the extension, the hardest is done https://github.com/TechToThePeople/lonesome  
  > **username_1**: @username_0 in addition to leaving nice comments, please *upvote* good posts and *accept* correct answers to your questions. This is super-important for building the site. [Vote early, vote often](http://meta.civicrm.stackexchange.com/questions/76)!  
  
  ---
  
  