Fork of
most edited visual arts articles
by Vexations
This query is marked as a draft
This query has been published
by StefenTower.
SQL
AخA
# Most edited Louisville area-related articles
SELECT COUNT(*) AS 'Edit Count', article.page_title AS 'Article', MAX(rev_len) AS 'Max Size (Bytes)', MIN(rev_len) AS 'Min Size (Bytes)',
SUBSTRING_INDEX(cl2.cl_to, "-", 1) AS 'Rating'
FROM page AS article
INNER JOIN page AS talk on article.page_title = talk.page_title
INNER JOIN categorylinks AS cl1 ON cl1.cl_from = talk.page_id
INNER JOIN revision ON rev_page = article.page_id
LEFT JOIN categorylinks AS cl2 ON cl2.cl_from = talk.page_id
AND cl2.cl_to REGEXP "^\\w+-Class_Louisville_articles$" -- substitute your project BASE category name for the rating
WHERE rev_timestamp > (NOW() - INTERVAL 7 DAY)
AND cl1.cl_to = 'WikiProject_Louisville_articles' -- substitute your project category of included articles, pages, etc.
AND article.page_namespace = 0
AND talk.page_namespace = 1
GROUP BY article.page_title
ORDER BY COUNT(*) DESC
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.