Hi Team,
Here the script in SQL ,I want to write the same in Qlik. How can i convert the Min,this Min with in the table. I did but giving some wrong result.
SELECT DISTINCT DATE
FROM historyData
WHERE type = 'SR'
AND CODE = 'APPROVE'
AND History_ID = Tran.Tran_ID
AND
SEQ_Num =
(SELECT min(SEQ_Num )
FROM historyData
WHERE
type = 'SR' AND CODE = 'APPROVE'
AND History_ID = Tran.Tran_ID
)
) History_DATE
I converted to Qlik as below but giving some wrong result.
Inner Join(Tran)
LOAD
History_ID AS Key_History_ID ,
min(SEQ_Num ) AS Seq_Num,
Date(Floor(DATE)) as History_Date
FROM [...._history.qvd] (qvd)
WHERE TYPE='PO' and CODE='APPROVE'
Group BY History_ID , CODE, DATE;
Thanks in Advance.