ksherlock@xxxxxxxxx wrote: > You could use COUNT() in conjunction with NULLIF: > > select "Type", > count(nullif("Active", false)) as "Active Count", > count(nullif("Active", true)) as "Inactive Count", > 100 * count(nullif("Active", false)) / count(*) as "Active Percent" > from table_name group by "Type" Tom Lane suggested me to use sum("Active"::int) in a similar situation; Except that I had boolean expressions instead of values. It is a bit faster; IMO readability is just "different". -- Alban Hertroys alban@xxxxxxxxxxxxxxxxx magproductions b.v. T: ++31(0)534346874 F: ++31(0)534346876 M: I: www.magproductions.nl A: Postbus 416 7500 AK Enschede // Integrate Your World //