Hi,
Can I use a WITH clause in my insert select. Something like this:
with q as
(
select a
, b
from tabc
)
insert into tab( volume_x, volume_y )
select sum( s.volume_x ), sum( s.volume_y )
from (
select q.a volume_x
, 0 volume_y
from q
where t.b = 'x'
union all
select 0
, sum( q.a )
from q
where t.b = 'y' ) s
??