title: How find max value in sql server 2008 with one more condition
body: <pre><code>PinID      PinType     PinNumber
  ================================
  1             A            125
  2             CC           126
  3             BB            1
  4             JJ           127
  5             oo           128
  6             NN           2
  7             ll           129
  8             FF           3
  </code></pre>
  
  <p>this is my table(PinTbl) and as per my requirement i need to find max pinNumber but less than 125, the answer is 3 how can find it ?</p>
  
  <p>I am new to sql server may this question easy but I am unable to find any help on web.   </p>