pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jasche@gmx.de
To: pgsql-sql@postgresql.org
Subject: double linked list
Date: 28 Jan 2003 07:44:29 -0800
Message-ID: <2ee07259.0301280744.582e4b7c@posting.google.com> (raw)

Hi folks!,

I've got a table called 'link_t' containing a collection of seller -
buyer relations between two parties.

sql> select * from link_t

S B
- -
C X
A B
B C
C D
D E

5 rows selected.

I am looking for a select statement that returns the concatenation of
seller - buyer relations between the first seller 'A' and the last
buyer 'B'.

the result should be

S B
- -
A B
B C
C D
D E

Currently I fumbling around with self joins but haven't figured out
yet.
Any suggestions

Many tanks in advance

Cheers

Juergen



view thread (11+ messages)  latest in thread

Message-ID: <2ee07259.0301280744.582e4b7c@posting.google.com>
Permalink:  ../2ee07259.0301280744.582e4b7c@posting.google.com/
Also on:    postgresql.org/message-id/2ee07259.0301280744.582e4b7c@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: jasche@gmx.de
  Subject: Re: double linked list
  In-Reply-To: <2ee07259.0301280744.582e4b7c@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