Re: Need Help : Query problem

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: Abdul Wahab Dahalan <wahab(at)mimos(dot)my>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Need Help : Query problem
Date: 2003-11-19 10:34:45
Message-ID: FE37527E-1A7B-11D8-B800-0005029FC1A7@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Wednesday, November 19, 2003, at 10:26 AM, Abdul Wahab Dahalan wrote:
>
> How do I write a query so that I can get a result as below
> [ select only a record/s with same kk and kj but different pngk.
> For example here I've 3 records with same kk=01,kj=01 but diff
> pngk=a,b,c
> and 2 records with same kk=01,kj=02 but diff pngk=a,b]

I think you'll want to take a look at using GROUP BY

<http://www.postgresql.org/docs/7.4/static/queries-table-
expressions.html#queries-group>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2003-11-19 20:42:31 Re: Substrings by Regular Expression
Previous Message Achilleus Mantzios 2003-11-19 08:19:08 Re: Arrays - a good idea?