I am trying to flag data based off the max unix timestamp. However, For some reason it isn't able to flag correctly in my script. But it just comes out as null
Vin Number |
Unix Time |
Car Model |
*0000GF004 |
3291598799 |
BMW |
*0000GF004 |
3422170859 |
BMW |
*0000GF004 |
3266301599 |
BMW |
Temp:
NoConcatenate
Load %PSBKey,
max(Unix Time) as Last_record
Resident Cartable
group by %PSBKey
;
Left Join (Cartable)
Load *
Resident Temp
;
Drop table Temp;
Temp1:
NoConcatenate
Load *,
if(Cartable=Last_record,'Yes') as Latest_record
Resident Cartable;
Drop table Cartable;
Rename table Temp1 to Cartable;