Query - Mailing list pgsql-general

From dayzman@hotmail.com (Michael)
Subject Query
Date
Msg-id 48e30213.0406152231.6e19331c@posting.google.com
Whole thread Raw
List pgsql-general
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? Also, if I want to find how many of those that have
a different "d", can I use "select count(d) from R goup by title ||
author"? What if b and c are integers, then I wouldn't be able to
concatenate the 2 fields right?

Please help.

Thanks,
Michael

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Postgresql installation.
Next
From: Tom Lane
Date:
Subject: Re: Using Large Object in PostgreSQL