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
Larske
.
Toggle Highlighting
SQL
USE svwiki_p; SELECT CONCAT(year, '-') månad, SUM(period < 7) mindre_än_1_vecka, SUM(period BETWEEN 7 AND 30) 1_vecka_till_1_månad, SUM(period BETWEEN 31 AND 365) 1_månad_till_1_år, SUM(period BETWEEN 366 AND 1095) 1_år_till_3_år, SUM(period > 1095) mer_än_3_år 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 månad 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...