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
Tflanagan (WMF)
.
Need to combine the two tables on article_page_title and article_user_id = user_id works here http://quarry.wmflabs.org/query/5068
Toggle Highlighting
SQL
USE arwiki_p; #set the language/project database SELECT a.article_course_id, a.article_user_id, a.article_page_title, SUM(CAST(r.rev_len as signed) - CAST(COALESCE(p.rev_len,0) as signed)) AS bytes_added, COUNT(r.rev_id) AS edit_count FROM ep_articles a JOIN revision r ON r.rev_page = a.article_page_id LEFT OUTER JOIN revision p ON p.rev_id = r.rev_parent_id WHERE article_course_id IN (63) GROUP BY article_page_title ORDER BY bytes_added DESC;
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...