Fork of
Uncategorized categories (zhwiki_p)
by Tjmj
This query is marked as a draft
This query has been published
by Enhancing999.
SQL
x
/** Test **/
SELECT
page_title as category,
actor_name as last_user,
left(rev_timestamp,12) as last_edit,
cat_pages as cat_size,
page_len as text_size,
page_is_new,
pp_value as wikidata_item,
page_id
FROM page_props
RIGHT JOIN (
SELECT
page_title,
page_len,
cat_pages,
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
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 10
) 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'
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.