Edit sort by Categories

Sort by the number of tags (sum) for each category descending
This will allow the most used categories to appear first and not by alphabetical order
This commit is contained in:
MetallicAchu 2021-06-17 09:50:06 +03:00 committed by Shish
parent 8bd781cc8c
commit d79430be1e
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ class TagEditCloud extends Extension
SELECT tag, FLOOR(LN(LN(count - :tag_min1 + 1)+1)*150)/200 AS scaled, count
FROM tags
WHERE count >= :tag_min2
ORDER BY CASE
ORDER BY SUM(count) OVER (PARTITION BY SUBSTRING_INDEX(tag, ':', 1)) DESC, CASE
WHEN tag LIKE '%:%' THEN 1
ELSE 2
END, tag