Well, without the average you can do:
SELECT t.ID,
count(case when A between 2 and 4 then ID end),
AVG(case when B between 19 and 40 then B end),
COUNT(case when C between 12 and 14 then id end)
FROM t
GROUP BY ID with rollup
Which I would write as:
SELECT t.ID,
sum(case when A between 2 and 4 then 1 else 0 end),
sum(case when B between 19 and 40 then B end)/sum((case when B between 19 and 40 then B end),
sum(case when C between 12 and 14 then 1 else end)
FROM t
GROUP BY ID with rollup
I'm not sure how rollup works with avg, so the final version is:
select coalesce(t.ID, 'Overall'), Acnt,
(case when Bcnt > 0 then Bsum/Bcnt end),
Ccnt
from (select t.ID,
sum(case when A between 2 and 4 then 1 else 0 end) as Acnt,
sum(case when B between 19 and 40 then B end) as Bsum,
sum(case when B between 19 and 40 then B end) as Bcnt,
sum(case when C between 12 and 14 then 1 else end) as Ccnt
FROM t
GROUP BY ID with rollup
) t