query question really cant give a summary here so read the body ;-) - Mailing list pgsql-general

From Rhys Stewart
Subject query question really cant give a summary here so read the body ;-)
Date
Msg-id 189966030804231111n56a940ddw593403e3e503c9f1@mail.gmail.com
Whole thread Raw
Responses Re: query question really cant give a summary here so read the body ;-)  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Re: query question really cant give a summary here so read the body ;-)  (James Strater <straterj@yahoo.com>)
Re: query question really cant give a summary here so read the body ;-)  ("Roberts, Jon" <Jon.Roberts@asurion.com>)
List pgsql-general
Hi all,

have the following table

aid    | bid
--------------
1    |5
2    |6
3    |7
4    |9
5    |1
6    |2
7    |3
8    |10
9    |4
10  |8
both aid & bid represent the same data in another table, but the table has duplicate data and i did a self-join to get the id's out. The question is how do i get a distinct listing between both columns

like
aid | bid
-----------
1|5
2|6
3|7
4|9
10|8

Have been racking my brain for the past hour....any suggestions?

Thanks
Rhys

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: How to modify ENUM datatypes?
Next
From: Karsten Hilbert
Date:
Subject: Re: initdb in 8.3