I would like to aggregate by maximum value for a day.
To achieve this, I'm casting the original timestamp type to a date type and using maximum for that day.
However, I lose the original timestamp which I'd like to keep.
For example, the incoming data:
ID Value Timestamp
ABC 11 2021-06-10T07:33:21
ABC 2 2021-06-10T03:28:04
ABC 14 2021-06-10T05:45:17
So I cast the timestamp to date type then I'm aggregating by maximum(Value) and grouping by ID and the newly-created date column (no timestamp) to get the max value for that ID and day. But I'd like to keep the timestamp also. e.g.:
ID Value Date Timestamp
ABC 14 2021-06-10 2021-06-10T05:45:17

