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
CXie (WMF)
.
Toggle Highlighting
SQL
USE enwiki_p; SELECT page_title AS Page_Title, CONCAT( SUBSTR(rev_timestamp, 1, 4), SUBSTR(rev_timestamp, 5, 2)) as month_year, -- concat(SUBSTR(rev_timestamp, 5, 2) ,SUBSTR(rev_timestamp, 1, 4) ) month_year, SUBSTR(rev_timestamp, 5, 2) month, SUBSTR(rev_timestamp, 1, 4) year, count(distinct enwiki_p.revision.rev_id) as Revision_Count, round((count(distinct enwiki_p.revision.rev_id) /(select count(enwiki_p.revision.rev_id) from enwiki_p.page inner join enwiki_p.revision on page.page_id = revision.rev_page where page_title in ('Salt','Sugar')))*100,2) as Percent_of_Revisions, sum(rev_minor_edit) as Total_Minor_Edits, round((sum(rev_minor_edit)/count(enwiki_p.revision.rev_id)),2)*100 as Percent_of_Minor_Edits, count(distinct rev_user_text) as Count_Of_Revisionists, round((count(distinct enwiki_p.revision.rev_id)/count(distinct rev_user_text)),2) as Avg_Changes_per_Revisionist FROM page inner join revision on page.page_id = revision.rev_page WHERE page_title in ('Salt', 'Sugar') GROUP BY page_title, -- DATE(CONCAT(YEAR(rev_timestamp),"-",MONTH(rev_timestamp),"-",DAY(rev_timestamp))), SUBSTR(rev_timestamp, 5, 2) , SUBSTR(rev_timestamp, 1, 4) , CONCAT( SUBSTR(rev_timestamp, 1, 4), SUBSTR(rev_timestamp, 5, 2)) -- concat(SUBSTR(rev_timestamp, 5, 2) ,SUBSTR(rev_timestamp, 1, 4) )
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...