RE: Get COUNT results from two different columns

Поиск
Список
Период
Сортировка
От SQL Padawan
Тема RE: Get COUNT results from two different columns
Дата
Msg-id P_uiZUR4inQ8pRoFheaMsOm9ho0Eo6F8tO3rSbdLRQo-vexNeohsVfUrk2d0YJFqrEejlH4yt6PfShetrVrpDbDmaOxKnbmZ2JXUdYq2MdQ=@protonmail.com
обсуждение исходный текст
Ответ на RE: Get COUNT results from two different columns  ("Clive Swan" <cliveswan@gmail.com>)
Ответы RE: Get COUNT results from two different columns  ("Clive Swan" <cliveswan@gmail.com>)
Список pgsql-general
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
havetwo different names. 


HTH,

SQL Padawan





В списке pgsql-general по дате отправления:

Предыдущее
От: Ray O'Donnell
Дата:
Сообщение: Re: Get COUNT results from two different columns
Следующее
От: Marc Olivé
Дата:
Сообщение: Re: Get COUNT results from two different columns