Du kan sandsynligvis gøre dette med en underforespørgsel og derefter producere og aggregere disse data. Prøv noget i stil med dette:
select week,
count(*) as total,
sum(technical) as technical,
sum(non_technical) as non_technical)
from(
select week,
case(type) when 'Technical' then 1 else 0 END as technical,
case(type) when 'Non-Technical' then 1 else 0 END as non_technical
) as data
GROUP BY week