Stats reports on a per-category basis?

Thanks for this, it’s exactly what I needed (and also has me digging more into what I can query). I added to the SELECT statement to get the count of replies in a topic

 sum(t.reply_count) replies,