title: Find top n average values
body: <p>I have a table that looks like this:</p>
  
  <pre><code>UID DATE GROUP VALUE
  </code></pre>
  
  <p>The data types are:</p>
  
  <pre><code> VARCHAR DATE VARCHAR NUMERIC
  </code></pre>
  
  <p>Example:</p>
  
  <pre><code>abc1000 2012-09-01 1205 1000.0000
  abc1000 2012-09-01 1210 1010.0000
  abc1000 2012-09-02 1205 1100.0000
  abc1000 2012-09-02 1210 1020.0000
  def1010 2012-09-01 1205 2000.0000
  </code></pre>
  
  <p>I need to find the top N(15) values (VALUE) for each unique "UID+GROUP" and AVERAGE them so the output looks like this:</p>
  
  <pre><code>abc1000 1205 1050.0000
  abc1000 1210 1015.0000
  def1010 1205 2000.0000
  </code></pre>