codice:select sum(case when valore1 < 1 then 1 else 0 end) as minori_1, sum(case when valore1 between 1 and 2 then 1 else 0 end) as tra_1_e_2 , sum(case when valore1 > 2 then 1 else 0 end) as maggiori_2 from .....
codice:select sum(case when valore1 < 1 then 1 else 0 end) as minori_1, sum(case when valore1 between 1 and 2 then 1 else 0 end) as tra_1_e_2 , sum(case when valore1 > 2 then 1 else 0 end) as maggiori_2 from .....