Qlik Community

Connectivity & Data Prep

Discussion board where members can learn more about Qlik Sense Data Connectivity.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
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