Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have my data as shown in the sample below. I want to pick the last value of the respective id. Please share the ideas in achieving the same
Input:
ID | Status |
1 | submitted |
1 | open |
1 | progress |
1 | closed |
2 | submitted |
2 | Open |
3 | submitted |
3 | open |
3 | cancelled |
Output Needed
ID | Status |
1 | closed |
2 | open |
3 | cancelled |
Thanks for your help.
Regards
Murali krishna
NOCONCATENATE
LOAD ID, LastValue(Status) as LastStatus
RESIDENT YourTable
GROUP BY ID;
NOCONCATENATE
LOAD ID, LastValue(Status) as LastStatus
RESIDENT YourTable
GROUP BY ID;
table:
load ID,LastValue(Status) as laststatus resident table group by ID;