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
Aram
.
Toggle Highlighting
SQL
USE ckbwiki_p; -- Subquery to get the first edit for each article WITH FirstEdits AS ( SELECT rev_page, MIN(rev_id) AS first_revision_id FROM revision WHERE rev_parent_id = 0 AND DATE(rev_timestamp) BETWEEN '2023-01-01' AND '2023-05-01' GROUP BY rev_page ) -- Query to retrieve the summation of the original sizes for all articles SELECT user.user_name AS username, COUNT(*) AS NumberOfArticles, SUM(FirstEdits.first_revision_size) AS TotalOriginalBytes FROM ( SELECT rev_id AS first_revision_id, rev_page AS first_revision_page, rev_len AS first_revision_size FROM revision WHERE rev_id IN (SELECT first_revision_id FROM FirstEdits) ) AS FirstEdits JOIN actor ON actor.actor_id = (SELECT rev_actor FROM revision WHERE rev_id = FirstEdits.first_revision_id) JOIN user ON user.user_id = actor.actor_user GROUP BY user.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...