Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Important articles without portal links (2010s test)
by
Certes
This query is marked as a draft
This query has been published
by
Certes
.
Toggle Highlighting
SQL
SELECT STRAIGHT_JOIN Pp.page_title AS Portal, SUBSTRING_INDEX(Ct.cl_to, "-", 1) AS Importance, SUBSTRING_INDEX(Cq.cl_to, "_", 1) AS Quality, Pa.page_title AS Article FROM page Pp JOIN categorylinks Ct ON Ct.cl_type="page" AND Ct.cl_to IN (CONCAT("Top-importance_",Pp.page_title,"_articles"), CONCAT("High-importance_",Pp.page_title,"_articles"), CONCAT("Top-importance_",LOWER(SUBSTRING(Pp.page_title,1,1)),SUBSTRING(Pp.page_title FROM 2),"_articles"), CONCAT("High-importance_",LOWER(SUBSTRING(Pp.page_title,1,1)),SUBSTRING(Pp.page_title FROM 2),"_articles")) JOIN page Pt ON Pt.page_id=Ct.cl_from AND Pt.page_namespace=1 /* Talk page */ JOIN page Pa ON Pa.page_namespace=0 AND Pa.page_title=Pt.page_title /* Article */ LEFT JOIN categorylinks Cq ON Cq.cl_type="page" AND Cq.cl_to IN ("Featured_articles", "Good_articles") WHERE Pp.page_namespace=100 AND Pp.page_id IN (SELECT cl_from FROM categorylinks Cp WHERE Cp.cl_type="page" AND Cp.cl_to="Portals_needing_placement_of_incoming_links") AND NOT EXISTS (SELECT 1 FROM pagelinks WHERE pl_from=Pa.page_id AND pl_title=Pp.page_title AND pl_namespace=100) ORDER BY Portal, Importance DESC, ISNULL(Quality, "Z"), Article
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...