title: How to summarize data in sql?
body: <p>I have a table of data and need to extract count of value on report table on <code>excel</code>,
  but i need to show any rows and columns in my report.</p>
  
  <p>My table looks like:</p>
  
  <pre><code>ID  Val  Sets
  1   aa   25
  2   aa   26
  3   bb   25
  4   cc   27
  5   aa   27
  6   aa   25
  </code></pre>
  
  <p>And my report in this format:</p>
  
  <pre><code>    25  26  27
  aa  2   1   1
  bb  1   0   0
  cc  0   0   1
  </code></pre>