title: group by with where not working
body: <pre><code>SELECT A.ID, A.COLUMN_B, A.COLUMN_C FROM A
  WHERE A.COLUMN_A IN
   (
    SELECT A.COLUMN_A
    FROM B
    INNER JOIN A ON B."COLUMN_A" = A."COLUMN_A"
    WHERE B."COLUMN_B" = 'something'
  
    UNION
  
    SELECT A."COLUMN_A"
    FROM A  
    WHERE A."COLUMN_D" IN (X,Y,Z) OR A."COLUMN_D" = 'something'
    )
  </code></pre>
  
  <p>Now I want add a <code>group by (A.ID)</code> , and <code>order by (A.COLUMN_B) DESC</code>, and then <code>select first</code>  to it. But DB won't allow. Any suggestions ? I can use LINQ to solve it once inner Union part is returned. But do now want to go that way.</p>