title: GROUP BY in Informix (11.5)
body: <p>Following Example Table Structure:</p>
  
  <pre><code>NR1 | NR2 | PRENAME | LASTNAME
  </code></pre>
  
  <p>If i query all 4 fields of this table and grouping it´s first 2 fields (<code>NR1,NR2</code>) in mysql,
  i can do something like this:</p>
  
  <pre><code>SELECT NR1,NR2,PRENAME,LASTNAME FROM tbl GROUP BY NR1,NR1
  </code></pre>
  
  <p>But this won´t work in informix.</p>
  
  <pre><code>INFORMIX ERROR: the column (PRENAME) must be in the group by list
  </code></pre>
  
  <p>After reading some Topics at google, it is an "Informix feature" that all Selected Columns has to be in the Grouping List.
  But if i will do that, the result is not that result, that i wish to have.
  If i use </p>
  
  <pre><code>DISTINCT
  </code></pre>
  
  <p>instead <code>GROUP BY</code> the result is similar false, because i can not put the <code>DISTINCT</code>function only to column 1 and 2.</p>
  
  <p>So: How can i make a "MYSQL GROUP BY" function ?</p>