title: How to get distinct combination of groups
body: <p>I have a table like</p>
  
  <pre><code>name_id     disease_id   
  -------     ----------    
  1           1    
  1           2    
  2           2    
  3           1    
  3           3    
  4           1    
  4           2    
  5           2    
  </code></pre>
  
  <p>I need to find the distinct combination of disease_id across the entire table. I can't group by name_id because that would yield non distinct combinations (see name_id 1 and 4).  I can't omit GROUP BY that would yield a simple list of disease_id across all name_id.</p>
  
  <p>What I want to be able to answer is a question like: What are the distinct combinations of childhood diseases that occurred within a population (and later on perhaps adding a count:</p>
  
  <pre><code>Chickenpox          (10)
  Chickenpox+Measles  (2)
  Measles             (5)
  Measles+Mumps       (1)
  etc.
  </code></pre>