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
EpochFail
.
Toggle Highlighting
SQL
SELECT user_id, COUNT(rev_id) AS edits, SUM(page_namespace = 0) AS main_edits, SUM(page_namespace = 1) AS talk_edits, SUM(page_namespace = 2) AS user_edits, SUM(page_namespace = 3) AS user_talk_edits, SUM(page_namespace IN (4,5)) AS wp_edits, SUM(page_namespace > 5) AS other_edits FROM ( (SELECT user_id, rev_id, page_namespace FROM u2041__thr_p.th2_experimental_user INNER JOIN enwiki_p.user USING (user_id) LEFT JOIN enwiki_p.revision_userindex ON rev_user = user_id AND rev_timestamp <= DATE_FORMAT( DATE_ADD(user_registration, INTERVAL 1 DAY), "%Y%m%d%H%i%S" ) LEFT JOIN enwiki_p.page ON rev_page = page_id) UNION (SELECT user_id, ar_rev_id AS rev_id, ar_namespace AS page_namespace FROM u2041__thr_p.th2_experimental_user INNER JOIN enwiki_p.user USING (user_id) LEFT JOIN enwiki_p.archive_userindex ON ar_user = user_id AND ar_timestamp <= DATE_FORMAT( DATE_ADD(user_registration, INTERVAL 1 DAY), "%Y%m%d%H%i%S" ) ) ) AS foo GROUP BY user_id;
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...