title: oracle sql query question(grouping by 2 columns)
body: <p>I have a table called <code>testgroup</code> in my database, which is like following:</p>
  
  <pre><code>I                      J                      
  ---------------------- ---------------------- 
  1                      a                      
  1                      a                      
  2                      a 
  1                      b                      
  1                      c                      
  2                      b      
  3                      d    
  2                      b 
  2                      b
  3                      d        
  </code></pre>
  
  <p>Now, I want the result as below:     </p>
  
  <pre><code>I                      J                      COUNT(J) in I 
  ---------------------- ---------------------- ----------------------
  1                      a                      2                    
  2                      a                      1
  1                      b                      1
  1                      c                      1
  2                      b                      3    
  3                      d                      2            
  </code></pre>
  
  <p>...where <code>count(j) in I</code> is the number of each J related to the I.<br>
  For example: with <code>I = 1</code>, there are 2 <code>a</code> in column J, so the third column would be equal 2.</p>