Re: Counting booleans for two columns - Mailing list pgsql-novice

From Rikard Bosnjakovic
Subject Re: Counting booleans for two columns
Date
Msg-id d9e88eaf0911200818q65016dbao6d6c8f1d86916aac@mail.gmail.com
Whole thread Raw
In response to Re: Counting booleans for two columns  (Thom Brown <thombrown@gmail.com>)
List pgsql-novice
On Fri, Nov 20, 2009 at 16:11, Thom Brown <thombrown@gmail.com> wrote:

[...]
> SELECT sum(played::integer), sum(stats_exists::integer)
> FROM matches
> WHERE origin=1 AND NOT training AND match_date > '2009-08-01';

Thank you Thom and Oliveiros, this works perfect.

(I had to use Thom's case-code since the web hotel is still using
Postgres 7.4.6, so the boolean->integer cast did not work)


--
- Rikard

pgsql-novice by date:

Previous
From: Thom Brown
Date:
Subject: Re: Counting booleans for two columns
Next
From: Démi Zsolt
Date:
Subject: pgsql cluster