select year(year_month) as year
, sum(registo_de_marcas) as trademarks
, sum(inven_es) as inventions
, sum(design) as designs
from @ptgov.propriedadeindustrial.propriedadeindustrial
where year(year_month) < 2025
group by 1
order by 1;