Re: Query - Mailing list pgsql-general

From Laconic2
Subject Re: Query
Date
Msg-id 84GdnbDDS-xeM03dRVn-tw@comcast.com
Whole thread Raw
In response to Query  (dayzman@hotmail.com (Michael))
List pgsql-general
"Michael" <dayzman@hotmail.com> wrote in message
news:48e30213.0406152231.6e19331c@posting.google.com...
> Hi,
> If I have R(a integer PRIMARY KEY, b text, c text, d integer); and I
> want to find how many different entries there are, (specified using b
> and c instead of a), is "select count(distinct b||c) from R" an
> appropriate query?


Try:

select count(1) from
(select distinct b, c from R);

However, your prof may not like this answer.




pgsql-general by date:

Previous
From: ed.prochak@magicinterface.com (Ed prochak)
Date:
Subject: Re: Query
Next
From: mike g
Date:
Subject: Re: PostGres ODBC MFC Application