title: SQL Query for Month wise count
body: <p>I have table as below for package and its monthly count, like..</p>
  
  <p><code>Package1</code> - 1 dollor per search - 50 searches (PER MONTH) included in package and extra search FOR MONTH will be counted separately.</p>
  
  <p>I am passing data in my table like..</p>
  
  <p>User package table has user's package information with its detail.</p>
  
  <pre><code>UserpackageId  Userid  PackageId  SearchPerMonth    StartDatePackage    EndDatePackage
  1                1         1             50         25/02/2012         25/02/2013  (1 YEAR)
  </code></pre>
  
  <p><strong>Detail table</strong></p>
  
  <pre><code>Userpackageid      SearchDate      SearchCost      
  1                  26/02/2012       1 Dollor
  </code></pre>
  
  <p>Now I want to summarize data like</p>
  
  <p>monthly package search count - as I have search per month 50 for that package.. and if extra count happens over 50 than It will show other count for extra IN MONTHLY WISE..</p>