Home > database >  Ask bosses oracle step by step summary of the problem
Ask bosses oracle step by step summary of the problem

Time:09-21

I ask you, want to achieve in the primary, secondary, tertiary, quaternary amount under the project step by step, four - & gt; Three, three - & gt; 2, 2 - & gt; A,
The select cno,
Cname,
F_cno,
Clevel,
The type,
Sign,
Cmoney,
(select sum (tc money)
The from CPPPP t where connect_by_isleaf='1'
Start with tc no=a.c no and t.t ype='2'
Connect by the prior tc no=t.f _cno)
The from CPPPP where a type='2'

But the problem is that there are multiple level 1 project, after the summary, summary data errors,

Hope to give to give directions, thank you!!!!!!

CodePudding user response:

Create statements and some test data,

CodePudding user response:

Should be able to reference a rollup and grouping function usage

CodePudding user response:

Analysis function, the SUM (CMONEY) OVER (ORDER BY CLEVEL) is ok
  • Related