title: SQL Top 10 Sales Every Month
body: <p>Greeting all. I have a SQL 2008 express database, lets name is tbl_Merchant, similar as following:</p>
  
  <pre><code>Merchant | Sales | Month
  Comp.1      100     1
  Comp.2      230     1
  Comp.3      120     1
  Comp.1      200     2
  Comp.2      130     2
  Comp.3      240     2
  Comp.1      250     3
    .          .      .
    .          .      .
    .          .      .
  </code></pre>
  
  <p>I need to find the top 10 merchant with sales every month over 12 months.</p>
  
  <p>It is very easy if it is just one month.</p>
  
  <pre><code>SELECT TOP 10 
         Merchant, 
         Sales, 
         Month
  FROM   tbl_Merchant
  WHERE  Month = 1
  ORDER BY Sales DESC
  </code></pre>
  
  <p>But I am stuck if I wan to find them over 12 months. I need to display 120 merchants, which are top 10 sales merchant of each month. Currently my solution is to union 12 tables from month 1 to 12 together but I don't think it is a good way.</p>
  
  <p>Can any one kindly give me any suggestion? </p>
  
  <p>Thank you very much.</p>