title: Quartile for Boxplot::MSSQL 2008 R2
body: <p>I have following table structure with around 3mn data points in MSSQL 2008 R2 database.</p>
  
  <pre><code>vertical|Defects(F)|Defects(NF)|
  --------------------------------
  Billing |193       |678
  Provi   |200       |906
  Billing |232       |111
  Analyt  |67        |0
  Provi   |121       |690
  </code></pre>
  
  <p>I need to calculate the Min, Max, First Quartile and Third Quartile to draw a whisker plot. Hence would want output in following format</p>
  
  <pre><code>vertical|Max       |Min      |Q1       |Q3
  --------------------------------
  Billing |343       |24       |103.75   |263.25
  Provi   |811       |110      |285.25   |635.75
  Analyt  |67        |67       |67       |67
  </code></pre>
  
  <p>Please note that Max, Min and quartile computation are done after adding Defects(F) and Defects(NF)</p>
  
  <p>Please help!!</p>