Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
its_rajvir
Creator
Creator

Having clause in qlik sense

Hi Experts,

I need your help.

can anyone explain how can i write this sql script in qlik sense without having clause, i am stuck with having clause.

select  date, SeqNo, ID, MachineType, count(SeqNo) as 'No of  Sequence'

from ABC table

where date between date 1 and date 2 and MachineType in (6)

group by SeqNo,  ID, Date, MachineType

having count(SeqNo)>1

Looking forward for you valuable Suggesions.

Thanks

Labels (5)
1 Solution

Accepted Solutions
salonicdk28
Creator II
Creator II

Using preceding load, it can be happen as below

select  date, SeqNo, ID, MachineType, count(SeqNo) as 'No of  Sequence' from ABC table where date between date 1 and date 2 and MachineType in (6) group by SeqNo,  ID, Date, MachineType having count(SeqNo)>1

would be written as 

Load * where count(SeqNo)>1;

Load date, SeqNo, ID, MachineType, count(SeqNo) as 'No of  Sequence'

from ABC

where date between date 1 and date 2 and MachineType in (6)

group by SeqNo,  ID, Date, MachineType ;

 

View solution in original post

1 Reply
salonicdk28
Creator II
Creator II

Using preceding load, it can be happen as below

select  date, SeqNo, ID, MachineType, count(SeqNo) as 'No of  Sequence' from ABC table where date between date 1 and date 2 and MachineType in (6) group by SeqNo,  ID, Date, MachineType having count(SeqNo)>1

would be written as 

Load * where count(SeqNo)>1;

Load date, SeqNo, ID, MachineType, count(SeqNo) as 'No of  Sequence'

from ABC

where date between date 1 and date 2 and MachineType in (6)

group by SeqNo,  ID, Date, MachineType ;