Re: sum(bool)?

Поиск
Список
Период
Сортировка
От Olaf Zanger
Тема Re: sum(bool)?
Дата
Msg-id 3A96888E.2292D998@soli-con.com
обсуждение исходный текст
Ответ на Re: sum(bool)?  (Tod McQuillin <devin@spamcop.net>)
Список pgsql-sql
hi there,

soooo cool, 
this works streight away and took 5 min. waiting for a answer :-)

thanks very much to you tod personal and the mailing list for existence.

Olaf

Tod McQuillin schrieb:
> 
> On Fri, 23 Feb 2001, Olaf Zanger wrote:
> 
> > i'd like to add up the "true" values of a comparison like
> >
> > sum(a>b)
> >
> > it just doesn't work like this
> 
> Try
> 
>  sum(case when a>b then 1 else 0 end)
> --
> Tod McQuillin

-- 
soli-con Engineering Zanger
Dipl.-Ing. (FH) Olaf Marc Zanger
Lorrainestrasse 23
3013 Bern / Switzerland
Fon: +41-31-332 9782
Mob: +41-76-572 9782
mailto:info@soli-con.com
mailto:olaf.zanger@soli-con.com
http://www.soli-con.com


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: sum(bool)?
Следующее
От: Andrew Perrin
Дата:
Сообщение: Re: sum(bool)?