Re: Question about a query with two count fields

Поиск
Список
Период
Сортировка
От Rodrigo De León
Тема Re: Question about a query with two count fields
Дата
Msg-id a55915760709110902g4fc7fa16g8c3227a4bb5a94ed@mail.gmail.com
обсуждение исходный текст
Ответ на Question about a query with two count fields  (Jeff Lanzarotta <delux256-postgresql@yahoo.com>)
Ответы Re: Question about a query with two count fields  ("Rodrigo De León" <rdeleonp@gmail.com>)
Список pgsql-general
On 9/11/07, Jeff Lanzarotta <delux256-postgresql@yahoo.com> wrote:
> I appreciate the help...

SELECT   TO_CHAR(ts, 'MM/DD/YYYY') AS "day", str, proc
       , SUM(CASE
               WHEN z <> 0
                 THEN 1
               ELSE 0
             END) AS good, 0 AS ajaaaaaaaaaaaaaa
       , SUM(CASE
               WHEN z = 0
                 THEN 1
               ELSE 0
             END) AS bad
    FROM foobar
   WHERE str <> 99999
GROUP BY str, DAY, proc
ORDER BY str

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

Предыдущее
От: "George Pavlov"
Дата:
Сообщение: Re: Question about a query with two count fields
Следующее
От: "Dmitry Koterov"
Дата:
Сообщение: Sthange things happen: SkyTools pgbouncer is NOT a balancer