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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
AutoMann
Partner - Contributor
Partner - Contributor

Group by wokring in SQL but not in Qlik

Hi all,

 

this statement works in SQL, giving me distinct values for ID.

But in Qlik I get a result with multiple ID.

 

Qlik statement:

[PriorityList]:
Load
max([Prio]) as myMax
Resident [Tabelle]
Group by [ID]
;

SQL Statement:

SELECT [Tabelle].ID, Min([Tabelle].Prio) AS MaxPrio
FROM [Tabelle]

GROUP BY [Tabelle].ID;

2 Solutions

Accepted Solutions
sergio0592
Specialist III
Specialist III

Hi,

Where is your ID field in your Qlik statement?

[PriorityList]:
Load
[ID]
max([Prio]) as myMax
Resident [Tabelle]
Group by [ID]
;

View solution in original post

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Hi,

I think you need to add your GROUP BY field to your LOAD.

e.g.

[PriorityList]:
Load

[ID], 
max([Prio]) as myMax
Resident [Tabelle]
Group by [ID]
;

View solution in original post

2 Replies
sergio0592
Specialist III
Specialist III

Hi,

Where is your ID field in your Qlik statement?

[PriorityList]:
Load
[ID]
max([Prio]) as myMax
Resident [Tabelle]
Group by [ID]
;

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Hi,

I think you need to add your GROUP BY field to your LOAD.

e.g.

[PriorityList]:
Load

[ID], 
max([Prio]) as myMax
Resident [Tabelle]
Group by [ID]
;