count( only if true) - Mailing list pgsql-general

From peter pilsl
Subject count( only if true)
Date
Msg-id 434D58FA.2080704@goldfisch.at
Whole thread Raw
Responses Re: count( only if true)  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: count( only if true)  (Martín Marqués <martin@bugs.unl.edu.ar>)
List pgsql-general
the count-aggreate counts every expression that does not evaluate to null.

I would like to have a count that counts all values that are true.

Do I really need to make a count( case when expression then 't' else
null) to implement this?

thnx,
peter


--
mag. peter pilsl
goldfisch.at
IT-management
tel +43 699 1 3574035
fae +43 699 4 3574035
pilsl@goldfisch.at

pgsql-general by date:

Previous
From: Jussi Mikkola
Date:
Subject: Re: [pgsql-advocacy] Oracle buys Innobase
Next
From: "A. Kretschmer"
Date:
Subject: Re: count( only if true)