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 cat_filter AS ( SELECT rev_id, rev_actor FROM categorylinks INNER JOIN revision ON cl_from = rev_page WHERE cl_to = "Images_from_Wiki_Loves_Monuments_2018" AND cl_type = "file" AND rev_parent_id = 0), newuser_filter AS ( SELECT DISTINCT actor_user, actor_id FROM cat_filter INNER JOIN actor ON actor_id = rev_actor AND rev_actor != 0 INNER JOIN user ON actor_user = user_id AND user_id != 0 WHERE user_registration < 20180901000000 AND user_name NOT LIKE '%Bot%'), edit_filter AS ( SELECT user_name, user_registration, user_id, rev_timestamp, rev_id FROM newuser_filter INNER JOIN user ON actor_user = user_id RIGHT JOIN revision ON actor_id = rev_actor AND rev_actor IS NOT NULL) #editspermonth_filter AS ( SELECT user_name, user_registration, SUM(DATEDIFF(rev_timestamp, '20180901000000') BETWEEN 0 AND 30) AS during_campaign, SUM(DATEDIFF(rev_timestamp, '20181001000000') BETWEEN 0 AND 30) AS after_thirty_days, SUM(DATEDIFF(rev_timestamp, '20181001000000') BETWEEN 31 AND 60) AS after_sixty_days, SUM(DATEDIFF(rev_timestamp, '20181001000000') BETWEEN 61 AND 90) AS after_ninty_days, SUM(DATEDIFF(rev_timestamp, '20181001000000') BETWEEN 91 AND 120) AS after_onetwenty_days, SUM(DATEDIFF(rev_timestamp, '20181001000000') BETWEEN 121 AND 150) AS after_onefifty_days, SUM(DATEDIFF(rev_timestamp, '20181001000000') BETWEEN 151 AND 180) AS after_oneeighty_days, SUM(DATEDIFF(rev_timestamp, '20181001000000') BETWEEN 181 AND 210) AS after_twoten_days, SUM(DATEDIFF(rev_timestamp, '20181001000000') BETWEEN 211 AND 240) AS after_twofourty_days, SUM(DATEDIFF(rev_timestamp, '20181001000000') BETWEEN 241 AND 270) AS after_twoseventy_days, SUM(DATEDIFF(rev_timestamp, '20181001000000') BETWEEN 271 AND 300) AS after_threehundred_days, SUM(DATEDIFF(rev_timestamp, '20181001000000') BETWEEN 301 AND 330) AS after_threethirty_days, SUM(DATEDIFF(rev_timestamp, '20181001000000') BETWEEN 331 AND 365) AS after_threesixtyfive_days FROM edit_filter WHERE user_name IS NOT NULL GROUP BY user_name
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...