> select val1+val2 as val> from some_table> group by val having val>1;> ERROR: Attribute "val" not found> > Is it a bug or a feature?
It's a mis-feature that group by accepts aliases of the select list.
Having is proper.