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
TSK80
.
Toggle Highlighting
SQL
USE enwiki_p; SELECT -- revision.rev_page, -- page.page_id, page_title AS Page_Title, SUBSTR(rev_timestamp,7,2)||'-'||SUBSTR(rev_timestamp,5,2)||'-'||LEFT (rev_timestamp, 4),'%d-%m-%Y') as rev_date, LEFT (rev_timestamp, 4) as year, SUBSTR(rev_timestamp,5,2) as month, SUBSTR(rev_timestamp,7,2) as day, -- CONVERT(LEFT (rev_timestamp, 4)||'-'||SUBSTR(rev_timestamp,5,2)||'-'||SUBSTR(rev_timestamp,7,2), DATE) as rev_date, -- SUBSTR(rev_timestamp,5,2)||'/'||SUBSTR(rev_timestamp,7,2)||'/'||LEFT (rev_timestamp, 4) as rev_date, 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) as Count_Of_Revisionists, Round((count(distinct enwiki_p.revision.rev_id)/count(distinct rev_user)),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, SUBSTR(rev_timestamp,7,2)||'-'||SUBSTR(rev_timestamp,5,2)||'-'||LEFT (rev_timestamp, 4),'%d-%m-%Y')
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...