Awesome, thanks a lot for the hints.
I was able to build it. Might not be perfect, but If anyone else finds it useful:
New topics per tag
-- [params]
-- int :months_ago = 0
WITH query_period as (
SELECT
date_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' as period_start,
date_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' + INTERVAL '1 month' - INTERVAL '1 second' as period_end
)
SELECT
tags.name,
count(1) as topic_count
FROM topics t
RIGHT JOIN topic_tags tt
ON t.id = tt.topic_id
RIGHT JOIN tags tags
ON tt.tag_id = tags.id
RIGHT JOIN query_period qp
ON t.created_at >= qp.period_start
AND t.created_at <= qp.period_end
WHERE t.user_id > 0
AND tt.topic_id IS NOT NULL
GROUP BY tags.name
ORDER BY topic_count DESC