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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview script equivalent of SQL code

-

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

In QlikView, you can do it in two steps - first, create a mapping table of all highest Seq. numbers. Then, load your data, comparing the sequence to the mapped values for each Personal ID.

Something along those lines:


Max_Seq_Map:
mapping load
DEGREE_PERSONAL_ID,
max(DEGREE_SEQ_NO) as Max_Degree
from ....
;
Degrees:
load * from ...
Where
DEGREE_SEQ_NO = ApplyMap('Max_Seq_Map', DEGREE_PERSONAL_ID, null())
;





Ask me about Qlik Sense Expert Class!

View solution in original post

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

In QlikView, you can do it in two steps - first, create a mapping table of all highest Seq. numbers. Then, load your data, comparing the sequence to the mapped values for each Personal ID.

Something along those lines:


Max_Seq_Map:
mapping load
DEGREE_PERSONAL_ID,
max(DEGREE_SEQ_NO) as Max_Degree
from ....
;
Degrees:
load * from ...
Where
DEGREE_SEQ_NO = ApplyMap('Max_Seq_Map', DEGREE_PERSONAL_ID, null())
;





Ask me about Qlik Sense Expert Class!
Not applicable
Author

Hi Oleg, do you know the script equivalent of this SQL, to get 3 Top values of each CategoryName?


SELECT Categories.CategoryName, Products.ProductName, Products.UnitsInStock
FROM Categories
INNER JOIN Products
ON Categories.CategoryID = Products.CategoryID
WHERE (((Products.UnitsInStock)
In (SELECT TOP 3 [UnitsInStock] FROM Products WHERE [CategoryID]=[Categories].[CategoryID]
ORDER BY [UnitsInStock] Desc)))
ORDER BY Categories.CategoryName, Products.UnitsInStock DESC;


Thanks!!