 <p>A typical way of doing this uses the ANSI standard window function<code>row_number()</code>:</p> <pre><code>select t.* from (select t.*, row_number() over (partition by idUser order by idUser) as seqnum from t ) t where seqnum = 1; </code></pre>