Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
SnowFire
.
Toggle Highlighting
SQL
WITH RECURSIVE articles AS ( SELECT DISTINCT(Article.page_title), Article.page_id, Talk.page_id AS talk_id, rev_timestamp, rev_len as "InitialSize", Article.page_len as "CurrentSize" FROM revision_userindex JOIN page AS Article ON Article.page_id = rev_page AND Article.page_namespace = 0 JOIN page AS Talk ON Article.page_title = Talk.page_title AND Talk.page_namespace = 1 JOIN categorylinks AS TalkCat ON TalkCat.cl_from = Talk.page_id WHERE rev_parent_id = 0 AND Article.page_is_redirect = 0 AND TalkCat.cl_to = "Sports_and_games_work_group_articles" AND Article.page_len < 80000 ), sports AS ( SELECT DISTINCT(CONCAT("stub-class_", LOWER(CONVERT(RIGHT(page_title, LENGTH(page_title) - 12) USING latin1)), "_articles")) AS stubc FROM page JOIN categorylinks ON cl_from = page_id WHERE cl_to = "Sports-related_WikiProjects" ) SELECT page_title, CurrentSize AS sport FROM articles JOIN categorylinks ON cl_from = talk_id AND EXISTS (SELECT 1 FROM sports WHERE LOWER(CONVERT(cl_to USING latin1)) = stubc) ORDER BY sport, page_title LIMIT 1
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...