unique fields

Поиск
Список
Период
Сортировка
От Adrian Johnson
Тема unique fields
Дата
Msg-id AANLkTimBbF+6FrjuYSC9BcekpsT=mboGUo6B2kGFky-G@mail.gmail.com
обсуждение исходный текст
Ответы Re: unique fields
Список pgsql-sql
hi:

I have a fairly large table.

sample_id | chr | cfrom | cto |
-------------------------------------------
1                c2    19       20
2                c2    19       20
3                c2    19       20
1                c5    10       11
3                c5    10       11


(25,000 rows)

I want to find out how many duplications are there for chr, cfrom and cto

a.   c2,19,20 are common to samples 1,2 and 3.

since there will be many instances like that, do I have to loop over
entire rows and find common chr, cfrom and c2 and ouput with
sample_id.
how can I do that.

thanks
adrian


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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: HowTo divide streetname from house-nr ?
Следующее
От: negora
Дата:
Сообщение: Re: HowTo divide streetname from house-nr ?