On Wed, Jun 11, 2003 at 10:44:22 -0700,
Jonathan Bartlett <johnnyb@eskimo.com> wrote:
> I wonder if a macro system might be warranted - then have max be a macro
> instead of an aggregate. However, I don't know exactly how that would
> work since it involves the whole statement. Anyway, just an idea to
> hopefully spur someone else's thinking cap :)
I don't think that would work. There are going to be some cases
where the aggregate is better than the subselect (and not just when
there isn't an appropiate index). And in some cases distinct on order by
may be the best way to get what you want.