Grouping a database query
<p>I'm trying to extract a value from list by change. The list is a query from an oracle database and has the following values:-</p>

<pre><code>22  
22  
22  
22 
22
22
23
23
23
23
22
22
22
</code></pre>

<p>How would you code it so the output is e.g </p>

<pre><code>22
23
22
</code></pre>

<p>I've tried loops and unique values , surely there is a simple method?</p>
