title: How to get count greater than and less than average values group by name
body: <p>I have a data set with name and their transaction ,how to get average and count of transactions grater than that average and less than that average..</p>
  
  <pre><code>Name    Transaction
  John    12
  John    34
  John    45
  John    66
  John    32
  chris   26
  chris   54
  chris   56
  chris   99
  chris   13
  chris   4
  kim     22
  kim     34
  kim     7
  kim     11
  kim     34
  </code></pre>
  
  <p>O/P will be</p>
  
  <pre><code>Name      Avg     Count_greater_than_Avg    Count_Less_than_Avg
  John      37.8          2                           3
  chris     42            3                           3
  kim       21.6          3                           2
  </code></pre>
  
  <p>Thanks in advance..</p>