On Tue, Dec 6, 2022 at 4:57 AM David G. Johnston <david.g.johns...@gmail.com> wrote: ... > > > I'm referring to the query: > > select any_value(v order by v) from (values (2),(1),(3)) as vals (v); > // produces 1, per the documented implementation-defined behavior. > > Someone writing: > > select any_value(v) from (values (2),(1),(3)) as vals (v) order by v; > > Is not presently, nor am I saying, promised the value 1. >
Shouldn't the 2nd query be producing an error, as it has an implied GROUP BY () - so column v cannot appear (unless aggregated) in SELECT and ORDER BY?