Search Postgresql Archives

Re: Get COUNT results from two different columns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23/09/2021 14:37, Clive Swan wrote:
Greetings,

I have two separate queries that work individually, returning a count from each column.

I want to subtract New(COUNT) from Old(Count)

I get an error when trying to run UNION?

At a quick guess, you'll need to move the subtraction outside the two subqueries - stuff inside either query can't see anything in the other one.

Ray.


--
Raymond O'Donnell // Galway // Ireland
ray@xxxxxxxxxxxx





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux