
Originariamente inviata da
badaze
Sicuro che valore è di tipo text ? In SQL il valore di un text è tra apici : valore = '0'
select
sum(case when valore = '0' then 1 else 0 end) as campo1,
sum(case when valore > '0' then 1 else 0 end) as campo2
from tabella
se non funziona la soluzione è comunque molto vicina.