filtering out doubles

Поиск
Список
Период
Сортировка
От Jules Alberts
Тема filtering out doubles
Дата
Msg-id 20030312100410.BBFD01CB1A5@koshin.dsl.systemec.nl
обсуждение исходный текст
Ответы Re: filtering out doubles
Список pgsql-sql
Hello everyone,

I was wondering how to filter out double values (where "value" spans 
two columns COL1 and COL2) with a SELECT statement. If I have this 
table:

COL1 |COL2 |COL3
-----------------------------
a    |b    |some value
a    |b    |another value
a    |c    |yet another value

what would be the select statement to get this result:

COL1 |COL2 |COL3
-----------------------------
a    |b    |some value
a    |c    |yet another value

I was thinking that DISTINCT would do this, but I don't want to loose 
COL3. TIA for any tips!


В списке pgsql-sql по дате отправления: