X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C96B6D98A9 for ; Mon, 10 Oct 2005 07:24:08 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 39940-09 for ; Mon, 10 Oct 2005 10:24:02 +0000 (GMT) Received: from mail.sdpi.org (mail.sdpi.org [210.56.14.210]) by svr1.postgresql.org (Postfix) with ESMTP id 2CACBD97D5 for ; Mon, 10 Oct 2005 07:24:00 -0300 (ADT) Received: from mis ([192.168.1.185]) by mail.sdpi.org (8.12.11/8.12.11) with SMTP id j9AAHe32023239 for ; Mon, 10 Oct 2005 15:17:44 +0500 (PKT) Message-ID: <01c201c5cd84$4a2568f0$b901a8c0@sdp.org> From: "M. Imran" To: Subject: Query Question Date: Mon, 10 Oct 2005 15:20:47 +0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_01BF_01C5CDAE.30C66880" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: ClamAV 0.80/1119/Thu Oct 6 23:29:53 2005 clamav-milter version 0.80j on mail.sdpi.org X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.402 required=5 tests=[DNS_FROM_RFC_ABUSE=0.374, HTML_60_70=0.027, HTML_MESSAGE=0.001] X-Spam-Level: X-Archive-Number: 200510/104 X-Sequence-Number: 19176 This is a multi-part message in MIME format. ------=_NextPart_000_01BF_01C5CDAE.30C66880 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear all, I want to select distinct CODE and thier respective sex, sex can be = male/female, can I get my result strictly distinct in code. Currently it = duplicate code value for each male and female. I am using this query=20 select distinct(code), id from table Regards, imran ------=_NextPart_000_01BF_01C5CDAE.30C66880 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Dear all,
    I want to select=20 distinct CODE and thier respective sex, sex can be=20  male/female, can I get my result strictly distinct in code. = Currently=20 it duplicate code value for each male and female. I am using this = query=20
 
select distinct(code), id =  from=20 table
 
Regards,
imran
------=_NextPart_000_01BF_01C5CDAE.30C66880--