Fork of
Uncategorized categories (zhwiki_p)
by Tjmj
This query is marked as a draft
This query has been published
by Enhancing999.
SQL
x
/** Special:UncategorizedCategories
stats
Executed in 1344.80 seconds as of Sun, 25 Aug 2024 10:02:17 UTC: 1038 rows
Executed in 722.72 seconds as of Sun, 25 Aug 2024 11:49:41 UTC: 995 rows
Executed in 815.74 seconds as of Mon, 26 Aug 2024 10:00:04 UTC: 902 rows. Replication lag 13 minutes
Executed in 2173.28 seconds as of Mon, 26 Aug 2024 14:17:04 UTC: 818 rows
Executed in 2437.08 seconds as of Mon, 26 Aug 2024 16:59:11 UTC: 762 rows. Replication lag 40 minutes
Executed in 1905.38 seconds as of Tue, 27 Aug 2024 08:12:07 UTC: 734 rows. Replication lag 31 minutes
Executed in 2041.45 seconds as of Tue, 27 Aug 2024 16:04:26 UTC: 692 rows. Replication lag 32 minutes
Executed in 1629.18 seconds as of Thu, 29 Aug 2024 07:33:52 UTC: 524 rows. Replication lag 27 minutes
Executed in 1953.33 seconds as of Fri, 30 Aug 2024 08:33:37 UTC: 499 rows. Replication lag 32 minutes
Executed in 2050.39 seconds as of Sun, 01 Sep 2024 09:31:16 UTC: 286 rows. Replication lag 34 minutes
**/
SELECT
page_title as category,
cat_pages as cat_size,
cat_content,
page_len as text_size,
actor_name as last_user,
left(rev_timestamp,12) as last_edit,
length(page_title) as len_name,
page_is_new as is_new,
pp_value as wikidata,
page_id
FROM page_props
RIGHT JOIN (
SELECT
page_title,
page_len,
cat_pages, cat_content,
rev_timestamp, page_is_new,
actor_name, page_id
FROM
revision
JOIN actor ON rev_actor = actor_id
JOIN (
SELECT
page_id,
page_title,
page_len, page_is_new,
cat_pages,
if (cat_pages = 0, "-", if (cat_pages = cat_subcats, "S", if(cat_pages = cat_files, "F", "S+F"))) as cat_content
FROM
category
RIGHT JOIN page ON cat_title = page_title
LEFT JOIN categorylinks ON page_id = cl_from
WHERE
cl_from IS NULL
AND page_namespace = 14
AND page_is_redirect = 0
LIMIT 2000
) AS pagetmp ON rev_page = pagetmp.page_id
AND rev_timestamp = (
SELECT
MAX(rev_timestamp)
FROM
revision AS last
WHERE
last.rev_page = pagetmp.page_id
)
) AS pagetmp2 ON pp_page = pagetmp2.page_id
AND pp_propname='wikibase_item'
HAVING (page_title <> "CommonsRoot")
ORDER BY page_id DESC
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.