Sort or Order post with combination of both (Replies + Activity)

I am looking for a way if can sort or order the users posts while combining both (Replies + Activity)

Selecting only one of them does not do well as then I either miss the posts with fewer replies or miss the activity when was the last time someone worked on it.

It will be great to select both fields together to filter the result. But I do not know how to do it and asking for help here.

Thanks

I don’t believe that’s possible through the UI currently, though I think you should be able to create a data-explorer query that could function in a similar way?

2 Likes

Hi @JammyDodger ,

Thanks for the reply.

That can also work as an alternative because the end goal is to have something on our side.

Can you please explain as how it can be done?

appreciate you help

Thanks

While I was having a go at creating a query for this it occurred to me that there are a couple of options in the advanced Search filter that may also be of use. In there you can set a maximum number of posts, a before or after date, as well as adding in whether they’re open or not, limit it to a specific category, etc,etc. That may be a more accessible way for more people to get something similar to what you’re looking for.

However, I think a data-explorer query could also do the job too, and may be more customizable too depending on what you need. Maybe something like this:


-- [params]
-- int :number_of_posts

SELECT t.category_id,
       t.id AS topic_id,
       t.created_at::date
FROM topics t
WHERE t.posts_count < :number_of_posts
AND t.archetype = 'regular'
AND t.closed = false
AND t.deleted_at IS NULL
AND t.created_at >= CURRENT_DATE - INTERVAL '1 WEEK'
ORDER BY t.created_at DESC

Which would pull out all topics with fewer than x amount of replies that were created in the last week (not closed, not deleted, not PM).

Is that close to what you had in mind?