Olaf Zanger writes: > i'd like to add up the "true" values of a comparison like > > sum(a>b) sum(case when a>b then 1 else 0 end) of maybe even just select count(*) from table where a>b; -- Peter Eisentraut [EMAIL PROTECTED] http://yi.org/peter-e/
- [SQL] sum(bool)? Olaf Zanger
- [SQL] sum(bool)? Peter Eisentraut
- [SQL] sum(bool)? Daniel Wickstrom
- Re: [SQL] sum(bool)? Andrew Perrin
- Re: [SQL] sum(bool)? Tod McQuillin
- Re: [SQL] sum(bool)? Olaf Zanger
- [SQL] sum(bool)? Olaf Marc Zanger
- Re: [SQL] sum(bool)? Oliver Elphick
- Fwd: Re: [SQL] sum(bool)? J.Fernando Moyano
- Re: Fwd: Re: [SQL] sum(bool)? D'Arcy J.M. Cain