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)
.
Proof of concept. Calculating total edit size (bytes) and count for specific user.
Toggle Highlighting
SQL
# DESCRIBE arwiki_p.revision; SELECT user_name, /*user_id, rev.rev_id, rev.rev_parent_id, rev.rev_len AS rev_len, parent.rev_len AS parent_rev_len,*/ SUM(CAST(rev.rev_len as signed)-CAST(parent.rev_len as signed)) AS edit_size, COUNT(rev.rev_id) as edit_bytes FROM arwiki_p.user JOIN arwiki_p.revision rev ON user_id = rev.rev_user JOIN arwiki_p.revision parent #self join for parent length ON rev.rev_parent_id = parent.rev_id WHERE user_name = "TFlanagan-WMF" GROUP BY user_name
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...