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
Aram
.
Toggle Highlighting
SQL
USE ckbwiki_p; SELECT CONCAT(month, '/', year) monthly, SUM(period < 7) less_than_1week, SUM(period BETWEEN 7 AND 30) 1week_to_1month, SUM(period BETWEEN 31 AND 365) 1month_to_1year, SUM(period > 365) more_than_1year FROM ( SELECT SUBSTR(first, 5, 2) month, SUBSTR(first, 1, 4) year, TIMESTAMPDIFF(DAY, first, last) period FROM ( SELECT MIN(rev_timestamp) first, MAX(rev_timestamp) last FROM revision_userindex WHERE rev_user != 0 AND rev_user NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot') GROUP BY rev_user ) a ) b GROUP BY monthly ORDER BY year, month;
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...