title: Get minimum value greater than zero
body: <p>I have the following table:</p>
  
  <pre><code>column1   column2   column3
     3         2         0
     5         9         2
     1         4         6
  </code></pre>
  
  <p>When I run the following code:</p>
  
  <pre><code>SELECT
    id_function = @param,
    MIN(t1.column1) AS c1min, 
    MAX(t1.column2) AS c2max,
    MIN(t1.column3) AS c3min
  FROM
    table1 (NOLOCK) AS t1
  WHERE
    t1.id = @param
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>c1min   c2max   c3min
    1       9       0
  </code></pre>
  
  <p>My problem is that c3min must be the minimum value greater than zero.
  The result I need should be:</p>
  
  <pre><code>c1min   c2max   c3min
    1       9       2
  </code></pre>
  
  <p>Is there any way to do that without using a subselect?
  Any help will be appreciated.</p>
  
  <p>Thank you!</p>