Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
-
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())
;
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())
;
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!!