4 ms·
You can use ANY_VALUE to get an arbitrary value from a GROUP BY. There's also FIRST_VALUE for a window function (though that requires you specify an order).
by _dain_ 2y ago
You can use ANY_VALUE to get an arbitrary value from a GROUP BY. There's also FIRST_VALUE for a window function (though that requires you specify an order).
- cyberax 2y agoThis is a non-standard extension, and it also doesn't allow the selection of the _first_ element in a group. Even if the group is actually ordered.