title: SQL query for showing monthly report
body: <p>I have a table with following columns</p>
  
  <pre><code>toolid, Quantity, dtfrom, dtto, projectid etc.
  </code></pre>
  
  <p>We have master tables for tools and project. The tools have license for a particular period say <code>dtfrom</code> is 1/1/2012 and <code>dtto</code> is 30/3/2012.</p>
  
  <p>I have to show monthly report for quantity of tools purchased in a particular month.
  The report will look like</p>
  
  <pre><code>sno  toolname projectname quantity jan feb mar apr ......
  </code></pre>
  
  <p>Please help in writing SQL query for it.</p>