filtering out doubles

Поиск
Список
Период
Сортировка
От Jules Alberts
Тема filtering out doubles
Дата
Msg-id 20030312100410.BBFD01CB1A5@koshin.dsl.systemec.nl
обсуждение исходный текст
Ответы Re: filtering out doubles  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список 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 по дате отправления:

Предыдущее
От: "Susan Hoddinott"
Дата:
Сообщение: Create function statement with insert statement
Следующее
От: Rupa Schomaker
Дата:
Сообщение: Re: Special characters in SQL queries