Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> Select
> case when Exists(Select * From lkp where lkp.f1 = t1.f1) then
> 'known'
> else
> 'unknown'
> end as status,
> sum(x)
> from t1
> group by 1;
Okay, I'm convinced: the problem is that the test for ungrouped vars
used inside subselects is too simplistic. I think it's failing to
consider that if the whole subselect can be considered a grouped
expression, we shouldn't object to ungrouped individual vars within it.
Will work on it.
regards, tom lane