title: Counting the number of each unique value in regards to another column (oracle g11)
body: <p>Hi I'm trying to do the following with a dataset I have that looks like this:</p>
  
  <pre><code>letter  number
  a   1
  a   2
  a   1
  a   1
  a   3
  a   4
  a   2
  a   4
  b   1
  b   3
  b   4
  b   3
  b   2
  b   5
  b   1
  b   1
  </code></pre>
  
  <p>the dataset is the result of a sub query I have run. I want to format the data to look like this, so I can flag the ones that have a count higher than 3</p>
  
  <pre><code>letter number number_count
      a   1   3
      a   2   2
      a   3   1
      a   4   2
      b   1   3
      b   2   1
      b   3   2
      b   4   1
      b   5   1
  </code></pre>
  
  <p>So for each value in the letter column, I need each unique number in col 2 counted up and displayed next to the value itself.
  I've done a lot of searching to try and solve this and can't get any variation of count, count distinct, over or other code to work so I'm either underestimating the problem or more likely, I'm not sure how to phrase my search so I find the answer I'm looking for.</p>
  
  <p>Any help would be greatly appreciated, I'm using sql developer to access an oracle 11g database.</p>