pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: pgsql-sql@postgreSQL.org
To: matthew@venux.net
Subject: Re: [SQL] DISTINCT count(*), possible?
Date: Wed, 16 Jun 1999 13:32:31 +0300
Message-ID: <l03130301b38d2ad5bfaa@[147.233.159.109]> (raw)
In-Reply-To: <v04020a00b38d1337fb45@[128.40.242.190]>

At 11:55 +0300 on 16/06/1999, Stuart Rison wrote:


> A previously posted work-around (search the GENERAL mailing list with
> 'count', 'DISTINCT' and 'Herouth') adapted to your query is:
>
> SELECT count(*)
> FROM aro t1
> WHERE int( oid ) = (
> 	SELECT min( int( t2.oid ) )
> 	FROM test t2
> 	WHERE t2.address1 = t1.address1
> );

Since I apparently own the copyright for this solution :-)

The internal FROM should read "FROM aro t2", not "FROM test t2".

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma





view thread (8+ messages)  latest in thread

Message-ID: <l03130301b38d2ad5bfaa@[147.233.159.109]>
Permalink:  ../l03130301b38d2ad5bfaa@%5B147.233.159.109%5D/
Also on:    postgresql.org/message-id/l03130301b38d2ad5bfaa@[147.233.159.109]

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: herouth@oumail.openu.ac.il, matthew@venux.net
  Subject: Re: [SQL] DISTINCT count(*), possible?
  In-Reply-To: <l03130301b38d2ad5bfaa@[147.233.159.109]>
  References: <v04020a00b38d1337fb45@[128.40.242.190]> <l03130301b38d2ad5bfaa@[147.233.159.109]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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