cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to sum the count value using SAP HANA SQLScript in CV ?

former_member435389
Participant
0 Kudos
716

Hi Experts,

[1] SUM outside

select

COMP,

SUM( case when COMP = '1000' then count( "PERNR" ) else 0 end ) as "NUM"

from tab

;

[2] SUM inside

select

COMP,

case when COMP = '1000' then SUM( count( "PERNR" ) ) else 0 end as "NUM"

from tab

;

All got the same error : "SAP DBTech JDBC: [279]: group function is nested: ......."

So, how to sum the result of count value in one select statement ?

Accepted Solutions (0)

Answers (0)