pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: grk@usa.net
To: pgsql-sql@postgresql.org
Subject: Q: select query
Date: 12 Sep 2003 10:58:45 -0700
Message-ID: <9881c752.0309120958.454c659c@posting.google.com> (raw)

I am trying to write a query to select some rows.

My data consists of rows like this

   1       a
   1       b
   1       c
   2       d
   3       e
   3       f
   ...

I would like to select the second and subsequent rows where the first
column is the same:

   1       b
   1       c
   3       f

in other words, all but the first row of a group.

Any ideas?

Thanks, Ralph



view thread (3+ messages)  latest in thread

Message-ID: <9881c752.0309120958.454c659c@posting.google.com>
Permalink:  ../9881c752.0309120958.454c659c@posting.google.com/
Also on:    postgresql.org/message-id/9881c752.0309120958.454c659c@posting.google.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: grk@usa.net
  Subject: Re: Q: select query
  In-Reply-To: <9881c752.0309120958.454c659c@posting.google.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox