cancel
Showing results for 
Search instead for 
Did you mean: 

SAP hana View exclude aggregation

former_member183904
Participant
0 Kudos

i have 2 rows

1 john smith 10 objects

2 john smith 10 objects

i need to group by last name but only show 10 in objects. this has to be done in aggregation or using SQl..

what i see is

john smith 20 objects

i wanna see

john smith 10 objects.

any ideas?>

i am on the latest SAP hana

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member183904
Participant
0 Kudos

is it possible to do this in the graphical view as all my work is in graphical view and wil require for me to create SQl views and graphical views to go back and forth.

0 Kudos

Hi Amer,

If I understand your question, you can DISTINCT CLAUSE to get what you need. Refer below sample code.

DO BEGIN
IT_T = SELECT 'JOHN SMITH' as NAME, 10 as OBJECTS from dummy 
UNION ALL
SELECT 'JOHN SMITH' as NAME, 10 as OBJECTS from dummy 
;

SELECT DISTINCT NAME, OBJECTS FROM :IT_T;
END

If this satisfy your requorement, please accept.