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
Nivas10798
.
Toggle Highlighting
SQL
WITH WLM2018_USERS AS( SELECT DISTINCT actor_user, user_name, user_registration as registration_timestamp, user_editcount, rev_id, rev_timestamp FROM user INNER JOIN actor ON actor_user = user_id AND user_id != 0 INNER JOIN revision ON rev_actor = actor_id AND rev_actor != 0 INNER JOIN page ON rev_page = page_id INNER JOIN categorylinks ON rev_page = cl_from WHERE cl_to = "Images_from_Wiki_Loves_Monuments_2018" AND cl_type = "file" AND user_name NOT LIKE '%Bot%' AND rev_parent_id = 0 ), MONTHWISE_EDITS AS( SELECT user_name, YEAR(rev_timestamp) as Year, ISNULL(SUM(CASE WHEN MONTH(rev_timestamp) = 1 then (DISTINCT rev_id) END), 0) as JAN, ISNULL(SUM(CASE WHEN MONTH(rev_timestamp) = 2 then (DISTINCT rev_id) END), 0) as FEB, ISNULL(SUM(CASE WHEN MONTH(rev_timestamp) = 3 then (DISTINCT rev_id) END), 0) as MAR, ISNULL(SUM(CASE WHEN MONTH(rev_timestamp) = 4 then (DISTINCT rev_id) END), 0) as APR, ISNULL(SUM(CASE WHEN MONTH(rev_timestamp) = 5 then (DISTINCT rev_id) END), 0) as MAY, ISNULL(SUM(CASE WHEN MONTH(rev_timestamp) = 6 then (DISTINCT rev_id) END), 0) as JUN, ISNULL(SUM(CASE WHEN MONTH(rev_timestamp) = 7 then (DISTINCT rev_id) END), 0) as JUL, ISNULL(SUM(CASE WHEN MONTH(rev_timestamp) = 8 then (DISTINCT rev_id) END), 0) as AUG, ISNULL(SUM(CASE WHEN MONTH(rev_timestamp) = 9 then (DISTINCT rev_id) END), 0) as SEP, ISNULL(SUM(CASE WHEN MONTH(rev_timestamp) = 10 then (DISTINCT rev_id) END), 0) as OCT, ISNULL(SUM(CASE WHEN MONTH(rev_timestamp) = 11 then (DISTINCT rev_id) END), 0) as NOV, ISNULL(SUM(CASE WHEN MONTH(rev_timestamp) = 12 then (DISTINCT rev_id) END), 0) as DEC FROM WLM2018_USERS ) SELECT DISTINCT user_name, Year, JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC FROM MONTHWISE_EDITS
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...