From: Gerardo Herzig <gherzig@fmed.uba.ar>
To: pgsql-sql@postgresql.org
Subject: union with count?
Date: Wed, 28 Mar 2007 11:04:29 -0300
Message-ID: <460A75ED.6070501@fmed.uba.ar> (raw)
Hi dudes, i have the following question
i have 2 tables with the same format, and i want to know if is there a
possibility of using some sort of count(*) for achieving this result:
select a from table1 where (condition) union select a from table2 where
(condition), count(a) group by a
The idea is having how many times (condition) is true for both tables.
Im not shure im explaining myself clearly, my english is not the best
(as you can see ;)
Thanks!
Gerardo
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: gherzig@fmed.uba.ar
Subject: Re: union with count?
In-Reply-To: <460A75ED.6070501@fmed.uba.ar>
* 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