Oracle equiv of T-SQL UNION ALL query
Assuming that you alias the inline view to Q, that syntax should be perfectly valid in Oracle.  I'm assuming that you actually have the alias in the SQL Server version as well.

SQL&gt; ed
Wrote file afiedt.buf

  1  select q.a, sum(q.b)
  2    from (select deptno a, sal b from emp
  3          union all
  4          select 40, 10000 from dual
  5         ) q
  6*  group by q.a
SQL&gt;
SQL&gt; /

         A   SUM(Q.B)
---------- ----------
        30       9406
        20      10880
        40      10000
        10       8753