pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: M. Imran <imran@sdpi.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: Query Question
Date: Mon, 10 Oct 2005 07:37:30 -0600
Message-ID: <20051010133730.GA98353@winnie.fuhr.org> (raw)
In-Reply-To: <01c201c5cd84$4a2568f0$b901a8c0@sdp.org>
References: <01c201c5cd84$4a2568f0$b901a8c0@sdp.org>

On Mon, Oct 10, 2005 at 03:20:47PM +0500, M. Imran wrote:
> 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
> 
> select distinct(code), id  from table

It's not clear what you're trying to do.  Could you post a sample
table and data set (CREATE TABLE and INSERT statements) and an
example of the results you'd like to see?

BTW, this seems off-topic for pgsql-admin, which is supposed to be
for discussions of PostgreSQL administration.  A more appropriate
list might be pgsql-general, pgsql-novice, or pgsql-sql.

-- 
Michael Fuhr



view thread (2+ messages)

Message-ID: <20051010133730.GA98353@winnie.fuhr.org>
Permalink:  ../20051010133730.GA98353@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20051010133730.GA98353@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mike@fuhr.org, imran@sdpi.org
  Subject: Re: Query Question
  In-Reply-To: <20051010133730.GA98353@winnie.fuhr.org>
  References: <01c201c5cd84$4a2568f0$b901a8c0@sdp.org> <20051010133730.GA98353@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox