double linked list

From: jasche(at)gmx(dot)de (Juergen)
To: pgsql-sql(at)postgresql(dot)org
Subject: double linked list
Date: 2003-01-28 15:44:29
Message-ID: 2ee07259.0301280744.582e4b7c@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-01-28 15:56:28 Re: subselect return in where clause
Previous Message Tom Lane 2003-01-28 15:32:35 Re: CR/LF conversion (was: import error)