"Sam Mason" <[EMAIL PROTECTED]> writes: > SELECT i, MIN(k) OVER (PARTITION BY j) > FROM tbl > GROUP BY i; > > This is obviously wrong, but I don't see how to get to where I need to > be.
I'm not entirely sure myself. I think it might involve RANK OVER j though. I suspect it will look more like the DISTINCT ON solution than the min(record) solution. -- 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