title: How to group columns in sql table for counting
body: <p>I'm not sure if there's an easy concept or pattern to do this, so I'll just have to describe it.</p>
  
  <p>Let's say I have a table like this:</p>
  
  <pre><code>CallID (uniqueidentifier)
  CallDateTime (datetime)
  CallIssue (varchar(100))
  Pollution (bit)
  Violation (bit)
  Accident (bit)
  General (bit)
  </code></pre>
  
  <p>And I want to get counts on a report. For 30 different calls the counts would look like this:</p>
  
  <pre><code>Pollution: 4
  Violation: 3
  Accident: 2
  General: 7
  Pollution &amp; Violation: 5
  Pollution &amp; Accident: 9
  </code></pre>
  
  <p>What would be happening is that if a call had both Pollution and Violation set they would be counted separately than calls having only Pollution or Violation.</p>
  
  <p>Is there a way, other than a cursor, that I could do this?</p>
  
  <p>We're using SQL 2005.</p>