Are there guarantees that ANY_VALUE in aggregation and HAVING will use the same value?
0
votes
0
answers
149
views
I would *assume* this to be the case, since it seems like an easy optimization and to make things more predictable. Given:
SELECT ANY_VALUE(country) AS country
FROM countries
HAVING ANY_VALUE(country) = 'US'
Is there a database where
country
NZ
US
Could return
country
NZ
Because the two ANY_VALUE
clauses are executed independently?
Asked by Kit Sunde
(363 rep)
Oct 26, 2023, 07:35 AM