This query is marked as a draft This query has been published by Matěj Suchánek.

SQL

AخA
 
USE cswiki_p;
DESCRIBE templatelinks;
SELECT page_title, anon, liu FROM categorylinks
    JOIN page
        ON cl_from = page_id
    JOIN (SELECT rev_page, COUNT(*) AS anon FROM revision WHERE rev_user > 0) AS anon
        ON anon = page_id
    JOIN (SELECT rev_page, COUNT(*) AS liu FROM revision WHERE rev_user > 0) AS liu
        ON liu = page_id
    JOIN templatelinks AS ib
        ON ib.tl_from = page_id AND ib.tl_namespace = 10 AND ib.tl_title LIKE "Infobox%"
    JOIN templatelinks AS nb
        ON nb.tl_from = page_id AND nb.tl_namespace = 10 AND nb.tl_title IN (
            SELECT page_title FROM templatelinks
                JOIN page ON page_id = tl_from
                WHERE tl_title = "Navbox" AND tl_namespace = 10 AND tl_from_namespace = 10
        )
    JOIN pagelinks AS portal
        ON pl_from = page_id AND pl_namespace = 100
WHERE cl_to = "Ialští malíři"
GROUP BY page_id
LIMIT 10;
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.

Checking query status...