Re: [SQL] DISTINCT count(*), possible?

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: pgsql-sql(at)postgreSQL(dot)org, matthew(at)venux(dot)net
Subject: Re: [SQL] DISTINCT count(*), possible?
Date: 1999-06-16 10:32:31
Message-ID: l03130301b38d2ad5bfaa@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Vince Vielhaber 1999-06-16 10:48:45 Re: [HACKERS] Postgres mailing lists
Previous Message Bruce Momjian 1999-06-16 10:12:55 Re: [HACKERS] Postgres mailing lists