Search Postgresql Archives

RE: Get COUNT results from two different columns

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

 



Hi,


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

> I would appreciate any pointers.

>     new_sup,  COUNT(new_sup) AS new_sup_count

>     old_sup,  COUNT(old_sup) AS old_sup_count

At least some of your problem is here - in your UNION-ed table, this is one and the same field and therefore cannot have two different names.


HTH,

SQL Padawan








[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