My Dataframe is something like below, trying to update all column values based on the highest version within that group. I am able to update at the complete table level but failed to update the in-group/window frame level.
source:
expected output:
CodePudding user response:
SELECT *, max_by(status, version) OVER (PARTITION BY number) AS updated_status FROM your_table
This should work for your case.