"Sam Mason" <[EMAIL PROTECTED]> writes: > On Mon, Mar 24, 2008 at 05:27:04PM -0500, Decibel! wrote: >> On Mar 20, 2008, at 2:23 PM, Sam Mason wrote: >> > SELECT i, (MIN((j,k))).k >> > FROM tbl >> > GROUP BY i; >> >> How is that any better than SELECT i, min(k) FROM tbl GROUP BY i ? > > Because I want the value of k associated with the minimum value of j. > For example, if I have data looking like:
I have nothing against having min(record) and it does seem like it would let you do this at least for reasonably simple cases. But I'm more eager to see full OLAP window functions which would let you do this and a whole lot else as well. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers