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 earliest revision for each user WITH earliest_revisions AS ( SELECT actor.actor_name AS Username, MIN(revision.rev_timestamp) AS earliest_timestamp FROM revision JOIN actor ON actor.actor_id = revision.rev_actor WHERE page_namespace = 0 AND page_is_redirect = 0 GROUP BY actor_name ) -- Combined query to get the summation of sizes SELECT e.Username AS Username, COUNT(*) AS NumberOfArticles, SUM(page.page_len) AS TotalBytes, SUM(LENGTH(page.page_title)) AS TotalWords FROM earliest_revisions e JOIN revision ON actor_name = e.Username AND rev_timestamp = e.earliest_timestamp JOIN page ON page.page_id = revision.rev_page GROUP BY e.Username;
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...