[EMAIL PROTECTED] 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
Hi,
I have a question about using Group By.
On a table like this:
Type (varchar) | Active (boolean)
Type One | False
Type Two | True
Type One | True
Type Fifty | Flase
Thank you! Exactly what I needed.
Mike
On Feb 23, 4:42 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> 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(nu
Hi,
I have a question about using Group By.
On a table like this:
Type (varchar) | Active (boolean)
Type One | False
Type Two | True
Type One | True
Type Fifty | Flase
Typ
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"
On Feb 23, 2:50 pm, "Mike" <[E