title: Mysql split row sum by count
body: <p>I have the following tables
  <a href="http://sqlfiddle.com/#!2/d0a3d" rel="nofollow">http://sqlfiddle.com/#!2/d0a3d</a></p>
  
  <pre><code>sp | product | exp
  1    A       | 50
  1    B         50
  1    A         100
  1    B         100
  2    B         200
  2    C         200
  3    A         50
  3    B         50   
  </code></pre>
  
  <p>Technical I want to divide exp to total number of products associated with t_id</p>
  
  <pre><code>The final result should be
   sp |  A   | B   |  C
   1  | 150  | 150 |  0
   2  |  0   | 200 | 200
   3  |  50  | 50  |  0
  </code></pre>