Ben Clements <benhasgonewalking@gmail.com> writes:
> As shown above, the following calculated column can bring in the city name,
> even though the city name isn't in the GROUP BY:
> max(city) keep (dense_rank first order by population desc)
You haven't really explained what this does, let alone why it can't
be implemented with existing features such as FILTER and ORDER BY.
regards, tom lane