Is there a way to correct this query so that it works with ONLY_FULL_GROUP_BY
enabled?
SELECT LOWER(s) AS lower_s, SUM(i) AS sum_i
FROM t
GROUP BY 1
HAVING LENGTH(lower_s) < 5
It gives the error message
Non-grouping field 'lower_s' is used in HAVING clause