From the input data, I need to rank the id. The data is order by time ascending.
Example: id number 421492036 has two record with code '05' and is ordered by time ascending.
The ID 421492036 has same code 05 and is the first two records in the table.
So its rank should be 1 in Output 1 table.
In Output 2 table we need to take the id 421492036 first record based on time.
Is it possible to get like this?
