Re: Q: select query - Mailing list pgsql-sql

From Rod Taylor
Subject Re: Q: select query
Date
Msg-id 1063477035.66715.7.camel@jester
Whole thread Raw
In response to Q: select query  (grk@usa.net (G. Ralph Kuntz, MD))
List pgsql-sql
> in other words, all but the first row of a group.

Interesting question. The below should work and be quick so long as
there is a UNIQUE(col1, col2) constraint.

SELECT col1    , col2 FROM jWHERE col2 != (SELECT col2                 FROM j AS jsub                WHERE col1 =
j.col1            ORDER BY col2 ASC                LIMIT 1); 

pgsql-sql by date:

Previous
From: chester c young
Date:
Subject: production parameters
Next
From: Manfred Koizar
Date:
Subject: Re: Q: select query