From: | Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> |
---|---|
To: | Adrian Johnson <oriolebaltimore(at)gmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: unique fields |
Date: | 2010-09-23 07:33:22 |
Message-ID: | AANLkTikM+GtbiZsFob=cT9CBzu1CQG4ftS5Lvn-StfSy@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi,
On 23 September 2010 07:30, Adrian Johnson <oriolebaltimore(at)gmail(dot)com> wrote:
> I want to find out how many duplications are there for chr, cfrom and cto
Start with it http://www.postgresql.org/docs/9.0/interactive/tutorial-agg.html
p.s.
SELECT chr, cfrom, cto, count(*) FROM your_table GROUP BY 1, 2, 3;
>
> 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
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
--
Sergey Konoplev
Blog: http://gray-hemp.blogspot.com /
Linkedin: http://ru.linkedin.com/in/grayhemp /
JID/GTalk: gray(dot)ru(at)gmail(dot)com / Skype: gray-hemp / ICQ: 29353802
From | Date | Subject | |
---|---|---|---|
Next Message | Oliveiros d'Azevedo Cristina | 2010-09-23 10:01:39 | Re: unique fields |
Previous Message | negora | 2010-09-23 07:12:44 | Re: HowTo divide streetname from house-nr ? |