How do I count topics in sub-categories?


(Opus K) #1

I do not need to display it to anyone. I just want to see how many topics are in my sub-categories by Admin.

While it’s easy to see the top-categories, we’re not looking for those features in sub-categories.

Are these features basically missing?
If it is not, I would appreciate it if anyone let me know how it works :slight_smile:


(Joshua Rosenfeld) #2

The quickest way is likely to open the sub-category edit page and try to click delete. It will fail as there are topics, but the message will give you the number of topics. Alternatively, you could write a simple Data Explorer query.


(Opus K) #3

Oh, that’s a very simple way!
However, I can not see it at a glance in Admin Page … :frowning:

Anyway, it seems to be good to use as it is urgent.
Your answers are a big help because I am in a hurry right now. :slight_smile:


(Joshua Rosenfeld) #4

Here are some quick Data Explorer queries in case you need to do this more in the future.

Query to get topic count for one category (or subcategory).

-- [params]
-- null string_list :category_name
SELECT topic_count FROM categories
WHERE categories.name = :category_name

Query to list all categories (and subcategories) and their topic counts:

SELECT name, topic_count FROM categories

(Opus K) #5

Wow!
It will help me a lot in the future.

Thank you for your kind reply :slight_smile: