title: SQL Server Output : How should i proceed to get this output in Table?
body: <p>This is sample data against which I want to write a query</p>
  
  <pre><code>Shopkeeper |       Date    |    Product
  ----------------------------------------
  SA10000601 |    2011-12-01 |    8183
  SA10000601 |    2011-02-01 |    190
  SA10000601 |    2011-04-01 |    3192
  SA10000601 |    2011-03-01 |    4195
  SA10000601 |    2011-04-01 |    9195
  SA10000605 |    2011-12-01 |    8183
  SA10000601 |    2011-02-01 |    190
  JA10000607 |    2011-04-01 |    3192
  SA10000604 |    2011-03-01 |   195
  JA10000603 |    2011-04-01 |    9195
  SA10000601 |    2011-12-01 |    8183
  SA10000601 |    2011-02-01 |    190
  SA10000601 |    2011-04-01 |    3192
  SA10000601 |    2011-09-01 |    4195
  SA10000601 |    2011-08-01 |    9195
  SA10000904 |    2011-08-01 |    9195
  SA10000601 |    2011-05-01 |    8180
  SA10000606 |    2011-03-01 |    190
  SA10000601 |    2011-08-01 |   3192
  SA10000609 |    2011-11-01 |    4195
  </code></pre>
  
  <p>I want to display all the products which have been sold only for 1 month, sold for 2-3 months in year, sold for 4-5 months in year, sold for 6-7 months in an year.</p>
  
  <p>In the same table, I want to display shopkeepers who have been selling only for one month, shopkeepers who have been selling for 2-3 months, who have been selling for 4-5 months.</p>
  
  <p>Should somewhat look like this (sample output):</p>
  
  <pre><code>Months     | Shopkeepers     |    Product sold
  -----------------------------------------------
  1 month    |       5         |        10
  2-3 months |       3         |        2 
  4-5 months |       8         |        4
  </code></pre>
  
  <p>How should the query go in SQL Server? Please seek more explanations, as I have to resolve this today. Thanks in advance :)</p>
  
  <p>P.S.: Apologies for those tables, how to put data in tables here?</p>