title: Second min values with same count in sql?
body: <p>My table like this</p>
  
  <pre><code> A     B
  7499   300
  7521   400
  7654   500
  7698   0
  7844   200
  7900   0
  </code></pre>
  
  <p>I am trying like this</p>
  
  <pre><code>select deptno,count(1) ,min(comm)from emp
  where deptno=30
  group by deptno
  </code></pre>
  
  <p>I am getting output</p>
  
  <pre><code>count min(B)
  6         0
  </code></pre>
  
  <p>But I need</p>
  
  <pre><code>  count min(B)
  6         200
  </code></pre>
  
  <p><strong>with out using b >0 concept</strong></p>