Re: Counting boolean values (how many true, how many false)

From: "Marc Mamin" <M(dot)Mamin(at)intershop(dot)de>
To: André Fernandes <andre(dot)de(dot)camargo(dot)fernandes(at)hotmail(dot)com>, <alexander(dot)farber(at)gmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Counting boolean values (how many true, how many false)
Date: 2010-11-17 20:39:05
Message-ID: C4DAC901169B624F933534A26ED7DF31034BB907@JENMAIL01.ad.intershop.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

sum(case when fair then 1 else 0 end) as fair,
=>
sum(case when fair then 1 end) as fair,

:)

regards,

Marc Mamin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dimitri Fontaine 2010-11-17 20:55:49 Re: Can you check in SQL if a fields can be encoded using specified charset
Previous Message Scott Mead 2010-11-17 20:22:00 Re: Survey on backing up unlogged tables: help us with PostgreSQL development!