I have a document where one column is a date and another is a value for the date. I'd like to be able to get the maximum value and the date when that value appeared. For example if I had
A (Date) | B (Value) | |
---|---|---|
1 | 2023-02-18 | 2 |
2 | 2023-02-19 | 7 |
3 | 2023-02-20 | 3 |
4 | 2023-02-21 | 9 |
5 | 2023-02-22 | 5 |
I know I could use MAX
to get the max value of 9 but I also want to know the date when that value appears. How can I do that?