Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am working on replicating qlik logic in snowflake, need help on below code WHERE Condition
Parts:
LOAD Distinct
[IDate],
cntnr,
orgn
FROM
[$(vQVDPath)Parts_Transformed.qvd]
(qvd)
where Match(orgn,'US','CA','MX');
store Parts into $(vQVDPath)Part.qvd;
NoConcatenate
Parts_MaxDate:
LOAD Distinct
[Date],
cntnr,
orgn
Resident Parts
where cntnr <> Previous(cntnr)
Order by cntnr, [Date] desc;
drop Table Parts;
store Parts_MaxDate into $(vQVDPath)Parts_MaxDate.qvd;
Please help
Thanks
which one, there are two? what is the issue?
@MarcoWedel Hi, Thanks for replying
Parts_maxdate table. Mainly I am looking for where condition
Hi ,
Can you please help me on where condtion below , how to write it in SnowFlake
where cntnr <> Previous(cntnr)
Order by cntnr, [Date] desc;
Thanks
I think the Previous()-function would translate into LAG() OVER ... in Snowflake SQL