Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
geogou1973
Creator
Creator

Select count distinct from SAP Hana table

Hello,

I have the following sql 

select 
count(distinct mblnr)
from mkpf
inner join mseg on mkpf~mblnr=mseg~mblnr and mkpf~mjahr=mseg~mjahr
inner join ekko on mseg~ebeln=ekko~ebeln
where mkpf~vgart='WE'
and mseg~ebeln in
(select ebeln
from rseg
inner join rbkp on rseg~belnr=rbkp~belnr and rseg~gjahr=rbkp~gjahr
where rbkp~tcode<>'MR1M');

and does not run. It is running only if you give count(*)

Has anyone how can i write the sql in order to have the distinct results of the field mblnr

thank you in advance

 

0 Replies