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
Mranal.trivedi
.
Toggle Highlighting
SQL
USE enwiki_p; SELECT page_title, Sum(rev_cnt) / Count(DISTINCT rev_user) AS avg_revs_per_user, Count(rev_user) AS user_count, Sum(rev_cnt) AS total_revs, Sum(total_rev_length) AS total_rev_length, Sum(total_rev_length) / Sum(rev_cnt) AS avg_rev_length, rev_minor_edit FROM (SELECT Count(DISTINCT rev_id) AS rev_cnt, Sum(rev_len) AS total_rev_length, page_title, rev_user, CASE WHEN rev_minor_edit = 0 THEN 'Major Revision' ELSE 'Minor Revision' END AS rev_minor_edit FROM revision JOIN page ON revision.rev_page = page.page_id WHERE page_title IN ( 'Sugar', 'Salt' ) AND page_namespace = 0 GROUP BY page_title, rev_user, ( CASE WHEN rev_minor_edit = 0 THEN 'Major Revision' ELSE 'Minor Revision' END ) ORDER BY rev_cnt DESC) sub GROUP BY page_title, rev_minor_edit WITH rollup;
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...