How to group by looking at previous and next value in each row
<p>Suppose I have a table with the following records...</p>

<pre><code>ResumeId    Action
39092       DEV   
39092       C     
39092       C     
39096       C     
39096       C     
39098       CONF      
39098       CONF      
</code></pre>

<p>How can I group them so that the output would look like this? In the below case, since <code>ResumeId = 39092</code> has at least one <code>DEV</code> record then the grouping result should return <code>DEV</code>...</p>

<pre><code>ResumeId    Action  
39092       DEV     
39096       C       
39098       CONF        
</code></pre>