SQL
x
WITH RECURSIVE articles (page_title, page_id, page_namespace, inc, parent_title, parent_namespace, page_len) AS (
(
SELECT page_title, page_id, page_namespace, 1, page_title, page_namespace
FROM page
WHERE page_title IN ("Populated_places_in_Azerbaijan_by_district")
AND page_namespace = 14
)
UNION
(
SELECT child.page_title, child.page_id, child.page_namespace, inc + 1, parent.page_title, parent.page_namespace
FROM page AS child
JOIN categorylinks as childLinks ON child.page_id = childLinks.cl_from
JOIN get_name_dabs AS parent ON childLinks.cl_to = parent.page_title
LEFT JOIN page_props ON childLinks.cl_from = pp_page AND pp_propname = "hiddencat"
WHERE (child.page_namespace = 14
OR child.page_namespace = 0)
AND parent.page_namespace = 14
AND pp_propname IS NULL
#AND inc < 4
)
),
articles_carl AS (
SELECT *
FROM articles
JOIN revision_userindex on page_id = rev_page
WHERE rev_parent_id = 0
AND rev_actor = 10795
AND page_is_redirect = 0
AND page_namespace = 0
)
SELECT page_title, page_len, rev_size, (CAST(page_len AS SIGNED) - CAST(rev_size AS SIGNED)) as Growth, rev_timestamp
FROM articles_carl
ORDER BY page_title ASC
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.