Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Top 500 least link-dense articles in WikiProject
by
StefenTower
This query is marked as a draft
This query has been published
by
StefenTower
.
This uses your project's category of included articles/pages, esp. for cases where the project template doesn't directly indicate the project involved. These are mainspace pages, excluding redirects and disambiguation pages, thus genuine articles.
Toggle Highlighting
SQL
SELECT subjectpage.page_title AS 'Article', SUBSTRING_INDEX(cl2.cl_to, "-", 1) AS 'Rating', SUBSTRING_INDEX(cl3.cl_to, "-", 1) AS 'Importance', ( SELECT COUNT(*) FROM page p INNER JOIN linktarget lt ON lt.lt_title = subjectpage.page_title INNER JOIN pagelinks pl ON pl.pl_target_id = lt.lt_id INNER JOIN page p2 ON p2.page_id = pl.pl_from WHERE p.page_id = p2.page_id AND lt.lt_namespace = 0 ) AS incominglinks FROM page AS subjectpage INNER JOIN page AS talkpage on subjectpage.page_title = talkpage.page_title INNER JOIN categorylinks cl1 ON cl1.cl_from = talkpage.page_id LEFT JOIN categorylinks AS cl2 ON cl2.cl_from = talkpage.page_id AND cl2.cl_to REGEXP "^\\w+-Class_Louisville_articles$" -- substitute your project BASE category name for the rating LEFT JOIN categorylinks AS cl3 ON cl3.cl_from = talkpage.page_id AND cl3.cl_to REGEXP "^\\w+-importance_Louisville_articles$" -- substitute your project BASE category name for project importance WHERE cl1.cl_to = 'WikiProject_Louisville_articles' AND subjectpage.page_namespace = 0 AND subjectpage.page_is_redirect = 0 AND talkpage.page_namespace = 1 AND talkpage.page_id NOT IN ( SELECT page_id FROM page AS dabtalkpage INNER JOIN categorylinks ON cl_from = dabtalkpage.page_id WHERE cl_to = 'Disambig-Class_Louisville_articles' ) ORDER BY incominglinks ASC, subjectpage.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
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...