[SQL] a bit confused about distinct() function

2009-03-29 Thread Tena Sakai
Hi Everybody, I am a bit confused about distinct() function. I wrote a simple query like this: select subjectid, markerid, allele1id, allele2id from tsakai.mygenotype2 where subjectid in (53684, 53688, 53699, 53700, 53704, 53705, 53713, 53714, 53716, 53724) and markerid in

Re: [SQL] a bit confused about distinct() function

2009-03-29 Thread Osvaldo Kussama
2009/3/29 Tena Sakai tsa...@gallo.ucsf.edu: Hi Everybody, I am a bit confused about distinct() function. I wrote a simple query like this:  select subjectid, markerid, allele1id, allele2id   from tsakai.mygenotype2  where subjectid in (53684, 53688, 53699, 53700, 53704, 53705, 53713,

Re: [SQL] a bit confused about distinct() function

2009-03-29 Thread Tom Lane
Tena Sakai tsa...@gallo.ucsf.edu writes: I am a bit confused about distinct() function. Your confusion is in thinking that DISTINCT is a function. It is not; it's just a keyword that modifies SELECT. Write select distinct subjectid, markerid, allele1id, allele2id from

Re: [SQL] a bit confused about distinct() function

2009-03-29 Thread Tena Sakai
Many thanks, Osvaldo. Regards, Tena Sakai -Original Message- From: Osvaldo Kussama [mailto:osvaldo.kuss...@gmail.com] Sent: Sun 3/29/2009 10:44 AM To: Tena Sakai Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] a bit confused about distinct() function 2009/3/29 Tena Sakai tsa

Re: [SQL] a bit confused about distinct() function

2009-03-29 Thread Tena Sakai
Many thanks, Tom. Regards, Tena Sakai tsa...@gallo.ucsf.edu -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Sun 3/29/2009 10:49 AM To: Tena Sakai Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] a bit confused about distinct() function Tena Sakai tsa