For example, is output of 10 guaranteed in the following:
bruno=> select any_value(x order by x desc) from generate_series(1,10) as x;
any_value
-----------
10
(1 row)
The use case is that I want to return a value of one column that is paired
with the maximum value of another column in each group when using GROUP BY.
(There aren't going to be any NULLs in the involved columns.)
Thanks.