title: Group by query based on other column value
body: <p>Suppose I have a table named <code>process_states</code>: </p>
  
  <pre><code>+--------+--------+
  |Process | State  |
  -------------------
  |   A    |   0    |
  |   A    |   0    |
  |   B    |   0    |
  |   B    |  -1    |
  |   C    |  -99   |
  -------------------
  Note: State can have many more negative and positive state values
  </code></pre>
  
  <blockquote>
    <p>I want to find all processes having all rows with state 0. In the above case I want to get A.</p>
  </blockquote>
  
  <p>I am trying to do it using <code>group by</code>, is there a way to do something like this:   </p>
  
  <pre><code>select process from process_states 
  group by process 
  having &lt;all state for that process is 0&gt;
  </code></pre>
  
  <p>Is it possible to do it using <code>group by</code>?</p>