I have the following example set of data in SQL:
I need to select for RequestType = 1 and ToRoleID = 1 the maximum step where there is no record with other ToRoleID.
Example: If I filter by RequestType = 1 and ToRoleID = 1, this should give me only the row with Request_ID = 5.
Can I do it only with partition, JOIN?
Thank you.