This query is marked as a draft This query has been published by XXN.

SQL

AخA
 
USE rowiki_p;
SELECT pl_title, COUNT(pl_title)
FROM pagelinks
JOIN categorylinks
    ON pl_from = cl_from
WHERE pl_from_namespace = 0 and pl_namespace = 0 and pl_title like "District%"
    AND cl_to like "Sate_în_jude%"
    AND NOT EXISTS (
      SELECT *
      FROM page
      WHERE pl_title = page_title
        AND page_namespace = 0
    )
    group by pl_title
#    having COUNT(pl_title) > 4
ORDER BY COUNT(pl_title) 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.

Checking query status...