title: i do a case when section with group by, after i want a count
body: <p>I do the next query: </p>
  
  <pre><code> select case when anum like '0%' then 0 else 1 end anum ,
      ,voucher
      , date 
   from ledger
   group by voucher, date, case when accountnum like '0%' then 0 else 1 end
   order by voucher
  </code></pre>
  
  <p>After that i need a count on anum in one query. </p>
  
  <p>The answer here:
  I do the query what i wrote above. Then I get the following result: </p>
  
  <pre><code>anum  voucher   date
  1     1         2012-09-30
  29    1         2012-09-30
  2     101       2012-11-01
  2     1131_3    2012-01-01
  4     1131_11   2012-05-22
  4     1131_11   2012-05-22
  </code></pre>
  
  <p>But i want to see this: </p>
  
  <pre><code>anum  voucher   transdate
  2     1         2012-09-30
  1     101       2012-11-01
  1     1131_3    2012-01-01
  2     1131_11   2012-05-22
  </code></pre>