Query

From: dayzman(at)hotmail(dot)com (Michael)
To: pgsql-general(at)postgresql(dot)org
Subject: Query
Date: 2004-06-16 06:31:42
Message-ID: 48e30213.0406152231.6e19331c@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

  • Re: Query at 2004-06-16 18:14:07 from Ed prochak
  • Re: Query at 2004-06-16 20:35:41 from Laconic2

Browse pgsql-general by date

  From Date Subject
Next Message zuhans@iname.com 2004-06-16 06:55:08 why no answer? [Fwd: backup and restore just with use of jdbc?]
Previous Message Martijn van Oosterhout 2004-06-16 06:12:13 Re: Multicolumn indexes and ORDER BY