title: Make sql query run faster
body: <p>Is it possible to make some optimization on such query ?</p>
  
  <pre><code>with t (CurrentPrice, [Weight])
  as ( select CurrentPrice, [Weight] from SomeTable where GroupingId = SomeBigIntId )
  
  SELECT MaxExactPrice = ( select MAX(CurrentPrice) FROM t Where [Weight] &gt; 0 ),  
     MinExactPrice = ( select MIN(CurrentPrice) FROM t Where [Weight] &gt; 0 ),
     MaxSimilarPrice = ( select MAX(CurrentPrice) FROM t Where [Weight] = 0 ),
     MinSimilarPrice = ( select MIN(CurrentPrice) FROM t Where [Weight] = 0 ),
     ExactCount = ( select Count(*) FROM t Where [Weight] &gt; 0 ),
     SimilarCount = ( select Count(*) FROM t Where [Weight] = 0 ),
     Count(*) as TotalCount
  FROM t
  </code></pre>
  
  <p>Thank you.</p>