pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Query Question
2+ messages / 2 participants
[nested] [flat]

* Query Question
@ 2005-10-10 10:20  M. Imran <imran@sdpi.org>
  0 siblings, 1 reply; 2+ messages in thread

From: M. Imran @ 2005-10-10 10:20 UTC (permalink / raw)
  To: pgsql-admin

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 

select distinct(code), id  from table

Regards,
imran

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Query Question
@ 2005-10-10 13:37  Michael Fuhr <mike@fuhr.org>
  parent: M. Imran <imran@sdpi.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Fuhr @ 2005-10-10 13:37 UTC (permalink / raw)
  To: M. Imran <imran@sdpi.org>; +Cc: pgsql-admin

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-10-10 13:37 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-10 10:20 Query Question M. Imran <imran@sdpi.org>
2005-10-10 13:37 ` Michael Fuhr <mike@fuhr.org>

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