Help with a select statement design

From: JORGE MALDONADO <jorgemal1960(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Help with a select statement design
Date: 2012-12-24 16:30:14
Message-ID: CAAY=A79K_75c3EhK2U7PSK1zZBRJkUwfPDRU=s0z-t46mUuOYQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have a record with the following fields:

id1, id2, id3, id4, price1, price2, price3, price4

I would like to write a SELECT statement in order to get 4 records:

id, price (record that comes from id1 and price 1)
id, price (record that comes from id2 and price 2)
id, price (record that comes from id3 and price 3)
id, price (record that comes from id4 and price 4)

I will very much appreciate any suggestion.

Respectfully,
Jorge Maldonado

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message John Fabiani 2012-12-27 14:27:28 strange corruption?
Previous Message Wes James 2012-12-21 18:50:39 Re: deciding on one of multiple results returned