title: SQL query to get data with condition
body: <p>I am using a SQL Server database.</p>
  
  <pre><code>A | B | C
  --+---+---
  1 |11 |  0
  1 |12 |  0
  1 |13 |  0
  2 |33 |  5
  2 |34 | 10
  2 |35 | 78
  5 |45 |  0
  5 |49 |  0
  5 |51 |  1
  8 |10 |  0
  8 |14 |  2
  8 |34 |  3
  </code></pre>
  
  <p>I am looking for sql query to fetch distinct A value which is having at least one value of C is zero but should not all the values would be zero.
  In the above table I should get 5 &amp; 8</p>
  
  <p>At the moment for A value which is having all values are zero , I am doing like as below so something similar would be helpful</p>
  
  <pre><code>SUM(ABS(table.C)) = 0
  </code></pre>